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

Chapter -11 Queries in a Database Class x It

This document explains queries in a database, defining a query as a method to request specific information and outlining its necessity for filtering, retrieving, sorting, and combining data. It details the steps to create a query using a wizard, the concept of aliases for fields, and provides examples of criteria and sorting orders. Additionally, it lists mathematical functions applicable to numerical data and describes three methods for creating queries in LibreOffice Base.

Uploaded by

goyalshaurya280
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)
167 views3 pages

Chapter -11 Queries in a Database Class x It

This document explains queries in a database, defining a query as a method to request specific information and outlining its necessity for filtering, retrieving, sorting, and combining data. It details the steps to create a query using a wizard, the concept of aliases for fields, and provides examples of criteria and sorting orders. Additionally, it lists mathematical functions applicable to numerical data and describes three methods for creating queries in LibreOffice Base.

Uploaded by

goyalshaurya280
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

CLASS-X

CHAPTER 11-Queries in a Data Base

Page no. 198 DDEOP

D. Answer the following questions .

Q1. What is a query? What is the need for creating a query in a database?

A query is a way to ask a database for specific information. It retrieves the data that meets
certain conditions or criteria you set.

Need for creating a query:

 To filter data based on specific conditions (e.g., find all students with marks above
90).
 To retrieve specific fields (e.g., show only names and contact details from a list of
customers).
 To sort data (e.g., list products in order of price).
 To combine data from multiple tables by linking them.

Q2. Rearrange the steps to create a query using a wizard:

The correct order of steps to create a query using a wizard is:

1. Give table name (Q7)


2. Select the fields (Q4)
3. Give alias (Q3)
4. Set the sorting order (Q6)
5. Set the criterion (Q5)
6. Overview of query (Q8)

Q3. Give alias:

In a query, an alias is like a nickname for a field or column. You can use it to give a field a
new name that is easier to understand or more relevant. For example, if the column is named
"Student_ID," you can give it the alias "Student Number."

Q4. Select the fields:

When creating a query, you need to choose which fields (columns) from the table(s) you
want to include in your query result. For example, if you're interested in names and marks,
you would select the "Name" and "Marks" fields.
Q5. Set the criterion:

The criterion is the condition you apply to the data. For example, if you only want to see
students with more than 90 marks, you would set the criterion as "Marks > 90."

Q6. Set the sorting order:

You can set the sorting order in a query to organize the results. For example, you can choose
to sort the data by marks in ascending (lowest to highest) or descending (highest to lowest)
order.

Q7. Give table name:

In the query wizard, the first step is to select the table(s) from which you want to retrieve
data. For example, you could choose the "Students" table.

Q8. Overview (last step) of the Query Wizard:

In the overview step of the Query Wizard, you will see:

 A summary of the fields you selected.


 Any sorting orders you've set.
 Criteria or conditions applied.
 The table or tables from which data is being retrieved.

Q9. What is the use of the Alias row in the Design grid of the Query Design
window?

In the Query Design window, the Alias row allows you to rename a field (column)
temporarily for the purpose of the query. This can make the output easier to understand,
especially if the field names in the table are long or not user-friendly.

For example, if the field name is "Std_Marks_Obtained," you can set an alias like "Marks" to
display in the results instead.

Q10. Name any four mathematical functions that can be applied to numerical
data in a query:

1. SUM(): Adds up all the values in a column.


2. AVG(): Calculates the average of all the values in a column.
3. MIN(): Finds the smallest value in a column.
4. MAX(): Finds the largest value in a column.

Q11. Name the three ways of creating a query in LibreOffice Base:


1. Using the Query Wizard: A step-by-step guide that helps users create queries
without knowing SQL.
2. Design View: Allows users to create queries visually by dragging and dropping fields.
3. SQL View: Lets users write SQL (Structured Query Language) commands directly to
define the query.

You might also like