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

db design question

Status
Not open for further replies.

sbutting

Programmer
Mar 4, 2005
1
DE
i have a question concerning db design.

i want to be able to display a user's status in different languages.

my first draft of the affected part of the db's structure looks like this:


user
------
id
user_status_id [foreign key: user_status.id]
...


language
-------------
id
name [varchar(255)]


user_status
-----------------
id


user_status_text
------------------------
user_status_id [foreign key: user_status.id]
language_id [foreign key: language.id]
name [varchar(255)]


a colleague suggested that i should simply drop the table user_status, as it introduces redundancy into my design. my first reply was: "ok, but what if i need extra fields in that table?". i am not sure whether or not i will need them, but let us suppose i don't. to me, my solution looks aestheticaly and logically more appealing ...

my question: how would YOU do it? are there any good reasons for or against my insisting on having that extra table, even if i won't add any attributes?


thanks in advance,
sean
 
Is user_status.id a status code which can be referenced by any number of user records? If that is the case, and you want to limit the value of user_status_id to a certain set of codes, then that table would be essential. Otherwise, if there is no need for referential integrity, then the table would be redundant.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top