Page 329 - TP_IT_V1.0_C10_flipbpookl
P. 329

WHAT IS A QUERY?

                 Query is a set of commands that retrieve and display data from one or more tables in a database. This is done by giving
                 specific search criteria to the DBMS so that we can view the exact information that we want. The result of the query is
                 displayed in tabular form with field names in columns and the records in rows.

                 A query is of great help when information is required to be extracted from different tables. It uses the process of
                 filtering the information based on the criteria from the table.

                 Filtering can be defined as the process of using a query to filter the records based on the criteria so that only the
                 records matching the criteria will be available to the user thus hiding the data which is not needed.

                 LibreOffice Base allows us to create a query using Structured Query Language (SQL) and even save it as an object in a
                 database. This helps to run the query multiple times as and when required.

                 Creating a Query
                 The steps to create a query is to select the Queries object in the Database pane. There are three different methods
                 used to create a query in the LibreOffice Base. These are:
                 •  Create Query in Design View

                 •  Use Wizard to Create Query
                 •  Create Query in SQL View
                 Creating a Query in Design View
                 A design view helps you design a query by specifying the tables and the criteria. Let us design a query to display the list
                 of students with their marks. The query will have – Adm No., Name from STUDENT table and Total Marks, Grade, and
                 Percentage from the MARKS table.

                 The steps to design a query using a Design view are as follows:
                 Step 1:  Select the Queries icon on the Database pane in the LibreOffice Base window.
                 Step 2:  Select the Create Query in Design View option under the Tasks pane.

                         The Query Design window open with the Add Table or Query dialog box.


































                                                                        Database Management System using LibreOffice Base  327
   324   325   326   327   328   329   330   331   332   333   334