Using the wrong data type can have same major problems.

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

Share

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trust DCAC with your data

Your data systems may be treading water today, but are they prepared for the next phase of your business growth?