SQL Server with Mr. Denny

Oct 11 2010   11:00AM GMT

Using the wrong data type can have same major problems.



Posted by: Denny Cherry
Tags:
Data Types
SQL Server

Apparently this weekend a small company which does something very important discovered the upper bounds of the INT datatype (or the equivalent in what ever database platform they are using).  This makes it very clear that whoever designed the database for them didn’t do a very good job designing the database, because if they had they would have found this little problem a while ago and fixed it well in advance.

In case you didn’t click through to the slash dot article, or passed it to the actual article the company which holds the contracts with 49 states parole agencies for parolee GPS monitoring wasn’t able to record where the people being monitored were for about 12 hours.  The /. article says that the had a little over 2 Billion records in the table.  A little thinking and that sounds an awful like the upper bounds of a 32bit integer (aka the INT data type is you start at 1 instead of the lower bound of the data type).  If the database designer had selected to use a 64bit integer (aka BIGINT) then the table would have been able to store 9,223,372,036,854,775,807 records (assuming they started at 1and not the lower bound of the data type).

Now I’ve got no idea how long the database has been collecting data, but how ever long it was, it probably wasn’t all that long (maybe 5 years tops) and using the 64bit integer would have let the system last for much, much longer.

Thus endith the rant.

Denny

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: