Question : eStore database manipulation

Hi. I am currently working on creating an eStore using a database for items. My question is if I have mulitple users buying items and putting them in a "shopping cart" would the program require one database for all carts of items for all users that have not paid yet (i.e. shopping cart hold items list). Or should there be one database that has all the carts for every user. The reason I ask is if some users buy stuff but put in on hold for next time where would this "hold" stuff be stored so when the user logs back on the information is there.

Answer : eStore database manipulation

I think you should have this tables in your database.

user(userid,name,address,email,...)
shopping_cart(cartid,userid,date,paid_status)
cart_items(cartid,itemid,itemprice)
items(itemid,name,description,price)


When a user reserves something, you create a cart and then you add items to it....
When the user pays, you mark the cart as paid and that's it.
Random Solutions  
 
programming4us programming4us