User:RichMorin/smw specprops

Store special properties for pages, etc.


Inter-table Relationships

edit
  • subject - page title ( page.page_title)
  • subjectns - page namespace ( page.page_namespace)


MySQL Table Description

edit
mysql> desc sem_smw_specialprops;
+-----------+-------------+------+-----+---------+-------+
| Field     | Type        | Null | Key | Default | Extra |
+-----------+-------------+------+-----+---------+-------+
| subjectns | smallint(6) |      |     | 0       |       |
| subject   | text        |      |     |         |       |
| property  | smallint(6) |      |     | 0       |       |
| value     | text        |      |     |         |       |
+-----------+-------------+------+-----+---------+-------+
4 rows in set


Annotated Table Creation Code

edit
-- Store properties for pages, etc.

CREATE TABLE sem_smw_specialprops (

  -- name space and name of RDF subject

  subjectns           smallint                    NOT NULL,
  subject             text                        NOT NULL,

  -- property id; the view special properties
  -- have language-independent integer ids

  property            smallint                        NOT NULL,

  -- property value, format depends on property

  value               text                        NOT NULL

) TYPE = MyISAM;