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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB design for Chat program

Status
Not open for further replies.

mcox05

Programmer
Apr 25, 2006
25
0
0
US
I'm not very proficient at applying OOD logic to Database tables in order to normalize them. Was hoping to get some help with someone more experienced than myself.

Here is what I have so far ( Tables are underlined)
Code:
[u][COLOR=red]User[/color][/u]
[COLOR=blue]AutoNumber[/color] userID
[COLOR=blue]Text[/color] userName
[COLOR=blue]Text[/color] password
[COLOR=blue]Text[/color] nickname
[COLOR=blue]Yes/No[/color] isAdministrator

[u][COLOR=red]Channel[/color][/u]
[COLOR=blue]AutoNumber[/color] channelID
[COLOR=blue]Text[/color] channelName
[COLOR=blue]Text[/color] password
[COLOR=blue]Yes/No[/color] requiresPassword

[u][COLOR=red]Moderators[/color][/u]
[COLOR=blue]Number[/color] channelID
[COLOR=blue]Number[/color] userID

[u][COLOR=red]Users[/color][/u]
[COLOR=blue]Number[/color] channelID
[COLOR=blue]Number[/color] userID

I don't want to try to explain the relationships ... the person that can tell me if I'm on the right track of if there is a better approach won't need me to haha. Thanks
 
you can combine the users and moderators link table by including a IsModerator field.

the isAdministrator field assumes that if users are administrators, then they are admins across the whole site, rather than admins just on one channel, is this a sensible assumption?

other minor things:
split the name into forename/surname
maybe you'll want a channel nickname as well, short code in case channel names are long

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top