X
Home & Office
Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.

Close

How to create a database with LibreOffice

Databases are a great way to keep track of everything from personal collections to customer data. LibreOffice includes a powerful database tool. Here's how to get started.
Written by Jack Wallen, Contributing Writer
zd-stackby-database.jpg

Databases can come in handy. You can use them to inventory your record collection, to store information about clients or customers, to keep track of your Magic the Gathering cards, and everything in between. If you have a need to store lots of information (and to be able to easily search for it) a database can certainly make things a bit easier for you.

If you use (or need to use) the LibreOffice office suite, it includes a built-in database tool that can create powerful databases to fill those needs. Although it might not be as simple as creating a new document or spreadsheet, it's not nearly as challenging as you might think.

Let me show you how.

Creating your first database

What you'll need: To create your first database, you'll need the full LibreOffice suite installed and a user with admin privileges. Because you must also install Java (to use the table wizard), you have to be logged in as a user who can install software. I'm going to demonstrate on Ubuntu Budgie, but I'll help you get started on both MacOS and Windows as well. The only difference between the three is how you install Java.

1. Install Java

The first thing to do is install Java. If you're using MacOS, download the Java .dmg installer and install it as you would any application. If you're OS of choice is Windows, download the Windows .msi installer, double-click it, and follow the instructions. For a Ubuntu-based Linux distribution, you can install the necessary package with the command:

sudo apt-get install default-jre -y

Also: How to set the next style in LibreOffice and why you should

2. Open LibreOffice and create a new database

Open LibreOffice. If you open a Writer document, you can then click New > Database.

The LibreOffice File menu.

Creating a new database from the LibreOffice Writer File menu.

Jack Wallen/ZDNET

3. Select the database type

In the first screen of the wizard, leave everything as is and click Next.

The first screen of the database creation wizard.

The embedded database is good enough for small to medium-sized collections of data.

Jack Wallen/ZDNET

4. Enable the table wizard

In the resulting screen of the wizard, make sure to click the checkbox for Create tables using the table wizard. This will open the wizard, which will walk you through creating the necessary tables for your database. After you've done that, click Finish and you'll be prompted to name your database.

The save and proceed page of the wizard.

You'll want to use the table wizard, which vastly simplifies the creation of your tables.

Jack Wallen/ZDNET

4. Select your fields

You can select from a wide range of fields (or collection of fields). For example, select Personal from the Category, and then, from the Sample Tables drop-down, you could select CD collection. Once you've done that, you can select whatever fields you want to add by clicking one and then clicking the right-pointing arrow to add it. Keep adding fields until you're happy with the selection. Once you have your fields added, click Next. In the next two screens, you can customize the types and formats and set a primary key. Since this is your first database, you click Next through these two. 

The field selection window of the wizard.

After selecting the fields you want to add, slick the single right-pointing arrows to add them to the right column.

Jack Wallen/ZDNET

5. Finish the database

On the final screen of the wizard, give your table a name, select Create a form based on this table, and click Finish.

The final screen of the database creation wizard.

Make sure to click Create a form based on this table before clicking Finish.

Jack Wallen/ZDNET

6. Create a form

The database form creator will open with a new wizard. This makes it possible for you to create a form that will allow you to easily enter data into the database. The form creator is simple to use. First, you select the fields you want to add to the form (all of which you added during the database creation). Next, you can set up a subform (which you probably won't need). In the next screen, you can arrange the controls for your form. After that you'll select if the form is used to only enter new data or if it will be used to enter new data and display all previously entered data. You can then add a style to the form and give the form a name. Once you've taken care of that, your form is ready to use for entering data into your database.

The LibreOffice form creator for databases.

The form creation tool is fairly straightforward.

Jack Wallen/ZDNET

And that's all there is to create a new database with the free, open-source LibreOffice office suite. Once you get the hang of using this tool, you'll find it incredibly helpful for keeping track of either personal or business information (without having to save that data to a third-party cloud service).

Editorial standards