Re: Need to know about some relationships
Posted by: Scott Nemes
Date: February 24, 2012 07:23AM

Sounds like you have a many-to-many relationship whereas each user may have purchased multiple packs, and each pack may have been purchased by multiple users. You could do this a bunch of ways, but one simplified way is:

table User:
user_id
name
email
...


table Purchases (links users and packs):
purchase_id
user_id
pack_id
...


table Packs:
pack_id
name
...

--
Scott Nemes
MySQL DBA

http://www.linkedin.com/in/scottnemes
http://www.twitter.com/ScottNemes

Options: ReplyQuote


Subject
Written By
Posted
Re: Need to know about some relationships
February 24, 2012 07:23AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.