catch
03-19-02, 21:27
| I'm building my first db and would like some feedback on my model. I'm going to build a site for users to evaluate other user's portfolios (containg images), in which some (but not all) users may be a part of one or more teams. I have ommitted many of the rows of the tables, but have retained the keys and relations. Legend: Table Name Key |------------------------------------------- ------------ | -------------- ------------- | | User | | | Membership | | Team | | ------------ | -------------- ------------- | |->| handle |<---- | tname |<------- | tname | | | | lname | ---- | handle | | admin |--- | | phone | | -------------- ------------- | ------------ | | --- | ------------- | --------------- | | Portfolio | | | Evaluation | | ------------- | --------------- |--| handle |<---- ----| critic | | last_mod | ------| subject | ------------- | rating | --------------- Relations Team.tname ------------->Membership.tname Team.admin ------------->User.handle Membership.handle ---->User.handle Evaluation.critic --------->User.handle Evaluation.subject ----->Portfolio.handle Portfolio.handle -------->User.handle Questions Is this a sound model? I know there are no many-many relations, but I am unsure about the circular nature of the tables Should I use a user_id serial instead of a handle as the user primary key? Is it a good idea to store user passwords or hashes in the user table? *Any* help is appreciated, thanks. |