Re: connection based temp tables



Dear Matt,
You'll have a tricky time with this approach to shopping carts I think.
Whilst you can create a temp table that persists for only as long as the
connection to database exists - you'd have to keep the database connected to
the webserver permanently and once for every user of the website. This would
be packed full of problems - not least of which would be that you'd run out
of connections pretty quickly.

You've got two main options.

1) Keep the shopping cart on the webserver not in the database - this has a
lot of advantages - 1) If you're choice of scripting language manages
sessions for you (like asp.net) then you're users shopping carts will
dissapear without you having to manage the process of cleaning them up. 2)
It'd be much faster - you wouldn't have to keep hitting the database to add
something into the cart, or to pull up the cart items. 3) You wouldn't hve
to clean up the database for abandoned order (your rate might be as high as
70-80% of orders that get abandoned).

2) Keep the cart in a
"pending orders" table - and keep track of the time that each item was
added, and group the items together either by a cart id or by a customer
number - then you could automate clean up.

Nick
<matt@xxxxxxxxxxxxxx> wrote in message
news:1126360634.762880.315890@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello
>
> I am developing a web based webshop with a ms sql back end, but I
> cannot figure out how to do connection based temp tables, so that each
> user gets their own temp table to hold the purchased items.
>
> any ideas or hints would bery much appreciated
>
> rgds
>
> Matt
>


.



Relevant Pages

  • Re: eCommerce/Shopping Cart Experience
    ... I will be open sourcing my shopping cart within the 3 months. ... There will be a customer database included ... ... Session is fine, but in my experiences, ... for the most part, those that disable cookies, also disable session cookies ...
    (microsoft.public.inetserver.asp.db)
  • Re: Finally which ORM tool?
    ... If you've got two objects in memory which are theoretically the same ... database entity - having come from the same database within the same ... A Cart is loaded into memory ... Each entry accesses their cart to get the current currency ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: One SQL, two conns
    ... tables within cart database. ... > I'm writing an ASP cart and hit a problem. ... > Cart contents holds the unique ID from products when you do your 'basket'. ... > When I display the basket, I want to display the products name from the ...
    (microsoft.public.inetserver.asp.general)
  • Re: Eof not working correctly
    ... > database"); ... Where are the variables $UserName and $cart being set? ... When you assign a string to a varible you don't need the parenthesis "( ... See my above comments on assigning strings to the $query varible. ...
    (php.general)
  • Adventures in Big Box Retail
    ... Stomach full and iPod loaded with fresh Tunes, ... Blissfully ignorant of the discordant sounds all around me, I cranked up some Suzanne Vega and parked the cart in a corner while I matched up freezer case contents with coupons. ... one of those shopping carts with the plastic car roars up. ... Now, there is a web comic titled "The Devil's Panties", which recently featured the lead characters Making Vacation Plans. ...
    (soc.singles.moderated)