HighDots Forums  

Re: Lengthy recordset question

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: Lengthy recordset question in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gary White
 
Posts: n/a

Default Re: Lengthy recordset question - 07-09-2003 , 12:28 PM






On Wed, 9 Jul 2003 09:14:28 -0500, "Dwayne Epps"
<dwayneepps (AT) centurytel (DOT) net> wrote:

Quote:
I've built a simple ASP application that writes information submitted
through a HTML form to an Access database. Each recordset consists of 16
fields. It all works fine, but I was interested in getting opinions on
whether having a recordset that is 16 columns is too lengthy, and if so,
what is the downside? I know that there are benefits to using multiple
tables in a database, but wasn't sure if in this type of situation, it would
really matter? My next step is to create a page that will retrieve the
information from the database, display it on a page and enable the
administrator to print out the records and or delete them.
What you're talking about is what database geeks (no offense to
anyone) like to call "database normalization." A Google search on the
phrase "database normalization tutorial," it should turn up hundreds,
if not thousands, of pages where you can learn a bit more about it.
The short answer is that, whether or not it's too many, depends
entirely on the data.

The implications of a non-normalized data structure are that
duplicated data bloats the size of your database, data retrieval is
more complex and inefficient and that errors in the data are more
likely because of user error.


Quote:
Also, I noticed when I was testing the app that the primary key (set to auto
increment) will still increment to the next numerical value even when I
delete the RS. So, for example I submit information and the database sets
to 1 (primary key) for the first recordset. I'll delete the recordset in
the database and then test again and the primary key is set to 2 even though
there is only one RS in the table. Is there a way to get the database to
set back to 1 when the RS's have been deleted out?
Any input is appreciated. Thanks.
You may be misunderstanding the purpose of a primary key. The primary
key's sole purpose is to positively identify a given record,
regardless of any data contained in that record. The actual value of
the primary key should be completely meaningless to the data. There
should be no reason to need to reset it and you should never display
it to the user. If users can see it, they'll find a reason to want to
modify it. Primary keys can be used to link related records. Imagine
what happens when you change one. ;-)


Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.