Welcome Guest ( Log In | Register )



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Stop AUTO_INCREMENT From Jumping
Darasen
post Apr 17 2008, 06:19 AM
Post #11


Member - Active Contributor
Group Icon

Group: [HOSTED]
Posts: 97
Joined: 3-April 08
From: Milling about
Member No.: 29,596



Perhaps this is the same poster I just replied to.

The auto increment will not go back and fill in blank numbers from deletion. this is for a VERY good reason. One being that the number is still in use tucked away in the hidden system tables of the RDBMS. If it is important that your auto increment numbers are all sequential, especially if it's your primary key, then your data model and/or programming flat out stink.

Believe me when i say the people that developed the RDBMS in the first place know what they are doing. This behavior is normal and preferred. Thsi auto number also holds things like user id and timestamps with those id's that are supposed to remain unique for good reasons.
Go to the top of the page
 
+Quote Post
Habble
post Apr 19 2008, 03:28 AM
Post #12


Premium Member
Group Icon

Group: [HOSTED]
Posts: 255
Joined: 17-June 07
From: Tasmania
Member No.: 22,699



QUOTE
Perhaps this is the same poster I just replied to.

The auto increment will not go back and fill in blank numbers from deletion. this is for a VERY good reason. One being that the number is still in use tucked away in the hidden system tables of the RDBMS. If it is important that your auto increment numbers are all sequential, especially if it's your primary key, then your data model and/or programming flat out stink.

Believe me when i say the people that developed the RDBMS in the first place know what they are doing. This behavior is normal and preferred. Thsi auto number also holds things like user id and timestamps with those id's that are supposed to remain unique for good reasons.

I dont under stand this at lol
Go to the top of the page
 
+Quote Post
Sten
post Apr 19 2008, 03:42 AM
Post #13


Oh come on Mrs. B!
Group Icon

Group: Members
Posts: 648
Joined: 6-June 07
From: Tasmania, Australia
Member No.: 22,422



Then why post?

And for god sakes when you're quoting someone KEEP THE QUOTE TAGS AROUND IT
Go to the top of the page
 
+Quote Post
Darasen
post May 6 2008, 05:02 AM
Post #14


Member - Active Contributor
Group Icon

Group: [HOSTED]
Posts: 97
Joined: 3-April 08
From: Milling about
Member No.: 29,596



QUOTE(Habble @ Apr 18 2008, 11:28 PM) *
...

I dont under stand this at lol


I know this thread is a bit older but given my previous response does not seem to have been clear enough I thought that I would clarify. Firstly RDBMS = Relational Database Management System - Such as MySQL Oracle SQL Server and so on. the RDBMS should not be confused with the term database as a database is your personal collection of data whereas the RDBMS is the underlying program that supports the data and allows you to manipulate the data. Thus calling MySQL a database is like calling MS word an office document.

QUOTE
The auto increment will not go back and fill in blank numbers from deletion. this is for a VERY good reason. One being that the number is still in use tucked away in the hidden system tables of the RDBMS.
In every database there are system tables as well the normal data tables. The system tables are placed in the database by the RDBMS. These system tables store information such as the names of the databases tables, the names and data types of the fields in tables and so on. These system tables also store what auto increment numbers have been used. These system tables are very important and should not be played with.

QUOTE
If it is important that your auto increment numbers are all sequential, especially if it's your primary key, then your data model and/or programming flat out stink.


This statement seems fairly self explanatory. I can think of no reason whatsoever why an auto increment field would need to be sequential. For the Primary Key of a table there is no reason at all. Primary keys need always to be unique. A primary key should never ever be reused. Just for example what happens if you need to restore a table where you have reused the primary key but, the backup has the original owner of that PK. Your data in that table and the ones related to it are not going to congruent.

Lastly all because you may not have a record in your database any more does not mean that the RDBMS does not know it was there. In the database logs there will be activity records for the primary keys of what has been done to record when and by whom.

Perhaps this more lengthy explanation clarifies my previous post or maybe it has obfuscated it.
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Stop anything from making it ur homepage!(52)
  2. Meta Tags(17)
  3. Grand Theft Auto: San Andreas(109)
  4. My Theory Of Betting(10)
  5. VB: Howto Auto-select Last Item In Listbox(5)
  6. How To Make Hotmail Auto Forward Mails?(12)
  7. Ever Needs To Find Out A Table Height Or With With JavaScript(2)
  8. IE And It's Annoying NBSP (Non-Breakable Space)(2)
  9. Orkut.com Auto Scrapper - Scrap Ur Friend List In One Go(11)
  10. A Special Grand Theft Auto Vice City Topic(5)
  11. Auto Responder Script(6)
  12. Auto Logout By Astahost(6)
  13. How To Auto Navigate Using Frames?(2)
  14. Stop Smoking, Save Thousands!(51)
  15. Game: Stop Stop -> How Timely Are You?(6)
  1. Auto-number Help In Access Db & Vb .net(6)
  2. A Gaiaonline Problem(6)
  3. Auto Screen Position Changing Possible?(5)
  4. 10 Extremely Useful Websites To Stop Big Brother From Snooping On You(5)
  5. Need Help In Database Auto_increment(9)
  6. Auto-click Script(6)
  7. Grand Theft Auto 4 Launch Date(5)
  8. Auto Suspend Activated(1)
  9. Laptop Auto Starts After Turning It Off(7)
  10. Auto_increment Jumping About(3)
  11. Grand Theft Auto Iv(10)
  12. Auto Volume Controller For Windows(0)
  13. Opensuse: Stop Asking Root Password(5)


 



- Lo-Fi Version Time is now: 6th July 2008 - 09:47 AM