I need to create a simple database for simple online shop. I crated the following one desing scheme, but I am not sure about correctness of it.
Does it correct?
What are mistakes?
Like here:
http://netbeans.org/kb/docs/javaee/ecommerce/data-model.html

but I want to add shopping cart
I see one potential issue:
If a
userhas oneshopping_cart, and ashopping_carthas oneuser, shouldordercontain bothuser_idandshopping_cart_id?What ensures that these two IDs in this table reference a
userandshopping_cartthat are also associated with each other?EDIT:
I would just get rid of
shopping_cart, since it only contains totals that you would probably be better off calculating based on the current contents of the order.