[geeklog-devel] GL2 items

Tony Bibbs tony at tonybibbs.com
Mon Nov 22 14:03:19 EST 2004


Duly noted.  FYI, that data model is grossly out-of-date.

--Tony

Euan McKay wrote:

> 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/
> *************************************************
>
> _______________________________________________
> geeklog-devel mailing list
> geeklog-devel at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-devel





More information about the geeklog-devel mailing list