[thelist] Relational DB Help

Dave Zero davezero at mindspring.com
Sat Feb 23 11:25:50 CST 2002


Hi everyone,

I'm pretty new to evolt.org and I absolutely love it so far; what a great
place! I'm a recently trained web developer and I'm sure a good majority of
you can code circles around me, so I hope you'll bear with me for a pretty
basic, fundamental-type question.

I maintain an Encyclopedia of articles on a site, and I'm interested in
building a back end database into it, giving it more functionality than just
having a static pile of html mages. I'm pretty sure I'll be using mySQL as
the db source for this.

Everyone is insistent that planning is critical for building a relational db
model, and I'm hoping I can get some expert advice from some of you guys
that have been through this before and could help me out. What I'm trying to
do if decide on the right relational structure of tables in the db to enter
the data from the encyclopedia articles into.

My first primitive attempt was a flat model, one table. I know there are
better ways to structure it so that's what I'm looking for.

This is what we're working with: Each article has a Title, an Author, and I
assume an autonumber primary key ID field. I also want to separate the
articles by type (fiction, nonfiction, poem, etc) and by subject (politics,
religion, science, technology...).

Additionally I'd like to have a field in there that provides the Link - so
we don't have to store each article's content in the db - this way we could
query the db, it'll spit out the link to that static page, the user clicks
it, and there they are.

How would I design the basic table structure with relationships? How many
tables would I use? One for the articles, maybe one for authors? one for
types?

I could definitely use the advice of you fine folk here on how I can save
myself trouble later by putting the structure together properly. If you want
to mail me diagrams or something, you can send them to
davezero at mindspring.com. Other replies can be sent to me, or if perhaps the
advice would help other beginning-level developers with similar issues, send
them right here to the list.

Thanks in advance,

Dave Zero




More information about the thelist mailing list