Re: Database Design for Shopping Cart

From: Lee Newton <spam_at_ntlworld.com>
Date: Sun, 12 May 2002 11:54:51 +0100
Message-ID: <QRrD8.610$eK4.62902_at_newsfep1-win.server.ntli.net>


Too options here.

  1. Remove "tblShoppingCart" (it's not really needed).
  2. or create a new field in "tblShoppingCart" called "CartID" (PK). Remove "UserID" from "tblCartDetail" and create a field called "CartID" (FK).

"Art" <ashannon_at_sfsu.edu> wrote in message news:U0qD8.1004$1s3.58136625_at_newssvr21.news.prodigy.com...
> I have an assignment to develop shopping web site and I would like to ask
> about how to do a good design for the database system that will support
> shopping cart?
>
> I designed one and it has one shoppingcart table that contains only one
> field, UserID, which I feel weird. It looks like this:
>
> tblShoppingCart tblCartDetail
> tblProduct
> UserID * ------------------------------>UserID *
> ProductID
> * ------------------------------------>ProductID *
>
> (also have other fields)
> (* is for primary key)
>
> Could anyone please give me a suggestion?
>
> Thank you
>
>
Received on Sun May 12 2002 - 12:54:51 CEST

Original text of this message