Lesson Plan: Suitability: ADP (F) Subject: Handling of Quiries

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 7

LESSON PLAN

SUITABILITY

ADP(F)

SUBJECT

HANDLING OF
QUIRIES

DURATION

80 MIN

TRG AIDS

SLIDE POWERPOINT

PREPARED/
CHECKED BY

MAJ NIKHIL SHARMA

DATE

REVISION
1.

Revise by asking the following question.


INTRO

2.
Queries are an essential part of any database. Query is a tool to
extract the desired info. For retrieving the desired information from a
database, queries specify a series of conditions. And, the information
satisfying these conditions gets stored out from the database. Database is a
combination of tables, Queries, Forms and Reports. So, queries are medium
to access selective info in tables or forms. When Microsoft Access executes a
query on a table, it displays only those records which match the specified
condition set in the query.
AIM
3.

To teach about Handling of queries.

4.

The lesson will be covered in the following phs.


(a)

Ph 1. Creating a query on a table.

(b)

Ph 2. Handling of queries
CREATING A QUERY ON A TABLE

5.
Let us now create a query in the Address database. This query gives
info about the codes (C-ID) and name of the customer (First Name) along with
the name (Product Name), cost (Price) and quantity of products(Quantity)
purchased by them. For this, we will proceed along the following steps.
(a)

Move the mouse pointer over the queries.

(b)
Then click the New button of the address. In the New query box,
the design view is highlighted by default

(c)
Then click on the OK button (The Show Table box displays the
name of the tables).
(d)

Here, select tables whose fds you wants to include.

(e)

Click the Add button.

(f)

Then click on the Order Details Table.

(g)
After selecting the reqd tables, click on the Close button
(Now a query box gets displayed on the screen).
(h)
Inside the two small boxes, select only those fds which you
wish to include in query. These are :(i)
The first fd to be selected is the customer iden No fd (C
_ID) . This fd is present in the address details table.
(ii)
The next fd to be selected is the name of the customer,
i.e FIRST NAME. This fd is also present the small box
containing the fds of address details.
(iii)

The next fd to be selected iden No of the product, i.e P-ID

(iv)
Similarly you can select of the fds (PRODUCT NAME,
PRICE and QUANTITY) from the small box containing the fds of
Order details table.
(j)
Now let us a perform a query on all the fds selected for your
query. To do so, move the mouse pointer over the Run button and click
left mouse button.
6.

Clarify doubts if any.

7.

Ph conformation.

8.

Ph Summary.

Confirm by asking the following question :-

HANDLING OF QUERIES
9.
Sorting Records According to a File.
proceed the following steps.

For sorting records, we will

(a)
Mov the mouse pointer over the down arrow button and
click the left mouse button.
(b)
Inside the pull down menu, click the Design view option
(Immediately the query will changes to Design view).

(c)

Now click the left mouse button besides the sort option.

(d)
Click on the down arrow button.(Instantly a pull-down menu
appears)
(e)

Inside the pull-down menu click on the Ascending option.

(f)
Now click on the Run button (This time immediately, the names
under the fd FIRST NAME appears in the ascending order).
10.
Removing Sort from a Fd. To removing sort from a fd, you may
undertake the following steps :(a) Mov the mouse pointer over the down arrow button and
click the left mouse button.
(b)
Inside the pull down menu, click the Design view option
(Immediately the query will changes to Design view).
(c)
Now remove the sorting of the fd FIRST NAME, mov the mouse
pointer on the down arrow button(Beside the ascending option)
(d)
Then click the left mouse button, Immediately a pull-down menu
appears. In the pull-down menu, move the mouse pointer over the
(Not sorted) option and then click the left mouse button.
(e)
Finally click on the run button.(Now all the records of the fds
appear in the previous order)
11.

Hiding a Fd. For hiding a fd you may undertake the following steps :(a)
Move the mouse pointer over the down arrow button of the view
button.
(b)
Inside the pull-down menu click on Design View option. (The
query gets changed to Design View).
(c)
At the bottom of the query 1, select query box, you will notice a
Tick mark displayed under each fd at the show option.
(d)
Then click the left mouse button on the Tick mark. The Tick
mark disappears instantly.
(e)
Now execute the query move the mouse pointer over the Run
button of the tool bar and click on it.

12.
Unhiding a Fd.
steps :-

For unhiding a fd, you may undertake the following

(a)
Move the mouse pointer over the down arrow button of the view
button.
(b)
Then mov the mouse pointer inside the blank squire beside the
Show option of the fd and click inside it. A Tick mark re-appears inside
the box.
(c)

Then click on the Run button present on the toolbar

13.
Setting Criterion.
Criteria are conditions you set to display the
specific records. For a setting a criterion, first display the query in the design
view. To do so, you may undertake the following steps :(a)
Move the mouse pointer over the down arrow button of the view
button.
(b)

Inside the Design View look for the criteria option.

(c)
Now mov the mouse pointer towards the right and click just
below the fd PRODUCT NAME. Immediately a blinking cursor
appears at that location.
(d)

Type the Criteria as = pencil box.

(e)

Finally click on the Run button

14.
Deleting Criterion.
following steps :-

To deleting criterion you may undertake the

(a)
Mov the mouse pointer to the left of the text written at Criteria
option. (= pencil box and click the left mouse button).
(b)
Then press the left mouse button, and keeping it pressed, drag it
such that the = pencil box criterion gets highlighted.
(c)
Once the entire criterion text has been highlighted, release the
mouse button.
(d)

Then press the Delete key of your keyboard.

(e)

Now click on Run button.

15.
Performing Calculations.
undertake the following steps :-

To

performing

calculations

you

may

(a)
Mov the mouse pointer to the new column next to the fd
name QUANTITY and click the left mouse button.
(b)

In the view fd, you have to type its name, say TOTAL PRICE.

(c)
Just next to the line TOTAL PRICE, you have to type a comd.
So type : (coln)
(d)

Then press the space bar key.

(e)

And type [PRICE]*[QUANTITY].

(f)

Finally click on the run button.

15.
Saving Query.
steps :-

To saving a query you may undertake the following

(a)
Mov the mouse pointer on the save button of the toolbar
and click the left mouse button ( A save as box appears on the screen).
(b)
Now type in a name, say Product Query, for this query and then
click on the OK button(Your query gets saved with the name Product
Query).
16.
Closing the Query and Quitting Access. To closing the query and
quitting access you may undertake the following steps :(a)
Click on the File menu bar option. Then a pull-down menu gets
displayed.
(b)
Inside the pull-down menu, click over the Close option. Your
query closes and you return to the Address : Database box.
(b)
Again click on File menu bar option to close the Address :
Database box.
(c)

Then click on the Close option

(d)

Finally, move the mouse pointer to the extreme right corner

of the title bar and click on the close button.


17.

Clarify doubts if any.

18.

Ph conformation.
(a)

Question 3.

(b)

Answer 3.

Confirm by asking the following question :-

19.

Ph Summary.

20.

Clarify doubts if any in entire lesson.

7
21

Final Confirmation. Confirm by asking the following question :SUMMARY


21 Summarise the lesson.

You might also like