Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

schema design decision

schema design decision

schema design decision

I am designing a member-based website. Each member will be able to specify preferences for the site. Some of these preferences could be like threads per page in the forums section, how many news stories they wish to see on the front page, etc.

I have two differing opinions on how to structure this within my team.

One side wishes to have a "Users" table that will hold all information for the user, including name, username, password, along with preferences as well. The idea is that these are specific to the user. Also, that we shouldn't have to divide the user table into seperate different tables to specify division; it's more than is necessary. If were to split it up, we would then be managing several tables instead of just one.

Another side wants a more modular, object-oriented approach. There is a forums table, and a users table, but the user should know nothing about forums; you should be able to add/remove forums (or any other module) without having to effect another to any great degree other than change relationships. The proposal is to have a seperate table specifically for forum preferences, as well as a specific table for news preferences, etc. The primary key would be the same for the User table.

I decided to open the question up and get other opinions. What should we do?

Liam Morley
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."

RE: schema design decision

I would recommend the second method. I think , in the long run, it will make things easier. It will also speed up the database : for example , if you were to put all preferences in one table : when a user goes to the forum, the forum script would need to lookup the user table which also contains preferences from other section (ie. news ...).

In other words, i'd choose the second method because the table for the preferences are much smaller.

And besides, modular is good you never know what preferences you're going to add in the future.  



Apparently if you play the Windows NT CD backwards you hear satanic messages. If you think that's bad, play it forwards and it installs Windows NT !

RE: schema design decision

I think devnull22 is right, the second approach is faster, easier to understand, and far more maintenable (which usually is the most important issue).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close