Add a Boolean Field Type to Personal and File Geodatabases

03-01-2012 12:48 PM
Status: Open
New Contributor III
One thing that ArcGIS is missing on the tabular side of the geodatabase data model is a boolean field (that is, a field that be set to True or False only).  Currently, geodatabase users have two bad options for modeling boolean data in a table:

1) Use a text field.

This way is poor because there are too many ways to model the same two values (true and false).  The user can use a field with no subtypes and use 'Y' and 'N'.  Or, the user can use 'T' and 'F'.  Or, the user can use 'True' and 'False'.  Or, the use can add subtypes and enforce two of the many combinations of words and letters than can represent 'True' and 'False'.

2) Use a short integer field

This way is a little bit better than a text field, but there are still multiple ways to represent true and false in this context.  Should the user follow the model of Microsoft Access and use -1 to represent true and 0 to represent false?  Should the user follow the model of binary numbers and use 1 to represent true and 0 to represent false?  Also, if the user is going to go this route, he or she should probably set domain minimum and maximum values or subtypes in order to prevent other users from entering values other than the two chosen to represent true and false.  This seems like an unnecessary step, and it still doesn't solve the consistency problem.

Adding a boolean field type would solve all of the above ambiguities by creating one go-to datatype for true/false data instead of the theoretically infinite number of choices that people can and do choose between in order to model true/false data.  It would greatly simplify querying of such fields and reduce users' reliance on metadata (which many data creators don't fill out properly anyway).  Also, it would be pretty easy to fall back on one of the above methods (I recommend 1 = true and 0 = false integer fields) when exporting to a datatype that doesn't support the boolean field (some ArcSDE datasources, shapefiles).
1 Comment
I completely agree.  The number of workarounds for this problem compounded by inconsistencies in metadata and completeness are very frustrating.  I don't believe ESRI supports the use of boolean fields in any of their data formats since not all platforms support boolean (think dBASE).  

Times are changng, ESRI.  You can handle native SQL Server spatial types, so I think you can handling booleans would be far less work.