I think I just beat you to the punch there; I just finished a database back-end structure in SQL for the site. It's mainly based on
-style tags and categories. Like Kosten's version, my version supports ages, models, textures, sounds, and "other" (only the common metadata). Here's the SQL export (it's pretty easy to import if you have an SQL DB of some sort, but I can explain if necessary):
Code: Select all
-- phpMyAdmin SQL Dump
-- version 2.11.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 05, 2008 at 09:31 PM
-- Server version: 5.0.45
-- PHP Version: 5.2.6
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `texturu`
--
-- --------------------------------------------------------
--
-- Table structure for table `ages`
--
CREATE TABLE IF NOT EXISTS `ages` (
`ID` int(11) NOT NULL COMMENT 'This field is not auto_incremented because it is linked to the ID field of the items table.',
`instance` enum('single','multi','global','hood') NOT NULL default 'multi' COMMENT 'Represents the instance settings for the age. ''Single'' means every person has their own version and no-one can visit (i.e. Cleft, Bahro caves). ''Multi'' means everyone gets a version and anyone can visit someone else''s (Eder Gira, Teledahn). This will be t',
`information` text COMMENT 'URL to a page with background information.',
`source` text COMMENT 'The .blend (or other) source file or files (zipped). Optional.',
`flyby` text COMMENT 'A link to a bink file of a fly-by through the age.',
`intro` text COMMENT 'A bink video to play upon entering the age. Can be the same as ''flyby''.',
`link.image` text COMMENT 'The thumbnail image shown on a linking book before linking.',
`storyarc.ID` int(11) default NULL COMMENT 'If this age is part of a story arc, this will point to the ID field of the ''storyarc'' table.',
`author.music` tinyint(1) NOT NULL COMMENT 'Does the age have music? (Ambient noise does not count)',
`author.story` tinyint(1) NOT NULL COMMENT 'Does the age have a story?',
`author.puzzles` tinyint(1) NOT NULL COMMENT 'Does the age have any puzzles?',
`author.serious` tinyint(1) NOT NULL COMMENT 'Is the age a serious one (i.e. no pies in the sky)?',
`eastereggs` tinyint(1) NOT NULL COMMENT 'Does the age have any easter eggs? (This will be hidden in spoiler tags on the site.)',
`author.esrb` enum('EC','E','E10+','T','M','AO','RP') NOT NULL COMMENT 'The ESRB (http://www.esrb.org/ratings/ratings_guide.jsp) rating for the age, as determined by the author',
`author.esrb.description` set('Alcohol Reference','Animated Blood','Blood','Blood and Gore','Cartoon Violence','Comic Mischief','Crude Humor','Drug Reference','Fantasy Violence','Intense Violence','Language','Lyrics','Mature Humor','Nudity','Partial Nudity','Real Gambling','Sexual Content','Sexual Themes','Sexual Violence','Simulated Gambling','Strong Language','Strong Lyrics','Strong Sexual Content','Suggestive Themes','Tobacco Reference','Use of Drugs','Use of Alcohol','Use of Tobacco','Violence','Violent References') NOT NULL COMMENT 'The ESRB content descriptors for the age. Note: the ''mild'' tag used by the ESRB is not implemented here; just use the full form.',
`author.storyissues` text COMMENT 'A summary of distinctive story elements which may interfere with either Cyan''s storyline or other fan storylines (hidden in spoiler tags).',
`community.votes` smallint(5) unsigned NOT NULL COMMENT 'The total number of votes for this age in all categories, used for tallying.',
`community.music` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the age''s music (only available if the author said there was music).',
`community.story` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the age''s story (only available if the author said the age had a story).',
`community.setting` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the age''s setting (environment).',
`community.modeling` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the quality of the models in the age.',
`community.texturing` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the quality of the texturing in the age.',
`community.sound` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the quality of the ambient sounds in the age.',
`community.puzzles` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the quality of the puzzles (only available if the author said there were puzzles).',
`community.puzz.diff` smallint(5) unsigned NOT NULL COMMENT 'The sum of all votes (1-5) on the difficulty of the puzzles (only available if the author said there were puzzles).',
`community.esrb.EC` smallint(5) unsigned NOT NULL COMMENT 'The number of votes that this age should be rated EC.',
`community.esrb.E` smallint(5) unsigned NOT NULL COMMENT 'The number of votes that this age should be rated E.',
`community.esrb.E10` smallint(5) unsigned NOT NULL COMMENT 'The number of votes that this age should be rated E10+.',
`community.esrb.T` smallint(5) unsigned NOT NULL COMMENT 'The number of votes that this age should be rated T.',
`community.esrb.M` smallint(5) unsigned NOT NULL COMMENT 'The number of votes that this age should be rated M.',
`community.esrb.AO` smallint(5) unsigned NOT NULL COMMENT 'The number of votes that this age should be rated AO.',
`comments.Cyan` text COMMENT 'If Cyan has commented on this age, the summary will be stored here.',
`comments.GoW` text COMMENT 'If the GoW has commented on this age, the summary will be stored here.',
`comments.GoMa` text COMMENT 'If the GoMa has commented on this age, the summary will be stored here.',
`comments.GoC` text COMMENT 'If the GoC has commented on this age, the summary will be stored here.',
`comments.GoMe` text COMMENT 'If the GoMe has commented on this age, the summary will be stored here.',
`comments.GoG` text COMMENT 'If the GoG has commented on this age, the summary will be stored here.',
`ingame.name` text NOT NULL COMMENT 'The name of the age as it should be shown in-game (In English or D''ni). This field supports D''ni characters (put each D''ni letter in brackets according to OTS, as in [ts][o][g][ah][l] or [23]).',
`ingame.description` text COMMENT 'A description of the age in English, if different than the out-of-game description.',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `categories`
--
CREATE TABLE IF NOT EXISTS `categories` (
`ID` int(10) unsigned NOT NULL auto_increment COMMENT 'This field is automatically created.',
`parent` int(10) unsigned default NULL COMMENT 'The ID of this category''s parent, or NULL if it is aa top-level category.',
`name` text NOT NULL COMMENT 'The name of the category.',
`description` text COMMENT 'A brief description (optional) of the items in the category.',
`type` enum('age','model','tex','sound') default NULL COMMENT 'The type off subject matter that this category is intended for.',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `items`
--
CREATE TABLE IF NOT EXISTS `items` (
`ID` int(10) unsigned NOT NULL auto_increment COMMENT 'This field is automatically created.',
`name` text NOT NULL COMMENT 'The name of the file (as the author would like it displayed).',
`description` text COMMENT 'A description of the item in English.',
`legal.license` text NOT NULL COMMENT 'The license under which this image is released. Recommend either preset phrases (cc2, pd) or a URL to the custom license.',
`legal.pending` tinyint(1) NOT NULL COMMENT 'Is the item under legal review? Will disable the viewing or download of this item temporarily.',
`hash` blob COMMENT 'An MD5 hash of the file. This will be used in case the file changes outside the database (if hosted elsewhere), which is a security risk.',
`version` varchar(16) NOT NULL COMMENT 'The version of the file. This should increase every time the file is updated.',
`version.date` datetime NOT NULL COMMENT 'When this version was released.',
`filesize` int(10) unsigned NOT NULL COMMENT 'The size of the file in bytes.',
`download` text NOT NULL COMMENT 'The location of the file represented by this record.',
`image` text COMMENT 'A thumbnail of the image or age, etc. (optional)',
`author.name` text NOT NULL COMMENT 'The author''s full name (for legal reasons).',
`author.nick` text NOT NULL COMMENT 'The author''s username/nickname. This will be used on the site.',
`author.email` text COMMENT 'The author''s e-mail address (possibly shown on the site).',
`author.homepage` text COMMENT 'The author''s homepage, if he/she has one.',
`credits` text COMMENT 'Any other references or credits required for legal purposes.',
`type` enum('age','model','tex','sound') default NULL COMMENT 'Represents whether this is an age, texture,model, sound, or other (NULL value). The four types mean that there will be a record with the same ID in the corresponding table in the DB.',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `itemtags`
--
CREATE TABLE IF NOT EXISTS `itemtags` (
`item` int(10) unsigned NOT NULL COMMENT 'The ID of the item.',
`tag` int(10) unsigned NOT NULL COMMENT 'The ID of the tag.',
PRIMARY KEY (`item`,`tag`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `models`
--
CREATE TABLE IF NOT EXISTS `models` (
`ID` int(10) unsigned NOT NULL COMMENT 'This field is not auto_incremented because it is linked to the ID field of the items table.',
`textured` tinyint(1) NOT NULL COMMENT 'Is the model fully covered with a texture?',
`dimensions.x` double NOT NULL COMMENT 'The x dimension (width) of this model''s bounding box.',
`dimensions.y` double NOT NULL COMMENT 'The y dimension (depth) of this model''s bounding box.',
`dimensions.z` double NOT NULL COMMENT 'The z dimension (height) of this model''s bounding box.',
`count.vertices` mediumint(8) unsigned NOT NULL COMMENT 'The number of vertices in the whole model. (In Blender, this is at the top: the ''y'' in Ve:x-y.)',
`count.edges` mediumint(8) unsigned NOT NULL COMMENT 'The number of edges in the whole model. (In Blender, this is at the top: the ''y'' in Ed:x-y.)',
`count.faces` mediumint(8) unsigned NOT NULL COMMENT 'The number of faces in the whole model. (In Blender, this is at the top: the ''y'' in Fa:x-y.)',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `sounds`
--
CREATE TABLE IF NOT EXISTS `sounds` (
`ID` int(10) unsigned NOT NULL COMMENT 'This field is not auto_incremented because it is linked to the ID field of the items table.',
`length` double unsigned NOT NULL COMMENT 'The length of the song in seconds.',
`samplerate` mediumint(8) unsigned NOT NULL COMMENT 'The sample rate of the song in Hz.',
`bits` tinyint(3) unsigned NOT NULL COMMENT 'The number of bits per sound sample.',
`stereo` tinyint(1) NOT NULL COMMENT 'Stereo (left and right channels) or mono?',
`music` tinyint(1) NOT NULL COMMENT 'Is it a song or piece of music, or just foley or ambient sound?',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `storyarcs`
--
CREATE TABLE IF NOT EXISTS `storyarcs` (
`ID` int(10) unsigned NOT NULL auto_increment COMMENT 'This field is automatically created.',
`name` text NOT NULL COMMENT 'The name of the story arc.',
`description` text NOT NULL COMMENT 'A summary of the story.',
`story` text COMMENT 'An optional URL to a page with more description.',
`start` int(10) unsigned NOT NULL COMMENT 'The ID of the starting age.',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `tags`
--
CREATE TABLE IF NOT EXISTS `tags` (
`ID` int(10) unsigned NOT NULL auto_increment COMMENT 'The ID for the tag.',
`name` varchar(255) NOT NULL COMMENT 'The name of the tag.',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `textures`
--
CREATE TABLE IF NOT EXISTS `textures` (
`ID` int(10) unsigned NOT NULL COMMENT 'This field is not auto_incremented because it is linked to the ID field of the items table.',
`dimensions.x` smallint(5) unsigned NOT NULL COMMENT 'The x dimension (width) of the image.',
`dimensions.y` smallint(5) unsigned NOT NULL COMMENT 'The y dimension (height) of the image.',
`category` smallint(5) unsigned default NULL COMMENT 'An ID to a category entry in the ''categories'' table.',
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
It's not quite as readable as Kosten's version, but you can make out the important points. (I've also commented every field, which should help understanding.) I plan now to work on a user-friendly PHP frontend so that it becomes usable!