MySQL Forums
Forum List  »  Newbie

Re: MySQL Structure - Order Portal
Posted by: Peter Brawley
Date: July 14, 2016 12:42PM

So it's not that you wish to limit the number of products a customer may buy; for some reason you wish to specify whichproducts a customer may buy.

That's a lot of work to maintain. It's a many-many relationship between customers and products, which is implemented by a bridge table between customers and products, eg...

custprod( customerID,productID, primary key(customerID,productID) )

... in which, for each product-buying permission for a customer, there is a row containing the customerID and the productID.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL Structure - Order Portal
July 14, 2016 12:42PM


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.