One of the keys to good database planning is correctly anticipating what type of data each field will hold. If a field is expected to only hold integers, it is best to make it an integer field instead of a float or double field. Doing so will save space and time, and the database structure will be more intuitive. Likewise, it is a good idea to fix the number of characters allowed in a string field ahead of time.
Sometimes, though, you may run across data that is incorrectly typed. The most common error is a value that looks like a number but is actually a string of numeric characters – they may look the same, but they certainly don’t act the same. Models, scripts, and geoprocessing tools will go nuts when they try to do math on mistyped fields, and the vague errors thrown may take hours to decode. (I suspect these errors are caused by importing incorrectly typed MS Excel spreadsheets into a database, but don’t quote me on that.)
Comments are closed.