Page 43 - Touchpad_Plus_V3.2_Class 8
P. 43

QUERIES IN LIBREOFFICE BASE

                 A query is one of the most powerful features in LibreOffice Base, allowing you to retrieve specific
                 information that may not be easily visible in the tables directly. With a query, you can search or
                 compile data from one or more tables in a database by giving specific search conditions so that
                 enables  to view the exact data that you want. Queries in Base are primarily used to display and
                 analyze data. Once created, a query can be saved in the database and run multiple times for
                 efficient data retrieval.
                 Types of Queries

                 The different types of queries in LibreOffice Base are:

                    Select Query: It retrieves specific data based on conditions, displaying chosen fields from one
                   or more tables.

                     Parameter Query: It is a type of select query which prompts you for the input before it runs.
                   The query then uses the input as the criteria that controls the result.

                     Action Query: It creates a new table or alters your data by adding, deleting, updating and
                   appending data from it.

                     Crosstab Query: It is a query that organise data into a table where rows and columns show
                   different categories.

                    Aggregate Query: This type of query is used to perform calculations on a group of data. It
                   allows you to summarise or analyse data by applying functions such as, SUM, AVG, COUNT,
                   MIN, and MAX to selected fields.
                 Setting up Relationship

                 A relationship is a link that associates a field in one table with the same field in another table. It
                 works by matching a field with the same name in both the tables. The matching fields are the
                 Primary Key from one table that uniquely identifies each record in a table.

                 A Foreign Key is a column in one table that must match the Primary Key of another table.
                 To create a relationship, create two tables:

                     Table named Student that holds general information about the students such as their Roll No,
                   Student Name, Father’s Name, Mother’s Name, Date of Birth, etc.

                    Table named Fee that holds information about Reg No, Roll No, Fee, etc.







                                                   Using tables for defining relationship
                 To define relationship between the two tables, follow these steps:
                 Step 1  Click on the Relationships option from the Tools menu. The Add Tables dialog box
                          will open.



                                                                                      More on LibreOffice Base       41
   38   39   40   41   42   43   44   45   46   47   48