Acsess database design advice?

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default Acsess database design advice?

    Hi. Working on a e-commerce site, using ASP/Acsess/Vbscript. This is
    prehaps a database organize question. I use an unique ID for each order in
    the cart like this <%=Session.SessionID%>. This works fine and when checkout
    all order details are stored in my database table called cart. If there is
    several products in the cart, each product is stored in the database with its
    own line like the example below. OrderID PName 123456
    testproduct1 123456 testproduct2 and so on... I want to store all
    products in the same line so that the OrderID is displayed only once in the
    database and holds all info on the particular order Like this: OrderID
    PName 123456 testproduct1, testproduct2....and so on. Any suggestions
    for this? Bjorn.

    btn Guest

  2. Similar Questions and Discussions

    1. Reindex Acsess database?
      Hi. Have a Acsess DB. Is it possible to reindex the autonumber ID index that is in the first coloumn of every table? Have deleted some records in...
    2. Advice Please on Site Design
      hello there Attached is a swf of part of my portfolio I am stuck as how to refine the finer details to make it work At present I don't think it...
    3. Advice on design approach (please!)
      I want to build a control/component that will display graphics within an ASP.Net page. I want the output to be very cross-browser compatible. ...
    4. Advice on design approach and principles
      Hi All, I am building a site that will be used by different types of users, and each type of user will do similar, but substantially different,...
  3. #2

    Default Re: Acsess database design advice?

    ok two things here.

    using the sessionID as a unique OrderId is not 100% fool proof.. if the
    server is ever reset or goes down, the sessionID's will also reset and then
    you may get the same orderid for more than one order.

    I recommmend you simply use the autonumber feature in access for your
    OrderId's then you know they will be unique.

    ok second thing.. you need a three tables (at least).

    table 1 (ORDERS) , holds info like the unique orderid, the customerid,
    possibly shipping info etc.

    table 2 (ORDERDETAILS) has a autonumber for each record, also holds the
    orderID as a forgiegn key and then holds each product ID.

    table 3 (PRODUCTS) holds all of the products, each with , yes you've guessed
    it, an autonumber for each product

    example

    ORDERS
    OrderID CustomerID Shipping......
    43(auto) 3 etcetc....


    ORDERDETAILS
    OrderDetailID OrderID ProductID Qty
    1(auto) 43 5 6
    etc etc

    PRODUCTS
    ProductID ProdName etc
    5(auto) Bouncy Ball etc etc....


    Hope this makes sense.

    James





    "btn" <webforumsuser@macromedia.com> wrote in message
    news:cvkan1$pu6$1@forums.macromedia.com...
    > Hi. Working on a e-commerce site, using ASP/Acsess/Vbscript. This is
    > prehaps a database organize question. I use an unique ID for each order
    > in
    > the cart like this <%=Session.SessionID%>. This works fine and when
    > checkout
    > all order details are stored in my database table called cart. If there
    > is
    > several products in the cart, each product is stored in the database with
    > its
    > own line like the example below. OrderID PName 123456
    > testproduct1 123456 testproduct2 and so on... I want to
    > store all
    > products in the same line so that the OrderID is displayed only once in
    > the
    > database and holds all info on the particular order Like this: OrderID
    > PName 123456 testproduct1, testproduct2....and so on. Any
    > suggestions
    > for this? Bjorn.
    >

    Jamesy Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139