Solved

Ecommerce database structure

Posted on 2007-11-28
4
1,283 Views
Last Modified: 2008-09-13
I am building an online gift shop and need help deciding how to relate the shopping cart table to the orders table without alitteration.
Customers are not required to log in in order to add items to the shopping baske, but are required to log in or create an account in order to checkout.
here is the information:

ORDERS
-----------
orderid
customerid
orderitems
subtotal
shipmethod
shipcosts
ordertotal
orderdate
ordertrackingNo

SHOPPINGCART
------------------
cartid
customerid
product
quantity

Any suggestions on improvement would be greatly appreciated.

Thanks in advance
0
Comment
Question by:dotinfiniti
4 Comments
 
LVL 22

Accepted Solution

by:
dportas earned 125 total points
ID: 20369401
>> dotinfiniti: I am building an online gift shop
Obvious question: Why? There is an enormous number of pre-packaged solutions available to meet most requirements.

If you want to do this properly then I suggest you seek out the services of an experienced database designer. It's impossible for us to know your requirements just based on two lists of attributes.
0
 
LVL 18

Assisted Solution

by:Jinesh Kamdar
Jinesh Kamdar earned 125 total points
ID: 20372434
I think the logical thing would be store the basket items in the SHOPPINGCART table until the user selects to check-out (not sure how to and if u want to keep the cart persistent thru multiple sessions). Once the user logs in and finalises the order, move the items to the ORDERS and ORDERLINES tables, which would hold the order details and delete them from the SHOPPINGCART table.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now