[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7. Catalog tables

7.1 Catalog tables introduction  
7.2 catalog  Catalog tables introduction
7.3 catalog_category_NAME  
7.4 catalog_category2category_NAME  
7.5 catalog_entry2category_NAME  
7.6 catalog_path_NAME  
7.7 catalog_alpha_NAME  
7.8 catalog_date_NAME  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.1 Catalog tables introduction

The catalog table has a record for every existing catalog. The other tables have names that end with the name of the catalog (NAME).

None of these tables have to be created explicitly. They are described here to facilitate the understanding of the mechanism behind Catalog.

The externalid that appear in each table is designed to ease the importation/exportation of the catalog structure. This field can contain a unique identifier used in another catalog system.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.2 catalog

Describe all the existing catalogs.

 
create table catalog (
  #
  # Table management information 
  #
  rowid int autoincrement,
  created datetime not null,
  modified timestamp not null,

  #
  # Name of the catalog
  #
  name varchar(32) not null,
  #
  # Name of the table whose records are cataloged
  #
  tablename varchar(60) not null,
  #
  # Navigation scheme
  #
  navigation enum ('alpha', 'theme', 'date') default 'theme',
  #
  # State information
  #
  info set ('hideempty'),
  #
  # (alpha, date only) last update time
  #
  updated datetime,
  #
  # Order clause
  #
  corder varchar(128),
  #
  # Where clause
  #
  cwhere varchar(128),
  #
  # (alpha, date only) name of the field for sorting
  #
  fieldname varchar(60),
  #
  # (theme only) rowid of the root in catalog_category_NAME
  #
  root int not null,
  #
  # (theme only) full path name of the location to dump pages
  #
  dump varchar(255),
  #
  # (theme only) the location from which the dumped pages will be accessed
  #
  dumplocation varchar(255),

  unique catalog1 (rowid),
  unique catalog2 (name)
)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.3 catalog_category_NAME

Describe a category (theme only).

 
create table catalog_category_NAME (
  #
  # Table management information 
  #
  rowid int autoincrement
  created datetime not null,
  modified timestamp not null,

  #
  # State information
  #
  info set ('root'),
  #
  # Full name of the category
  #
  name varchar(255) not null,
  #
  # Total number of records in this category and bellow
  #
  count int default 0,
  #
  # External identifier to synchronize with alien catalogs
  #
  externalid varchar(32) not null default '',
)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.4 catalog_category2category_NAME

Link two categories (theme only).

 
create table catalog_category2category_NAME (
  #
  # Table management information 
  #
  rowid int autoincrement,
  created datetime not null,
  modified timestamp not null,

  #
  # State information
  #
  info set ('hidden', 'symlink'),
  #
  # Rowid of father
  #
  up int not null,
  #
  # Rowid of child
  #
  down int not null,
  #
  # Category name replacement
  #
  replacement varchar(255),
  #
  # External identifier to synchronize with alien catalogs
  #
  externalid varchar(32) not null default '',
)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.5 catalog_entry2category_NAME

Link a record from the cataloged table with a category (theme only).

 
create table catalog_entry2category_NAME (
  #
  # Table management information 
  #
  created datetime not null,
  modified timestamp not null,

  #
  # State information
  #
  info set ('hidden'),
  #
  # Rowid of the record from cataloged table
  #
  row int not null,
  #
  # Rowid of the category
  #
  category int not null,
  #
  # External identifier to synchronize with alien catalogs
  #
  externalid varchar(32) not null default '',
)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.6 catalog_path_NAME

Maps category id to category path (theme only).

 
create table catalog_path_NAME (
  #
  # Full path name of the category
  #
  pathname text not null,
  #
  # MD5 key of the path name
  #
  md5 char(32) not null,
  #
  # Full path name translated to ids
  #
  path varchar(128) not null,
  #
  # Id of the last component
  #
  id int not null,

  unique catalog_path_NAME1 (md5),
  unique catalog_path_NAME2 (path),
  unique catalog_path_NAME3 (id)
)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.7 catalog_alpha_NAME

Count information for each letter (alpha only).

 
create table catalog_alpha_NAME (
  #
  # Table management information 
  #
  rowid int autoincrement,
  created datetime not null,
  modified timestamp not null,

  #
  # The letter
  #
  letter char(1) not null,
  #
  # Count of records of the cataloged table have
  # a field starting with this letter.
  #
  count int default 0,
)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.8 catalog_date_NAME

Count information for each period (date only).

 
create table catalog_date_NAME (
  #
  # Table management information 
  #
  rowid int autoincrement,

  #
  # The date interval
  #
  tag char(8) not null,
  #
  # Count of records of the cataloged table have
  # a field starting with this letter.
  #
  count int default 0,

  unique catalog_date_NAME1 (rowid),
  unique catalog_date_NAME2 (tag)
)


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by root on November, 18 2003 using texi2html