[thelist] Relational DB Help

David Kutcher david_kutcher at hotmail.com
Sat Feb 23 11:51:12 CST 2002


Dave-

The key to making a relational database is to separate information that is
not unique from information that is unique.

In your example, lets say that every article has an author, a title, a type,
an id number, subject, and big text field for content.

Start asking yourself questions such as:

Can 1 author have written multiple articles? (separate author into its own
table with an author ID)
Can 1 article have multiple authors?
Can a type be used for multiple articles?  (separate into a type table with
a type id)
Can a subject be used for multiple articles?  (separate subject into a type
table with a subject id)

this would leave your initial table with an articleID, authorID, title,
typeID, subjectID, text
and would have separate tables for authors, types, and subjects

if multiple authors, you would also probably want a ref table which would be
comprised of refID, articleID, and set(authorID, authorID, etc)

I hope this makes sense to other readers...

David
www.confluentforms.com




More information about the thelist mailing list