Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 5th, 2007, 07:07 PM
Registered User
Join Date: Oct 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Temporary table in a shopping cart project

I am developing a shopping cart project and stuck at the part of adding products to the shopping cart. Is it a best practice to use temporary tables for holding the items in the shopping cart.My view point is if the user leave the session before checking out or they wanted to view their cart summary before check out, can we store that data in a temporary table.I know that using temp table is not a good idea from the performance view point. Is there any better options available other than using a temp table. Your opinion is much appreciated

Old October 5th, 2007, 07:50 PM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

It depends and your business rules should dictate it.

One approach would be to use a permananet table in your database to store shopping carts for X user much like you proposed in your original post. (There is no reason to use a Temp Table)

Your second approach could be to store the value in session. The easiest way to do this, IMHO, is to create a custom type and store a
in session for each user. Your draw back here is that the shopping cart will be lost once the session times out or the browser is closed. (You could, of course, give the user the ability to save their shopping cart which you could then write to a database)


================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
Technical Editor for:
Beginning Visual C# 2008
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
Wrox Blox: Introduction to Google Gears
Wrox Blox: Create Amazing Custom User Interfaces with WPF and .NET 3.0
================================================== =========

Similar Threads
Thread Thread Starter Forum Replies Last Post
wrox united project - shopping cart problem durban BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 January 24th, 2007 09:52 AM
shopping cart keyvanjan Classic ASP Basics 1 January 9th, 2007 10:16 PM
shopping cart xipnl BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 June 10th, 2005 07:00 PM
C# shopping cart franknguyen ASP.NET 1.x and 2.0 Application Design 1 January 5th, 2004 10:54 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.