Question

I am creating database for shopping cart (JSP). We have products and each product have components, from which the product is made of. If we are out of any particular component, the products made of that component has to be made out of stock. Products will be shown to the user and components are at admin side. Anyone have any idea? How can I make tables for those two and link then in mysql? Or if any Javascript required for it?

Was it helpful?

Solution

Your question is quite incomplete, but I can give you a hint on DB design.

You can design your tables like this:

Table Product (product_id, other product fields... )

Table Component (component_id, other component fields... )

Table Product_Component (product_id, component_id)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top