If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Feedback on database design for CMS articles module

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-04, 03:34
360id 360id is offline
Registered User
 
Join Date: Feb 2004
Posts: 2
Feedback on database design for CMS articles module

Hi all!

I'm outlining an articles module for a CMS.
The content requires four levels in its hierarchy: categories, subcategories, articles and subarticles.
Each 'child' can relate to more than one 'parent'.
All articles in all levels can contain text and/or images.
An image can relate to more than one article.

Im no guru in database design, to say the least, having designed only for content that needed simple one-to-one relations.
It's the relations that I want to get right, so I left out the fields that aren't important.
I'd love some feedback on this sketch:
Code:
# Table articles
 
id - primary key
name
text
 
# Table images
 
id - primary key
name
 
# Table 'images_lookup'
 
article_id - primary key
image_id - primary key
 
# Table 'categories_lookup'
 
id - primary key, articles record with that id
 
# Table 'subcategories_lookup'
 
id - primary key, article record with that id
parent_id - primary key, 'category' articles record with that id
 
# Table 'articles_lookup'
 
id - primary key, article record with that id
parent_id - primary key, 'subcategory' articles record with that id
 
# Table 'subarticles_lookup'
 
id - primary key, article record with that id
parent_id - primary key, 'article' articles record with that id
Thanks!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On