You are on page 1of 4

Chapter 6

3
OpenOffice Base Queries

A. Multiple choice questions:


1. Name the Object in an OpenOffice Base package that is used to create a condition depending upon
which data will be filtered out of a Table:
a. Query b. Report c. Forms d. None of these
Ans. a. Query
2. Queries can be designed from:
a. Tables only b. Queries only c. Both a and b d. None of these
Ans. c. Both a and b
3. Which of the following can be used for creating a Query?
a. Tables b. Save Button. c. Reports d. Forms
Ans. a. Tables
4. Entries in ____________ row of the Query Design view allows you to set multiple conditions
where multiple conditions are present but all needs to be satisfied.
a. Visible b. Function c. Criterion d. Or
Ans. c. Criterion
5. The relational operator ____________ is used to check whether two quantity are unequal or not.
a. > b. Not equal c. <> d. ><
Ans. c. <>
6. Entries in ____________ row of the Query Design view allows you to set multiple conditions
where multiple conditions are present but either of them needs to be satisfied.
a. Visible b. Function c. Criterion d. Or
Ans. d. Or
7. Entries in ____________ row of the Query Design view allows you to select the field for viewing in
the query
a. Visible b. Field c. Criterion d. Or
Ans. a. Visible
8. Entries in ____________ row of the Query Design view allows you to specify whether a field will
be visible in the query or not when executed.
a. Visible b. Field c. Criterion d. Or
Ans. a. Visible
9. A ___________ is used to design an interface for the user to enter or display data from a database.
a. Forms b. Tables c. Reports d. None of these
Ans. a. Forms

27
10. Th
 e ____________ object is used when it is required to print or view information online from the
database in a formatted and organized manner.
a. Forms b. Tables c. Reports d. None of these
Ans. c. Reports
B. Fill in the blanks:
1. The Query object is used to filter out data from a table or a query.
2. The Visible option in the Query Design view allows you to see the field when the query is executed.
3. Double click on the query object to execute a query.
4. The Criterion row of the Query Design view allows you to insert a condition to filter out data.
5. The = relational operator is used to check for equality.
6. Fields which takes part in a Query for a condition, but whose content is not displayed is called
Virtual field.
7. The default name for a Query is Query1.
8. The Relational operator is used to set up a condition for the query.
9. The Or criteria is used when either of the condition(s) needs to be satisfied.
10. If you have conditions in the Criterion row for more than one field, it is said to have AND criteria.
C. State whether the following statements are true or false:
1. Query is used to derive specific information from a database. [True]
2. Click on the Queries button on the Database pane to create a query in OpenOffice Base. [True]
3. You can click on the Insert button on the Add Table or Query dialog to add a query. [False]
4. Keeping the Visible checkbox selected ensures that the field content is displayed when executing the
query. [True]
5. Query1 is the default name of the first query that you create. [True]
6. The Condition row present in the Design mode of the query is used to provide a criteria o filter out
data from a table. [False]
7. The AND criteria is used when either of the condition needs to be satisfied. [False]
8. Virtual fields are displayed in a query. [False]
9. Forms allow you to print a table. [False]
10. Reports allow you to print a table. [True]
D. Answer the following questions:
1. What is a Query?
Ans. A Query is a database object that searches for records that match the exact criteria you
define.
2. State the advantage of creating a Query in Design View compared to creating a Query using a
Wizard.
Ans. Using Design View gives you the flexibility of defining the criteria(s) from scratch.
3. How many Tables can be added to a Query? Also state the process of adding a Table using the
Design View.
Ans. You may add any number of tables to participate in a Query. To add a Table the following
28
steps are used:
a. Open the database for which you want to create the query.
b. Click on Queries object on the Database Pane and from the Tasks Pane click on Create
Query in Design View.
c. A new Query window appears showing the Add Table or Query dialog box. It shows all
tables in your database when you click on the Tables option button.
d. Select a table and click on Add button, which gets added to the Query window. In case
you want to add more tables you can continue doing so. Once done with the adding of
tables in the query, click on the Close button.
4. What does the Field entry of the Design View of a Query indicate?
Ans. It is used to specify the fields which will participate in designing the Query.
5. What happens when you remove the Checkbox from the Visible entry of the Design View.
Ans. In case the Visible entry is unchecked it will create a Virtual field, which is eligible to
participate in the query but do not show its content.
6. State the function of Alias entry.
Ans. The Alias is used to give alternative name to a Field which will be visible as column heading
when the query is executed.
7. What is the default name of a Query when saved?
Ans. The default name of a Query when saved is Query1.
8. State any one method of executing a Query.
Ans. Open the database for which you want to create the query.
Click on Queries object on the Database Pane and double click on the query.
i. State the process of editing a Query.
Ans. The following steps are used for editing a Query:
1. From the Database window click on the Queries object, which in turn displays the queries
in the Objects Pane.
2. From the Objects Pane right-click on it and select the Edit option, which in turn displays
the Query in Design View.
3. You can now make any changes to the Query design here.
ii. State the difference between AND criteria and OR criteria.
Ans. The AND criteria is used when there are multiple conditions, but all need to be satisfied for
the resultant to be true. The OR criteria on the other hand is used with multiple conditions,
but only one condition needs to be satisfied for the resultant to be true.
E. Application-Based Questions:
Mrs Sudeshna is the class teacher of class XI Science at Daisy Public School, Newtown Kolkata.
She wants to keep track of the performance (with respect to marks obtained) in Science
(Physics, Chemistry and Biology) by her students.
a. Suggest a Table structure to accomplice the above process. Specify the field name along with
the Data Type of the fields.
b. Which way of creating the Table would be more preferable, Table Wizard or Design View?
29
c. Assuming the data is inserted by Mrs Sudeshna perform the following:
i. Display the total marks obtained by each student. The marks in individual subject need not be
shown. State the Field entries to be displayed.
ii. State the Criterion entry for the fields to display all information of students who got above 90 in
Physics.
iii. S
 tate the Criterion entry for the fields to display all information of students who got above 90
in all the subjects.
iv. Incase the marks of the students in the three subjects were the following:

Physics Chemistry Biology
78 86 55
97 82 78
63 52 88
91 73 54
And the Field entry in Design View was “Physics”+”Chemistry”+”Biology” and Alias entry would
be “Total”, Sort entry would be ascending and Visible entry is checked. What would be output
of the Query when executed?
Ans. a.
Table: Student
Field Name Data Type Description
Roll INTi To store the roll number of the student.
Name VARCHAR To store the name of the student.
Physics INT To store the marks obtained by a student in physics.
Chemistry INT To store the marks obtained by a student in chemistry.
Biology INT To store the marks obtained by a student in biology.
b. ‘Design View’ would be more preferable as it gives more flexibility in declaring the
conditions to filter out the data.
c. i. Field entries of the Query from the ‘Student’ Table
Roll Name “Physics”+ “Chemistry”+ “Biology” with
Alias entry as “Total”
ii. Physics > 90
iii. Physics > 90, Chemistry > 90, Biology > 90
iv. Total
203
218
219
257

30

You might also like