You are on page 1of 4

Post user_id into Purchase to model 1:* makes relationship

User(user_id,name,address,postcode,city,state,email,DOB,tel_no) Purchase(purchase_no,user_id,rate)
Primary Key user_id Foreign Key user_id references User(user_id)

Alternate key tel_no

Post purchase_no into Purchase details to model 1:* contains relationship

Purchase(purchase_no,user_id,date) Purchase_details(movie_id,purchase_no,quantity,selling_price)
Primary Key purchase_no Foreign Key purchase_no references Purchase(purchase_no)

Post user_id into Comment to model 1:* gives relationship

User (user_id,name,address,postcode,city,state,email,DOB,tel_no) Comment(user_id,movie_id,comment_date,


Primary Key user_id comment_details)
Alternate key tel_no Foreign Key user_id references User(user_id)
Post user_id into Rating to model 1:* gives relationship

User (user_id,name,address,postcode,city,state,email,DOB,tel_no) Rating(user_id,movie_id,rate_date,rating_details)


Primary Key user_id Foreign Key user_id references User(user_id)

Alternate key tel_no

Post movie_id into Rating to model 1:* has relationship

Movie (movie_id,format,price,year_released,title) Rating(user_id,movie_id,rate_date,rating_details)

Primary Key movie_id Foreign Key movie_id references movie(movie_id)

Post movie_id into Comment to model 1:* has relationship

Movie (movie_id,format,price,year_released,title) Comment(user_id,movie_id,comment_date,

Primary Key movie_id comment_details)


Foreign Key movie_id references movie(movie_id)

Post movie_id into Purchase_details to model 1:* includes relationship

Purchase_details(movie_id,purchase_no,quantity,selling_price) Movie (movie_id,format,price,year_released,title)

Primary Key movie_id Foreign Key movie_id references movie(movie_id)

Post movie_id into Movie_info to model 1:1 owns relationship

Movie (movie_id,format,price,year_released,title) Movie_info(title,genre,age_limit)

Primary Key movie_id Foreign Key title references movie(title)

Post movie_id into Stock to model 1:* available in relationship

Movie (movie_id,format,price,year_released,title)
Stock(vendor_id,movie_id,quantity,date_received,price_from_vendor)

Primary Key movie_id Foreign Key movie_id references movie(movie_id)


Post title into Actors to model 1:1 has relationship

Movie_info(title,genre,age_limit) Actors_list(title,main_actor,side_actor,side_actor2)

Primary Key title Foreign Key title references movie_info(title)

Post vendor_id into Stock to model 1:* supplies relationship

Vendor(vendor_id,vendor_name)
Stock(vendor_id,movie_id,quantity,date_received,price_from_vendor)

Primary Key vendor_id Foreign Key vendor_id references vendor_id(vendor)