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

Here are my requirements:

  • one user can have many tasks
  • one group can have many task
  • one group can have many users
  • only invited user by a user can be added into a group

Does this db design appear to model these requirements?

enter image description here

In group table, group_id should be the FK of which? there are 2 table linked to that table. 1 FK to 2 PK? possible?

share|improve this question

Try these design which will satisfy your requirements.
Group(Group Id Primary Key,Group Name)
User(User Id Primary Key,Name,Email,Created on,Group Id references Group(Group Id),Referred User ID references User(User ID))
Task(Task ID Primary Key,Name,Priority,Date)
User-Tasks(Relation ID Primary Key,User ID references User(User ID),Task ID references Task(Task ID))

share|improve this answer
relation id PK in user-tasks table is for? not compulsory right? – user3033162 Dec 6 '13 at 7:34

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.