SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old July 14th, 2002, 03:29 AM
oleonav oleonav is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 2 oleonav User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Content Management System use DB or XML or ...?

We have a Content management system (cms) developed inhouse. Based on requests from our clients where moving to a new version.

All content is stored in one table. This table has pre defined collumns, 10 varchar, 5 text, 5 date fields and so on...

Based on custom insert/edit templates some collumns are filled and some are not. Each category of content has its own template in this system.

Example:
- category1 uses fields varchar1, varchar2 and text1 (title, author, content)
- category2 uses fields varchar1, text1 and date1 (event, description, date)
And so on...

The problem with this stucture is that the table layout has to be altered when for example more then the reserved 10 varchar collumns are needed in a template/category.

In the new version I want a solutions to this problem. I thought of the following scenario's:
1. - Build table altering functions in the cms to let contentmanagers adjust the general content table.
2. - Build a new table per template / category to fit needed collumncount.
3. - use xml to store all content data in one large blob field with corresponding collumns as xml tags.
4. - use the database just to save some administrative date about the content title, publishing date... Save the content data in xml files residing on the filesystem of the server.

I am a paranoia type so I am not so happy with the idea to give content managers rights to alter the database (scenario 1 and 2).
My personal favorite is scenario 3, store contentdata as xml in a large blob field. My only big concern is performance; searching trough the database, xml parsing in php and so on...

Can you give me some tips, pro and cons, ideas about of the different scenarios. Or maybe I am looking in the wrong direction and you folks have a completly different idea about this.

Thanks,

Reply With Quote
  #2  
Old July 14th, 2002, 09:26 PM
ajaypatil ajaypatil is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Osaka
Posts: 9 ajaypatil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 21 sec
Reputation Power: 0
Your observations on XML are correct.
For example, if you want to find all content for a particular
author, it would be damn tough because there is no Author
column, everything is in XML.

Why not maintain the same design that you have currently
i.e one table with 10 varchar fields. And a secondary table
which will store additional columns in case a category
requires more than 10 variable columns.

You can keep a foreign key to the secondary table in
the primary table, which will be NULL whenever the
columns in a category are less than 10.

The above is just a suggestion, I dont know much about
how exactly you create a new category and the template
for that. But I have faced the same problem in designing
databases for other kinds of systems e.g equipments database,
experiment data management system, etc.

Maybe we can discuss further on this.

Ajay

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > Content Management System use DB or XML or ...?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway