Creating a proper CMS thoughts

Posted by dallasclark on Stack Overflow See other posts from Stack Overflow or by dallasclark
Published on 2010-05-25T22:07:32Z Indexed on 2010/05/25 22:11 UTC
Read the original article Hit count: 312

Filed under:
|

I'm just about to expand the functionality of our own CMS but was thinking of restructuring the database to make it simpler to add/edit data types and values.

Currently, the CMS is quite flat - the CMS requires a field in the database for every type of stored value.

The first option that comes to mind is simply a table which keeps the data types (ie: Address 1, Suburb, Email Address etc) and another table which holds values for each of these data types. Just like how Wordpress keeps values in the 'options' table, serialize would be used to store an array of values.

The second option is how Drupal works, the CMS creates tables for every data type. Unlike Wordpress, this can be a bit of an overkill but really useful for SQL queries when ordering and grouping by a particular value.

What's everyone's thoughts?

© Stack Overflow or respective owner

Related posts about sql

Related posts about database