Quick Guide to LibreOffice Base

Introduction

This quick guide was written while using LibreOffice 4.2.0.4 on Windows.

Note that LibreOffice Base is actually a front-end to the Java-based HSQLDB database application, which is why LibreOffice requires installing the JDK/JRE for Base to work. If more than one user needs to access the data, it's possible to move to the server-based HSQLDB later to share data.

Getting Started

To create a new database, Launch LibreOffice, and in the left hand-side, select Base Database. By default, it will create a local file and use the HSQLDB format.

"Create table" lets the user create tables and fields manuall, while "Use Wizard" shows pre-set tables and fields.

Base Handbook - Reading Notes

"The majority of relationships between tables in a database are one-to-many relationships."

"The library might contain more than one book by one author. It might also contain books with multiple authors. This relationship is known as many-to-many (n:m). Such relationships require a table that acts as an intermediary between the two tables concerned. Thus, in practice, the n:m relationship is solved by treating it as two 1:n relationships. "

"Databases that consist of only a single table usually do not require an input form unless they contain a field for images. However as soon as a table contains foreign keys from other tables, users must either remember which key numbers to enter or they must be able to look at the other tables simultaneously. In such cases, a form is useful."

"Forms are used whendirect entry into a table is inconvenient, to pick up errors in data entry promptly, or when too many tables make direct management of data impossible."

"Views in SQL are quicker than queries, especially for external databases, as they are anchored directly into the database and the server returns only the results. By contrast queries are first sent to the server and processed there."

Q&A

Since Base is just a front-end, what value does it add to plain HSQLDB?

Registering database with LO?

When creating a new database, LO prompts the user to register the DB: What is it? "A database which is registered in LibreOffice can be accessed by other program components as a data source (for example, mail merge). This registration process can be carried out at a later stage if desired."

What is an "external database"?

Any database that requires some connector to be accessed, either file-based or network-based (JDBC, ODBC.)

Resources