Data Type
A data type is a particular kind of data item, as defined by the variables it can take. While creating a data structure, you need to know the exact type of each variable. For example, you need to specify how you want to store the length of an event. You may store it in different ways like “3-4”, “10cm”, “15” or “13.8”. Note that the data type you choose for a variable must be consistent with all data associated with it.
The following describes data types that are most commonly used in data collections.
- Integer (Int32): It has minimum -2147483648 and maximum +2147483647 capacity.
It can be positive, negative, or zero. - Number (Int16): It has minimum -32768 and maximum +32767 capacity.
It can be positive, negative, or zero. - UInt32 is used to represent 32-bit unsigned integers.
It can store only positive integers.
- Double 64 bit (15-16 digits)
Double Types are probably the most normally used data type for real values, except handling money.
In Ecology, “double” is used quite intensively. - Decimal 128 bit (28-29 significant digits)(Decimal is more precise, great for money value)
- String: A string variable is a normal text.
It could be any combination of characters (a-z and A-Z) and numbers (0-9).
The name of species or places are the most popular variables in string format.