Wrox Programmer Forums
|
Visual Web Developer 2005 Discuss creating ASP.NET 2.0 sites with Microsoft's Visual Web Developer 2005. If your question is more specific to a piece of code than the Visual tool, see the ASP.NEt 2.0 forums instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Web Developer 2005 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 June 12th, 2010, 03:34 AM
Authorized User
Points: 410, Level: 7
Points: 410, Level: 7 Points: 410, Level: 7 Points: 410, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2009
Posts: 72
Thanks: 17
Thanked 0 Times in 0 Posts
Question Pls Suggest Me

Hi,

I have a question, I have a big form in my website.

The Data of this form goes to Access Database.

Total 62 fields are there in this form.

SO my question is should i keep all these 62 fields in a single table. Or should i split the data in to multiple tables.

which approach is right one
1. To put all 62 fields in 1 table
2. To split & put data in multiple tables


Thank You......!!
 
Old June 12th, 2010, 04:00 AM
Friend of Wrox
 
Join Date: May 2005
Posts: 227
Thanks: 1
Thanked 7 Times in 7 Posts
Default

anup.maverick

By using MS Access Database dictates that the information is or should be relational, that is many relational tables. With eberything in one table is not good, because you must consider how ofter the information will be updated. Put like information in the same table and establish your primary and foreign keys to create relationships..

Good luck!
__________________
Disclaimer: The above comments are solely the opinion of one person and not to be construed as a directive or an incentive to commit fraudulent acts.
 
Old June 12th, 2010, 02:42 PM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

peace95 is right on. If you're building a single table DB, you're really building a spreadsheet and DBs were created to address some fundamental problems with spreadsheets.

Any item which you want to associate with more than one record, break out. You can have a customer with multiple orders, therefore its a bad idea to have columns with customer info in the same table as columns with order info. How will the customer ever order more than once?

You'll create a customer table with name, contact information, possible credit card info etc. You'll have a second order table which has an orderID column product name, product serialNumber, product price, product quantity etc. Then if you need to modify customer information you UPDATE data in the customer table. If you need to check an order you retrieve all the products that share the appropriate order#. Then you have a 3rd table with two columns one for order id and one for customer id so you can locate the customer who placed a particular order or look up orders for a particuar customer.

Also, any column which can take a value more than once break out. Otherwise a spelling error (as simple as including leading whitespace) can throw everything off and be very difficult to locate (since it still looks mostly right). Don't use values, use an id, then create a 2nd table which equates each id to the value you want represented. Compare the difficulty of locating an error in these two lists and you'll see why.

San Jose
San Jsoe
San Jose
San Jose
San Jose

1
2
1
3
1

Both of the even numbered positions are incorrect in the first list. The 2nd has the s and o in Jose transposed, a common spelling error. The 4th item as a leading space. One of the wicked problems in web apps is that HTML ignores multiple spaces, so I don't even know if this will appear in the output you're looking at, but it's still there and if you did a SELECT on "San Jose" it would not return that item even though you undoubtedly want it. It's effectively lost. In contrast it's glaringly obvious that the 2nd and 4th list items are incorrect in the second list so they are much easier to correct, in fact, its so much easier that this data would almost certainly never have gotten into the database this way in the first place.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Plz suggest me soon pankajguptag ASP.NET 3.5 Professionals 3 May 26th, 2010 07:06 AM
May I suggest something, Reto? eCubeH BOOK: Professional Android 2 Application Development 2 May 7th, 2010 11:53 PM
Chapter 7- Suggest Stijn BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 July 21st, 2008 03:58 AM
Suggest me Jagadeesh.brk J2EE 2 May 23rd, 2007 10:49 PM
can u suggest me? ujjwal BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 November 18th, 2004 06:18 PM





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