Using the wrong data type can have same major problems.

Published On: 2010-10-11By:

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


Contact the Author | Contact DCAC

Video

Globally Recognized Expertise

As Microsoft MVP’s and Partners as well as VMware experts, we are summoned by companies all over the world to fine-tune and problem-solve the most difficult architecture, infrastructure and network challenges.

And sometimes we’re asked to share what we did, at events like Microsoft’s PASS Summit 2015.

Awards & Certifications

Microsoft Partner    Microsoft MVP    Microsoft Certified Master    VMWare Partner    VMWare vExpert
   Best Full-Service Cloud Technology Consulting Company    Insights Sccess Award    Technology Headlines Award    Golden Bridge Gold Award    CIO Review Top 20 Azure Solutions Providers
Share via
Copy link