Database Schema

Users

The person table is used for various purposes, possibly including maintaining a "who's who."

Table: tz_person
idint unsigned auto_increment primary key: ID, used by other tables to refer to a person.
namevarchar(128) not null: Person name.
sortvarchar(128) not null: Sort key for person name.
bdaydate null: Birth date.
ddaydate null: Death date.

A user is someone who has known roles with regard to the website -- usually the right to update content on the website. (We don't plan this website to try to track mere readers.)

Table: tz_user
idint unsigned auto_increment primary key: ID, used by other tables to refer to a user.
namevarchar(128) not null: User name.
passwvarchar(32) not null: Encrypted user password.
emailvarchar(128) not null: User email address.
pidinteger unsigned references tz_person.id null: Person information.

Content

The main unit of content is the node.

Table: tz_node
idint unsigned auto_increment primary key: ID, used by other tables to refer to a node.
typeinteger: Node type. (Could be enumerated, or an index into a node type table.)
cuidinteger references tz_user.id: User ID who originally created (owns) node.
muidinteger references tz_user.id: User ID who last modified node.
ctimetimestamp: Timestamp when node originally created.
mtimetimestamp: Timestamp when node last modified.
datatext: Text/data stored in node.

Static web pages are stored on the file system in directories.

Table: tz_dir
idint unsigned auto_increment primary key: ID, used by external tables to refer to a directory.
pathvarchar(255): Path from website root to directory.

Static web pages are managed by the page table.

Table: tz_page
idint unsigned auto_increment primary key: ID, used by external tables to refer to a page.
pathvarchar(128) not null: Path from website root to page.
dirinteger unsigned references tz_dir.id: Directory page resides in.
cuidinteger references tz_user.id: User ID who originally created (owns) page.
muidinteger references tz_user.id: User ID who last modified page.
ctimetimestamp: Timestamp when page originally created.
mtimetimestamp: Timestamp when page last modified.
titlevarchar(255) not null: Page title.

Discography

Artists

Table: tz_artist
idint unsigned auto_increment primary key: ID, used by other tables to refer to an artist.
namevarchar(250) not null: Artist name.
qualvarchar(32) null: Optional qualifier for name, used to uniquely identify artists with shared names.
sortvarchar(250) not null: Sort key for artist name.
ranksmallint: A ranking number assigned to each artist.
Table: tz_artist_map
majorinteger unsigned references tz_artist.id: Primary artist ID.
minorinteger unsigned references tz_artist.id: Secondary artist ID.
Table: tz_artist_node
aidinteger unsigned references tz_artist.id: Artist.
nidinteger unsigned references tz_node.id: Node.
sortinteger: Sort order for sequencing nodes.
Table: tz_group_map
pidinteger unsigned references tz_person.id: Person.
aidinteger unsigned references tz_artist.id: Group.
datesvarchar(255): Some form of encoding for the dates during which the association was active.

Labels

Table: tz_label
idint unsigned auto_increment primary key: ID, used by other tables to refer to a label.
namevarchar(250) not null: Label name.
qualvarchar(128) null: Optional qualifier for name, used to uniquely identify labels with shared names.
sortvarchar(250) not null: Sort key for label name.
Table: tz_label_map
majorinteger references tz_label.id: Primary label ID.
minorinteger references tz_label.id: Secondary label ID.
Table: tz_label_node
aidinteger unsigned references tz_label.id: Label.
nidinteger unsigned references tz_node.id: Node.
sortinteger: Sort order for sequencing nodes.

Album Information

Table: tz_album
idint unsigned auto_increment primary key: ID, used by other tables to refer to an artist.
aidint unsigned references tz_artist.id: Artist album is attributed to.
namevarchar(250) not null: Album name (title).
Table: tz_release
idint unsigned auto_increment primary key: ID, used by other tables to refer to an album release.
albumint unsigned references tz_album.id: Album common information.
labelint unsigned references tz_label.id: Label.
label_novarchar(80): Label identification number.
rel_datedate: Release date.