Site icon libreofficehelp.com

Create Database and Table in LibreOffice Base [Beginner’s Guide]

In this article, we will talk about how to create simple database and a table. And then add some data to the table.

1 . Create Database and Tables in LibreOffice Base

To create a database, open LibreOffice Base from the application menu. Typically you should see a window like the one below.

Here you have three options.

First, you can go ahead and create a brand new database for your work.

Second, if you have already created a database, then open that from this window.

And thirdly, you can connect to an external data source. LibreOffice supports a wide range of datasource with modern protocols.

Create database – LibreOffice Base

As of LibreOffice Base version 7.4.3, the following external database or datasource are supported.

2. Create database in LibreOffice Base

final step on creating a database in LibreOffice Base

What is registering database? When you register the database file, it tells LibreOffice on how you data in the database is structured, saved and other details. And you can access the LibreOffice Base database file as datasource in other applications. The register option is available under Tools > Options > LibreOffice Base > Database. This is for manual register and de-register a database.

Congratulations! You have now created a database. Now, let’s take a look how you can create a table.

3. Create table in LibreOffice Base Database

Then main LibreOffice Base window gives you access to it’s main four core features:

See at the left section of this below image. You can select your tasks after choosing database actions.

LibreOffice Base main window

For this tutorial, select Tables and click on “Create Table in Design view“.

LibreOffice base will open a table design window where you can add the columns and their column properties. In the first grid, enter the column names (under “Field Name“) and the type (under “Field Type“) of it. At the bottom, you have additional options to create a table. See this image for detailed clarification.

If you are unsure about the field type, such as VARCHAR, TEXT, or INT – refer to this index on what you should choose for your table.

Create table and add columns

Ideally, you should have a primary key for each tables. Primary key column contains unique data which can be used to find out a particular row of record via SQL or programming. To assign a column as primary key, right click on the column name and select Primary Key check box from the context menu.

Only one column should be a primary key column. In addition, if you want to remove the Primary Key assignment, right click again and uncheck the option.

Create a primary key

Once you are satisfied with all the information, click on Save to save the table. During saving, LibreOffice Base will ask for the table name which you can mention.

Save the table

4. Inserting Data to the table in LibreOffice Base

Once you saved the table, you should see it in the main LibreOffice Base Database window. Now you can right click on it to get several option which you can do on the table.

To add some data to the table, right-click and select Open.

Open the table for data entry

Now, you can start entering the data for each of the column you created in LibreOffice Base. This grid works as a simple spreadsheet. And the data you enter are autosaved. The total number of records are shown at the bottom.

Once you are done you can close the window.

Inserting data in your table

And that’s it. You have successfully created a database, a table and added some data as well. Now you can create more tables as per your needs.

Wrapping Up

In this article, you learned how to create a simple database in LibreOffice and create tables. Stay tuned for more articles in LibreOffice Base.

Exit mobile version