Understanding Databases
Key Concepts A database is a collection of data stored in tables to be easily accessed, managed, and updated. Examples might be a shop’s stock inventory or airline booking system. Tables are split up into records (rows) and fields (columns) … Take lesson
Working with Databases
Open a database application To start LibreOffice Base, search from the ‘Start’ menu or find the LibreOffice folder and click the LibreOffice Base icon. Open an existing database To open an existing database, choose the option ‘open an existing database … Take lesson
Understanding Databases – Glossary Of Terms
AND A logical operator that is used in queries to state that values must satisfy all of the set criteria. Autovalue A feature that can be attributed to data under a certain field (often the primary key) of a table … Take lesson
Common Database Tasks
Tables Tables are used to store records (pieces of data) within a database. Records are entered into tables under fields that are created when editing the table. Fields are similar to the headings given to columns in a spreadsheet. An … Take lesson
More Common Database Tasks
View a table in design mode Right click the table, query, form or report in the relevant area and select ‘Edit’ This will open the table, query, form or report in a design mode window Navigate between records in a … Take lesson
Understanding Databases – Tables & Records
Add or delete records in a table To add a record, click a cell in the table. Enter valid data into the cell, for instance, for Start Date, make sure you enter it in a date format. If you move … Take lesson
Understanding Databases – Tables Design
Create a table To create a table, click ‘Tables’ in the Database area. Then click ‘Create Table in Design View’ from the Tasks area to open table design window. In this example, we’re going to create a table that holds … Take lesson
Understanding Databases – Managing Tables
Set a field as primary key To set the primary key, right-click the grey box to the left of the field you want to set as primary key. Check the ‘Primary Key’ option and a yellow key symbol will appear … Take lesson
Understanding Databases – Retrieving Information
Use the search command to find specific data in a field This tutorial demonstrates how to find specific records within a table. This won’t cover forms or reports, which can do the same thing but display the data in a … Take lesson
Understanding Databases – Create a named single table query
Queries are used to extract and analyse data from tables. Click on the Queries icon, then select Create Query in Design View. The single table query will use the ‘Company employees’ table created in a previous tutorial. In the ‘Add … Take lesson
Understanding Databases – Create a named two-table query
To create a two-table query, first make sure you have created a second table. The two-table query will use the ‘Company employees’ table created in a previous tutorial. Use the table design view to create a table containing personal phone … Take lesson
Understanding Databases – Modify Reports
Change arrangement of data fields and headings in a report Click ‘Reports’ from the Database area of the main window and right click the report you want to change in the Reports area. Click ‘Edit’ from the drop down menu. … Take lesson
Understanding Databases – Create a conditional query
Add criteria to a query using ‘NOT’ logical operator From the Queries area of the main window, right click the query and click ‘Edit’. In the Criterion row, add criteria that uses the ‘NOT’ logical operator, e.g. in Description field … Take lesson
Understanding Databases – Edit and Run a Query
Edit a query: add, modify, remove criteria Click the criteria you want to modify or remove, highlight it then press delete to remove or type to modify it. To add criteria in another field, simply click on the Criterion cell … Take lesson
Understanding Databases – Forms
Understand that a form is used to display and maintain records. Forms display records one at a time in a format that can be customized. Rather than reading the data from a table, it can be laid out in a … Take lesson
Understanding Databases – Create and Name a Form
The simplest way to create a new form is to use the ‘Wizard’. Click the ‘Forms’ section in the Database area of the main window and select ‘Use Wizard to Create Form’ from the Tasks area. Use the drop-down menu … Take lesson
Understanding Databases – Using Forms
Use a form to insert new records To insert a new record, click the ‘New Record’ icon on the form navigation toolbar. You can enter the data straight into the field boxes on the form. Note that if you have … Take lesson
Understanding Databases – Reports
Understand that a report is used to print from a table or query Reports are used to extract data from a table or query, by exporting to a printable text file. It can be saved and run again if more … Take lesson
Understanding Databases – Create a Report
Create and name a report based on a table or query Begin by clicking ‘Reports’ in the Database area of the main window, then click ‘Use Wizard to Create Report’ from the Tasks area. In the Report Wizard window, select … Take lesson
Understanding Databases – Grouped Reports
Either create a new report through the wizard or edit an existing report in Report Design View. To group fields, click on the ‘Sorting and Grouping’ icon on the toolbar. Grouping fields will stop information from being duplicated, for instance … Take lesson
Understanding Databases – Present Specific Fields
Present specific fields in a grouped report For this section, create a new table to display salary and another to display bonuses. This data will require a grouped report to display correctly as there are multiple entries for employee-ID. Next, … Take lesson
Understanding Databases – Present Fields By Sum
Present specific fields in a grouped report by sum The ‘sum’ function will add together all the records in a specified field. Therefore, the sum function can only be applied to numerical fields. Reports allow you to present fields as … Take lesson
Understanding Databases – Present Fields By Minimum or Maximum
Present specific fields by maximum or minimum You can present fields in a report using maximum or minimum functions, again without the need for a query. The function is applied directly to the field to either display the minimum or … Take lesson
Understanding Databases – Present Fields by Average and Count
In LibreOffice Base, the simplest way to present specific fields using average or count functions is to create a query first. Average will return the mean average of the field, therefore it requires numerical data. Mean average is calculated by … Take lesson
Understanding Databases – Report Headers and Footers
Add, modify text in headers, footers in a report. Open a report in design view, by right clicking the report in the main window and selecting edit. To add text to a header or footer, first click ‘Label Field’ from … Take lesson
Understanding Databases – Export to Spreadsheet or Text
Export a table, query output in spreadsheet or text Open a table or query by double clicking from the main window. Select File -> New -> Spreadsheet to open a new Libreoffice Calc spreadsheet. Minimize the spreadsheet for now. To … Take lesson
Understanding Databases – Printing
Change the orientation and paper size Orientation is the format in which the page displays, either in portrait mode where the page is displayed with the long edge vertical, or landscape, where the longer edge is horizontal. To change the … Take lesson