0% found this document useful (0 votes)
15 views3 pages

LESSON - 11 Notes

This lesson covers the creation and use of queries in LibreOffice Base, which are essential for retrieving and manipulating data from databases. It outlines three methods for creating queries: using a wizard, in design view, and in SQL view, along with detailed steps for each method. Additionally, it explains how to edit queries and work with numerical data to extract specific information.

Uploaded by

deepaksboa2009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

LESSON - 11 Notes

This lesson covers the creation and use of queries in LibreOffice Base, which are essential for retrieving and manipulating data from databases. It outlines three methods for creating queries: using a wizard, in design view, and in SQL view, along with detailed steps for each method. Additionally, it explains how to edit queries and work with numerical data to extract specific information.

Uploaded by

deepaksboa2009
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

LESSON – 11

QUERIES IN LIBRE OFFICE BASE NOTES


1. INTRODUCTION
✓ A database is used to store data in an organized manner. Queries are used to
retrieve the desired data easily and accurately from database.
✓ In other words, we can say that a query is a sort of question asked from a
database.
✓ A query is one of the most important feature of DBMS.
✓ We can retrieve and display data from one or more tables in a database.
✓ LibreOffice Base allows us to create a query and even save it as an object in a
database.
✓ This helps to run the query multiple times and when required.
✓ Using a query, we can specify the fields that we want to display and also the
criterion based on which the records to be filtered.
✓ The result of the query is displayed in tabular form with field names in
columns and records in rows.

2. Queries

✓ A query is to collect specific information from the pool of data.


✓ A query helps us to join information from different tables and filter that
information.
✓ Queries are commands that are used to define the data structure and
also to manipulate the data in the database.

3. Creating a Query

A query can be created in 3 ways.

✓ Using a wizard
✓ In design view
✓ In SQL view
4. Steps to create a query using a wizard

✓ Open the database > Queries button in the Database pane


✓ Task Area > Use Wizard to create query option
✓ The query wizard will open > Select the required table and fields > Next.
✓ Select ascending or descending order for any field > Next
✓ Set conditions or criteria if needed > Next
✓ Give Alias name if needed > Next
✓ The last step of the query wizard displays the entire overview of the
query.
✓ Click on finish button.

NOTE
1. Clicking on >> button moves all fields to “Fields in the query”
area.
2. By default, the field names will be displayed as column headers.
3. Sometimes field names are not user friendly, so an alias name is
more readable and required.
3. Once the query is created, it can be edited in Design view.
4. By default, the name of the query is Query_Table1.

5. Steps to create a Query in Design view

This is a more flexible method.

✓ Queries icon on the objects pane in Database window.


✓ Click create query in Design view in Task pane > the query design
window appears.
✓ In the middle of the window the Add Table or Query dialog box will
display.
✓ Select the Table and click on Add button > Close button in Add Table to
close it.
✓ Select the fields to display > set alias name and sort if needed
✓ Click Run query or press F5 > save the query.

NOTE
1. Observe that the visible check box is selected by default.
2. The query result will be displayed in the Tables Pane area.
3. By default, the name of the query is Query1.
4. To close the Query window, click on close button on the top right
corner of the window.

6. Editing a Query

✓ Right click on the query name which you want to edit in the objects area
of the database window.
✓ Select Edit option from the drop down menu. The query design window
will be displayed.
✓ Make the required changes like change the Alias, apply criteria or edit
the existing criteria etc.
✓ Save and close the query window.

7. Working with numerical data

✓ In the database window, click create query in design view


✓ Select the required field to display.
✓ Select the function “Maximum” from drop down list of functions under fees.
✓ Run the query.

You might also like