Creating a database for my site

I need help developing a database for my online costume store. So far, I have created tables for products, orders, and my users / customers. I think I need to add some tables to manage my shopping cart for customers while they make their choices and customize them. At the moment, I'm a little confused about how to proceed. Does my shopping basket really pretty much store all the information that will be stored in my order tables? as you can see from the attached image, orders have order elements, and order elements have order item parameters. Thus, I can raise every element of the order that the client wants, and all the settings that go with each specific order. Do I need to do this in my shopping basket first, which meansthat I basically have to replicate all the tables in the orders section of the database, or is there a better way? Also, what does not yet exist for my database application to ensure a reliable launch of a website such as www.indochino.com?

All help is appreciated ... enter image description here

+3
source share
4 answers

You must change the table orderas a table shopping_cartand remove all information about the delivery address from it.

Then create a separate table orderthat includes shopping_cart_idthat points to the corresponding shopping cart. This table ordershould include all the necessary information for the placed order, for example, delivery address, total position amount, tax amount, total order amount, dispatch date, etc.

, - , - , . , , . , , , .

+1

, . order/order_item , , , "", "", "" .. . , .

0

, "in_cart bit" ? , , in_cart 1, .

0

, - , orderid userid .

0

All Articles