Data Types

One problem GDA tries to hide from the user is the difference of data types as they are stored in the database and how they are used by the application. An easy example is the representation of prices. They are a fixed floating point number with two digits after the decimal point. Most databases allow you to specify a DECIMAL datatype with a length and a precission. In C no such datatype exists. You might want to store the value as a string, which is also often convenient for displaying, but not for computing taxes or other things. GDA therefore decouples the storage type of a column from the type the user wants. This is done via the GDAType of a value. The database capability to convert between different data types is used if available. Otherwise the type conversion is done in the client. Converting the data in the server may lead to unpredictable results when the server is a 64bit machine and the client is a 32bit machine.

Available Data Types

Here will be a list of GDA data types, their C and SQL equivalents, and the allowed conversions.