You are on page 1of 10

LibreOffice Base

Creating a database & relational tables.


A TU TORI A L BY CA S S I E J . M ORRI S S EY
New to Base?
Create a new database with relational tables in a few easy steps.
1. Launch LibreOffice Base
2. Create a new database
3. Create your tables
4. Set your index keys
5. Define the relationships between your tables
6. Work with your data!
1. Launch LibreOffice Base

v Open LibreOffice and


choose the Base app to
launch.

Click the Base app icon to


launch LibreOffice Base.
2. Create a new database.

vCreate a new database


using the wizard.

Make sure create a


new database is
selected and click
next.
2. Create a new database (continued)

v Choose the settings that best fit


your use.
v Click Finish to name and save
the database in your preferred
location.
If youre creating a common database type, there
may be templates available for you in the table
wizard.
Im choosing to leave it blank and create my tables
from scratch.
3&4. Create your tables & set your index keys
v Carefully enter your table fields
and data types into the
spreadsheet.
v Click the save icon when
finished. You will have to create
an index key for the table in order
to save it (see image to the right).
vThe primary key should be a field
that is unique for every record.
vCreate your key and close the
table.
v Repeat as necessary for An index key must be assigned for each table you create.
additional tables.
5. Define the relationships between your tables.

v With all of your tables saved and


closed, navigate to the Tools ->
Relationships menu.
v You will need to add tables to
work with in the relationships
editor. (see image to the right).

Use the add button to add any tables that


you want to relate to one another.
5. Define the relationships between your tables (continued)

v Within the relationships editor,


you may drag a field from one
table onto the related field in
another table (see image at right).
v Related fields must be of the
same type (text, integer, decimal).
vDouble click on the blue
connecting bar to open the
relationship settings dialogue. Double clicking on the connecting bar opens
the relationship settings dialogue.
5. Define the relationships between your tables (continued)
vIf the setting dialogue doesnt
open, click on the icon highlighted
in yellow here.
v Make sure the related fields are
displayed for each of your tables.
vChoose update cascade.
vClick OK

Choose update cascade for update


options and no action for delete
options.
6. Get ready to work with your data!
Your database and related tables should be ready to go.

Congratulations, the backbone for your database is


set up and configured. Now you can create forms
and get started working with your data!