#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    ER Diagram for Online Shop


    I've created simple ER diagram for the online shop. This diagram assumes that user can rate an item that they haven't bought.
    I have to amend the diagram, so the user can only rate items that they have purchased.
    Currently I have two separate relationships between User and Item: 'Rates' and 'Buys', where buys relationship have two conditions: Price and date.

    Please suggest a way to amend my diagram accordingly.

    Help is much appreciated.
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,172
    Rep Power
    4274
    Originally Posted by nub1984
    Please suggest a way to amend my diagram accordingly.
    make 'rates' a child of 'buys'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo