VbzCart/tables/cat ittyps

From HTYP, the free directory anyone can edit

Jump to: navigation, search

[edit] About

  • Purpose: catalog item types - every item has one, but they are often all the same
  • Fields:
    • ID_Parent (int): cat_ittyps.ID of parent, if any
    • NameSng (string): word for single item of this type (e.g. "shirt","box")
    • NamePlr (string): word for multiple items of this type (e.g. "shirts","boxes")
    • Descr (string): longer name, e.g. "compact disc" instead of "CD". If blank, use NameSng.
      • Q: should this contain plural text? Or will we need DescrSng and DescrPlr?
    • Sort (string): sorting key (optional)
    • isType (flag): if TRUE, this type may be used for actual items; if not, it is a folder (type category)

[edit] SQL

 DROP TABLE IF EXISTS `cat_ittyps`;
 CREATE TABLE `cat_ittyps` (
  `ID` INT  NOT NULL AUTO_INCREMENT,
  `ID_Parent` INT COMMENT '(self).ID of parent type; mainly for organizational purposes',
  `NameSng` VARCHAR(63) NOT NULL COMMENT 'word for single item of this type (e.g. "shirt", "box")',
  `NamePlr` VARCHAR(63) COMMENT 'word for multiple items of this type (e.g. "shirts", "boxes"); NULL = use singular',
  `Descr` VARCHAR(255) COMMENT 'longer name (singular), e.g. "compact disc" instead of "CD". NULL = use singular',
  `Sort` VARCHAR(31) COMMENT "optional sorting key",
  `isType` BOOL COMMENT 'FALSE = just a folder, so omit it from drop-down lists of types to choose from',
  PRIMARY KEY(`ID`)
 ) ENGINE = MYISAM;
Personal tools