[geeklog-devel] GL2 items

Euan McKay euan at heatherengineering.com
Sun Nov 21 20:51:50 EST 2004


Hi there,

I was just looking at the DB schema for GL2, in particular this....

CREATE TABLE Categories (
     catCategoryId MEDIUMINT NOT NULL,
     catOwnerId MEDIUMINT NOT NULL,
     catGroupId MEDIUMINT NOT NULL,
     catPermOwner TINYINT NOT NULL,
     catPermAnon TINYINT NOT NULL,
     catName VARCHAR(50) NOT NULL,
     catPermMembers TINYINT NOT NULL,
     catPermGroup TINYINT NOT NULL,
     catParentCategoryId MEDIUMINT NOT NULL,
     catImageUrl VARCHAR(128) DEFAULT 'NULL',
     catSortNum TINYINT DEFAULT NULL,
     CONSTRAINT PK_Categories PRIMARY KEY (catCategoryId)
);

I notice that the variable catName exists.... this means that GL2 will 
be the same as the 1.3 branch - i.e. monolingual. I'd like to put in a 
plea for this to be changed to an ID, which points to a label in a 
separate table. So you get something like...

CREATE TABLE Categories (
     catCategoryId MEDIUMINT NOT NULL,
     catOwnerId MEDIUMINT NOT NULL,
     catGroupId MEDIUMINT NOT NULL,
     catPermOwner TINYINT NOT NULL,
     catPermAnon TINYINT NOT NULL,
     catNameId MEDIUMINT NOT NULL, <---------
     catPermMembers TINYINT NOT NULL,
     catPermGroup TINYINT NOT NULL,
     catParentCategoryId MEDIUMINT NOT NULL,
     catImageUrl VARCHAR(128) DEFAULT 'NULL',
     catSortNum TINYINT DEFAULT NULL,
     CONSTRAINT PK_Categories PRIMARY KEY (catCategoryId)
);

CREATE TABLE Labels (
     labelId MEDIUMINT NOT NULL,
     labelName VARCHAR(50) NOT NULL,
     labelLanguage VARCHAR(50) NOT NULL,
     CONSTRAINT PK_Labels PRIMARY KEY (labelId)
);

This way any item can also be multilingual, and it is simple enough to 
get items with a LEFT JOIN on catNameId. It would set GL2 head and 
shoulders above any other system in terms of flexibility for 
mulltilingual users as well.

Cheers,

Euan.

*************************************************
Heather Engineering - no job too small
http://www.heatherengineering.com/
info at heatherengineering.com/
*************************************************




More information about the geeklog-devel mailing list