VbzCart/docs/tables/cat topic: Difference between revisions
Jump to navigation
Jump to search
imported>Woozle (status update; possible fields to add later) |
imported>Woozle (saving work; still revising) |
||
Line 1: | Line 1: | ||
==About== | ==About== | ||
* '''Status''': Coding in progress | * '''Status''': Coding in progress | ||
* '''Used by''': {{vbzcart|table|brs_titles_x_topics}} | |||
* '''Future''': rename to {{vbzcart|table|cat_topic}}; rename {{vbzcart|table|brs_titles_x_topics}} to {{vbzcart|table|cat_title_x_topic}} | |||
* '''History''': | * '''History''': | ||
** '''2010-10-13''' Coding (store and admin) in progress; noted 3 possible fields to add | ** '''2010-10-13''' Coding (store and admin) in progress; noted 3 possible fields to add | ||
* '''Notes''': | * '''Notes''': | ||
** Fields I'm considering adding here: | ** Fields I'm considering adding here: | ||
*** a flag to indicate that thumbnails of other items in the same category should be shown | *** A) a flag to indicate that thumbnails of other items in the same category should be shown | ||
*** a prefix to be added to NameFull for all child nodes (and maybe a flag to override it) | *** B) a prefix to be added to NameFull for all child nodes (and maybe a flag to override it) | ||
*** a way of creating "virtual" nodes to cross-link to related topics in other branches | *** C) a way of creating "virtual" nodes to cross-link to related topics in other branches | ||
* '''Uses''': Topics are (eventually) to be used in the following places: | |||
** Topic pages (show what titles are assigned) | |||
** Topic index (show what item types are [(1) available (2) in stock] for each topic) | |||
** Title pages | |||
*** show what topics the title is in | |||
*** summarize how many other titles are available for each topic | |||
*** (future) show thumbnails for titles in topics with the A flag | |||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>DROP TABLE IF EXISTS `brs_topics`; | <section begin=sql /><mysql>DROP TABLE IF EXISTS `brs_topics`; | ||
CREATE TABLE `brs_topics` ( | CREATE TABLE `brs_topics` ( | ||
`ID` INT | `ID` INT NOT NULL AUTO_INCREMENT, | ||
`ID_Parent` INT DEFAULT NULL COMMENT "brs_topics.ID of parent topic", | `ID_Parent` INT DEFAULT NULL COMMENT "brs_topics.ID of parent topic", | ||
`Name` | `Name` VARCHAR(128) NOT NULL COMMENT "generic name (context-free, but as short as possible)", | ||
`NameTree` | `NameTree` VARCHAR(64) DEFAULT NULL COMMENT "name within context of parent; defaults to Name", | ||
`NameFull` | `NameFull` VARCHAR(255) DEFAULT NULL COMMENT "descriptive standalone name (context free, can be long)", | ||
`Sort` | `Sort` VARCHAR(15) DEFAULT NULL COMMENT "optional sorting key", | ||
`Variants` | `Variants` VARCHAR(255) DEFAULT NULL COMMENT "synonyms and other keywords which should find this topic", | ||
`Mispeled` | `Mispeled` VARCHAR(255) DEFAULT NULL COMMENT "same as Variants, but these are WRONG spellings; avoid displaying", | ||
PRIMARY KEY(`ID`) | PRIMARY KEY(`ID`) | ||
) ENGINE = MYISAM;</mysql> | ) ENGINE = MYISAM;</mysql> | ||
<section end=sql /> | <section end=sql /> |
Revision as of 12:54, 19 January 2011
About
- Status: Coding in progress
- Used by: Template:Vbzcart
- Future: rename to Template:Vbzcart; rename Template:Vbzcart to Template:Vbzcart
- History:
- 2010-10-13 Coding (store and admin) in progress; noted 3 possible fields to add
- Notes:
- Fields I'm considering adding here:
- A) a flag to indicate that thumbnails of other items in the same category should be shown
- B) a prefix to be added to NameFull for all child nodes (and maybe a flag to override it)
- C) a way of creating "virtual" nodes to cross-link to related topics in other branches
- Fields I'm considering adding here:
- Uses: Topics are (eventually) to be used in the following places:
- Topic pages (show what titles are assigned)
- Topic index (show what item types are [(1) available (2) in stock] for each topic)
- Title pages
- show what topics the title is in
- summarize how many other titles are available for each topic
- (future) show thumbnails for titles in topics with the A flag
SQL
<section begin=sql /><mysql>DROP TABLE IF EXISTS `brs_topics`; CREATE TABLE `brs_topics` (
`ID` INT NOT NULL AUTO_INCREMENT, `ID_Parent` INT DEFAULT NULL COMMENT "brs_topics.ID of parent topic", `Name` VARCHAR(128) NOT NULL COMMENT "generic name (context-free, but as short as possible)", `NameTree` VARCHAR(64) DEFAULT NULL COMMENT "name within context of parent; defaults to Name", `NameFull` VARCHAR(255) DEFAULT NULL COMMENT "descriptive standalone name (context free, can be long)", `Sort` VARCHAR(15) DEFAULT NULL COMMENT "optional sorting key", `Variants` VARCHAR(255) DEFAULT NULL COMMENT "synonyms and other keywords which should find this topic", `Mispeled` VARCHAR(255) DEFAULT NULL COMMENT "same as Variants, but these are WRONG spellings; avoid displaying", PRIMARY KEY(`ID`)
) ENGINE = MYISAM;</mysql> <section end=sql />