Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

schema design decision

Status
Not open for further replies.

carpeliam

Programmer
Mar 17, 2000
990
US
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
lmorley@wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."
 
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.

cheers devnull22

--
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 !
 
I think devnull22 is right, the second approach is faster, easier to understand, and far more maintenable (which usually is the most important issue).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top