VbzCart/tables/ctg updates

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< VbzCart‎ | tables
Revision as of 18:54, 8 March 2009 by Woozle (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 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
  1. 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.

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>