On 08/15/2012 04:31 PM, Thomas Taylor wrote:
It's been way too many years since I did commercial programming on
databases and I've forgotten some of the terms (formats) for numerical
data. I'm trying to create a simple database of local
facilities/doctors/stores with Base using the wizards. The formats that
are giving me trouble are:
Text[VARCHAR]- a variable number of type CHAR?
Text(fix)[CHAR] - does that mean a fixed number of CHAR?
Integer[INTEGER] \
Numeric[NUMERIC] How do these differ?
Decimal{DECIMAL] /
I looked in LibreOffice help but couldn't find the definitions. Some
help would be appreciated.
For instance, which format is used for a telephone number?
(1.800.123.4567)?
Thanks, Tom
varchar(60) is a text string up to 60 characters long. I believe the
actual memory usage is based the number of characters in the string
char(15) is a text string up to 15 characters long but enough memory is
always used for 15 characters.
The length of varchar and char can be set to other lengths.
integer is an integer only and can be positive or negative. I did not
look up the range for Base (-minint to +maxint).
numeric and decimal are floating point numbers of varying precision and
size. You can specify the number of decimal places as well as the size
of the number (decimal(10,2) has 10 total places with two decimal
places) .Some db's use decimal for currency, I am not sure what the
advantage of numeric versus the other floating numbers such as float and
double. I mostly use MariaDB which does not have the numeric type
explicitly available. Again you have both positive and negative values.
I believe numeric is the full possible range while decimal is restricted
by its initial definition.
--
Jay Lozier
jsloz...@gmail.com
--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted