2

I have a following given scenario. A user can have zero or more item. A user can comment on the item. (Just simple comment listing with name of people who comment, no need hierarchical structure for replying comment)

And i come out database structure like this. Not sure if this is a good database design

enter image description here

1 Answer 1

0

You design is basic and cover

1 user -> many items
1 item -> many comments
1 user -> many comments

The question is would you like the user to be able to comment on the same item multiple of times? if yes, you do have a good design else we would need to work on it.

2
  • well, ya. a user should be able to comment on the same item multiple of times. However, i would appreciate if you could provide design for the case where a user only can comment on same item one time in database level Dec 21, 2014 at 14:18
  • Change the User - > Comments from 1 - Many to 1-1
    – szakwani
    Dec 22, 2014 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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