Difference between revisions of "VbzCart/tables/ctg updates"
Jump to navigation
Jump to search
(New page: ==About== * '''Purpose''': There may be a better way to do this, but haven't been able to figure it out yet. This table keeps track of the correspondence between {items as generated from t...) |
(discarded) |
||
Line 1: | Line 1: | ||
==About== | ==About== | ||
+ | * '''Status''': DISCARDED | ||
* '''Purpose''': There may be a better way to do this, but haven't been able to figure it out yet. This table keeps track of the correspondence between {items as generated from the catalog title group data} and {items in {{vbzcart|table|cat_items}}}. Off the top of my head, I can't remember why we need to keep more fields than just ID_Item and IDS_Item, but I did look at this table very closely awhile back and ended up with all those extra fields still in it. '''TO DO''': document why they're needed. | * '''Purpose''': There may be a better way to do this, but haven't been able to figure it out yet. This table keeps track of the correspondence between {items as generated from the catalog title group data} and {items in {{vbzcart|table|cat_items}}}. Off the top of my head, I can't remember why we need to keep more fields than just ID_Item and IDS_Item, but I did look at this table very closely awhile back and ended up with all those extra fields still in it. '''TO DO''': document why they're needed. | ||
* '''Fields''': | * '''Fields''': | ||
** '''isActive''' is necessary because otherwise there was no way to convey that a formerly-existing item is no longer active; while it ''should'' be possible to pull this information back out from {{vbzcart/query|qryCtg_Items_updates_joinable}} when updating {{vbzcart|table|cat_items}} from {{vbzcart|table|ctg_updates}}, the necessary join (showing all items in {{vbzcart|table|cat_items}} not found in {{vbzcart/query|qryCtg_Items_updates_joinable}}) seems to take a prohibitively long time to run. Perhaps this can be optimized later, which would also eliminate the need for most of the fields in {{vbzcart|table|ctg_updates}}. | ** '''isActive''' is necessary because otherwise there was no way to convey that a formerly-existing item is no longer active; while it ''should'' be possible to pull this information back out from {{vbzcart/query|qryCtg_Items_updates_joinable}} when updating {{vbzcart|table|cat_items}} from {{vbzcart|table|ctg_updates}}, the necessary join (showing all items in {{vbzcart|table|cat_items}} not found in {{vbzcart/query|qryCtg_Items_updates_joinable}}) seems to take a prohibitively long time to run. Perhaps this can be optimized later, which would also eliminate the need for most of the fields in {{vbzcart|table|ctg_updates}}. | ||
+ | * '''History''': | ||
+ | ** '''2009-07-02''' This does not seem to be necessary; it was never implemented on Rizzo, and catalog building has happened without it. | ||
==SQL== | ==SQL== | ||
<section begin=sql /><mysql>CREATE TABLE `ctg_updates` ( | <section begin=sql /><mysql>CREATE TABLE `ctg_updates` ( |
Latest revision as of 23:48, 2 July 2009
About
- Status: DISCARDED
- Purpose: There may be a better way to do this, but haven't been able to figure it out yet. This table keeps track of the correspondence between {items as generated from the catalog title group data} and {items in cat_items}. Off the top of my head, I can't remember why we need to keep more fields than just ID_Item and IDS_Item, but I did look at this table very closely awhile back and ended up with all those extra fields still in it. TO DO: document why they're needed.
- Fields:
- isActive is necessary because otherwise there was no way to convey that a formerly-existing item is no longer active; while it should be possible to pull this information back out from
- REDIRECT Template:l/vc/query when updating cat_items from ctg_updates, the necessary join (showing all items in cat_items not found in qryCtg_Items_updates_joinable) seems to take a prohibitively long time to run. Perhaps this can be optimized later, which would also eliminate the need for most of the fields in ctg_updates.
- History:
- 2009-07-02 This does not seem to be necessary; it was never implemented on Rizzo, and catalog building has happened without it.
SQL
<mysql>CREATE TABLE `ctg_updates` (
ID_Item INT NOT NULL AUTO_INCREMENT COMMENT "cat_items.ID", IDS_Item VARCHAR(63) NOT NULL UNIQUE COMMENT "cat_titles.ID + CatSfx", isActive BOOL NOT NULL DEFAULT FALSE COMMENT "current sources do generate a record for this item", CatSfx VARCHAR(31) DEFAULT NULL COMMENT "suffix which uniquely identifies this item's genome, so to speak, within all items for the same title", CatNum VARCHAR(63) NOT NULL COMMENT "CatNum = Title.CatNum + CatSfx", ID_Title INT DEFAULT NULL, ID_CTG_Group INT DEFAULT NULL, ID_CTG_Title INT DEFAULT NULL, ID_CTG_Item INT DEFAULT NULL, ID_ItTyp INT DEFAULT NULL COMMENT "needed for join with cat_items, even though it comes from ID_CTG_Item", ID_ItOpt INT DEFAULT NULL COMMENT "needed for join with cat_items, even though it comes from ID_CTG_Item", PRIMARY KEY(`IDS_Item`), INDEX(`ID_Item`), INDEX(`CatNum`)
) ENGINE = MYISAM;</mysql>