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 > Simple Design Question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-24-06, 18:34
elect_son elect_son is offline
Registered User
 
Join Date: Jan 2006
Posts: 1
Simple Design Question

I am designing a small database that will be used to produce a table of contents for different types of manuals. One table will contain topics and their meta data. Another table will contain manuals. Each manual will consist of multiple topics. A given topic will have a level and order within a manual. So the "help" topic might be the first topic at the third level in one document but the second topic at the first level in another document.

One design that comes to mind is to make the Manuals table a series of triplets of an: ID (that points back to a topic ID in the Topics table), a level, and an order. So each manual would have a title, ID, and multiple triplets.

Somehow I need to setup the relationship between a manual, it's topics, and at what level and in what order those topics appear in that manual.

Is there a better design than what I'm considering?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 01-25-06, 00:47
kiwistrawberry kiwistrawberry is offline
Registered User
 
Join Date: Jan 2006
Posts: 1
how about this? i think this should work..

Manual
--------
manual_id (primary key)
<insert other table fields>

Topic
--------
topic_id (primary key)
level
order
<insert other table fields here>
manual_id (foreign key)
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