theEclipse
Programmer
I am in the process of reviewing the designs of some third party (ie. some open source) databases that handle CMS and Webstore information in an attempt to choose one to fork into a standardized code base for the company I work with.
One thing that I have seen is a varied approach to localizing the Content inside the database. I have seen basically two differing approaches and I am curious as to which is 'better' from a database design paradigm.
The first uses a localization table for each table which would be localized:
Another approach uses a centralized localization table or set of tables:
Where the varchar(32)s are MD5 hashes or similar UUID.
Supposedly the advantage to the first approach is that all the info for products is contained in tables relating specifically to products and categories to categories.
Supposedly the advantage to the second approach is that all the localization data/strings is in two tables. Usually in these designs nearly every table in sight has at least one or more links to these localization string tables.
Both of these approaches leave something to be desired, but that might just be because there isn't any simple solution to this problem.
Is there a standard or more accepted way of accomplishing this?
Robert Carpenter
Remember....eternity is much longer than this ~80 years we will spend roaming this earth.
ô¿ô
One thing that I have seen is a varied approach to localizing the Content inside the database. I have seen basically two differing approaches and I am curious as to which is 'better' from a database design paradigm.
The first uses a localization table for each table which would be localized:
Code:
Table languages(id int(11) unsigned[...]);
Table Products(id int(11) unsigned[...]);
Table Product_descriptions(language int(11) unsigned, product int(11) unsigned, description text(255));
Table Categories(id int(11) unsigned [...]);
Table category_descriptions(category int(11) unsigned, language int(11) unsigned, description text(255));
etc etc
Another approach uses a centralized localization table or set of tables:
Code:
Table languages(id int(11) [...]);
Table short_strings(language int(11), id varchar(32), string varchar(75));
Table long_strings(language int(11), id varchar(32), string text);
Table products(id int(11) [...], name varchar(32), description varchar(32));
Table categories(id int(11) [...], name varchar(32),
description varchar(32));
Where the varchar(32)s are MD5 hashes or similar UUID.
Supposedly the advantage to the first approach is that all the info for products is contained in tables relating specifically to products and categories to categories.
Supposedly the advantage to the second approach is that all the localization data/strings is in two tables. Usually in these designs nearly every table in sight has at least one or more links to these localization string tables.
Both of these approaches leave something to be desired, but that might just be because there isn't any simple solution to this problem.
Is there a standard or more accepted way of accomplishing this?
Robert Carpenter
Remember....eternity is much longer than this ~80 years we will spend roaming this earth.
ô¿ô