Reference List of Field Data Types in LibreOffice Base

778 views

This page contains an index of Table field data types in LibreOffice Base, which you should learn before you design your database.

When you design your database and tables, you should always consider what data types your fields would hold. That includes the basic data to larger data sets when your database grows.

Also, you need to keep in mind the size of your data to match the field types.

LibreOffice Base’s built-in HSQLDB database structure brings many data types to your database tables. Here’s a quick list of those for your reference.

Field data types in LibreOffice Base

You can find the following list of types while designing a table and specifying its type. See the below image where you assign these fields.

LibreOffice Base Filed Data Types
LibreOffice Base Filed Data Types

So, before you assign a field type, as shown above, consider their range of values and storage in memory, as mentioned in the tables below.

Numeric Data types – Integer

TypeField Type in BaseHSQLDB TypeRange of valuesStorage in memory
Tiny IntegerTINYINTTINYINT2^8 = 256 | – 128 to + 1271 Byte
Small IntegerSMALLINTSMALLINT2^16 = 65536 | – 32768 to + 327672 Bytes
IntegerINTEGERINTEGER | INT2^32 = 4294967296 | – 2147483648 to + 21474836474 Bytes
BigIntBIGINTBIGINT2^648 Bytes

Numeric Data types – Floating

TypeField Type in BaseHSQLDB TypeRange of valuesStorage in memory
DecimalDECIMALDECIMALUnlimited, up to 50 places in the GUI, fixed decimal point, perfect accuracyvariable
NumberNUMERICNUMERICUnlimited, up to 50 places in the GUI, fixed decimal point, perfect accuracyvariable
FloatFLOAT(DOUBLE used instead)  
RealREALREAL  
DoubleDOUBLEDOUBLE [PRECISION] | FLOATAdjustable, not exact, 15 decimal places maximum8 Bytes

Text field types

TypeField Type in BaseHSQLDB TypeRange of ValuesStorage in memory
TextVARCHARVARCHARAdjustablevariable
TextVARCHAR_
IGNORECASE
VARCHAR_
IGNORECASE
Adjustable, range affects sortingvariable
Text (fix)CHARCHAR | CHARACTERAdjustable, rest of actual text replaced with spacesfixed
MemoLONGVARCHARLONGVARCHAR variable

Time field types

TypeField Type in BaseHSQLDB TypeRange of ValuesStorage in memory
DateDATEDATE 4 Bytes
TimeTIMETIME 4 Bytes
Date/TimeTIMESTAMPTIMESTAMP | DATETIMEAdjustable (0.6 – 6 means with milliseconds)8 Bytes

Misc field types

TypeField Type in BaseHSQLDB TypeRange of ValuesStorage in Memory
Yes/NoBOOLEANBOOLEAN | BIT  
Binaryfield (fix)BINARYBINARYLike Integerfixed
Binary fieldVARBINARYVARBINARYLike Integervariable
ImageLONGVARBINARYLONGVARBINARYLike Integervariable, intended for larger images
OTHEROTHEROTHER | OBJECT  

Wrapping Up

While assigning the field type during table design, consider the types of data it holds. And also consider what the prospects of that field – whether it can grow to hold more data. And assign accordingly.

I hope this helps you to design your Base database with proper data types. And do let me know in the comment section if you have any questions.

Join our Telegram channel and stay informed on the move.

arindam

Creator of libreofficehelp.com. The aim is to help as many people as possible with easy-to-understand tutorials. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments