Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm designing a database for a new project and I'm looking for some feedback on the design before I start to implement/test. It basically consists of users, events, user profiles and a messaging system.

Certain users can create events which others can view, this is determined from the userType table. I'm unsure if I should be storing the lost password columns in the users table, would there any benefit for using a separate table for this?

(I'm not to sure if my relationships are setup correctly)

Database Design

Full size

Appreciate any feedback given =)

Thanks !

share|improve this question
up vote 1 down vote accepted

Having the users and lost passwords in the same table implies a 1-1 (or 1-0/1) relationship; 1 user has 1 lost password (or none, if the column is nullable).

If that's the cardinality of the relationship, having them on the same table is correct. The school of thought that refuses nulls (which depending on the day, I adhere to), says that if the relationship is 1-0/1, you should:

  usersID primary key

  usersID primary key references users(users_id)
  -- lost password columns here, non-nullable

The relationships look fine, however, I would suggest you use a diagramming tool which shows which are the columns referenced. Surprisingly, I've only found SchemaSpy doing this:

share|improve this answer
Thanks I think I will use your idea of a separate lostPassword table. Thanks for the link to SchemaSpy! – Elliott Dec 12 '11 at 14:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.