0% found this document useful (0 votes)
114 views37 pages

Third Quarter: Week 1: Database Concepts

The document discusses creating a lookup field in an Access database table that retrieves values from another table, explaining that a lookup field displays values from a field in a separate table to avoid duplicate data entry and ensure consistent values. It provides step-by-step instructions for creating a lookup field that references the "Computer Teacher" field in the "Computer Teachers" table to populate the same field in the "Classes" table. Creating the lookup field improves data accuracy and efficiency by limiting values to those existing in the source table.

Uploaded by

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

Third Quarter: Week 1: Database Concepts

The document discusses creating a lookup field in an Access database table that retrieves values from another table, explaining that a lookup field displays values from a field in a separate table to avoid duplicate data entry and ensure consistent values. It provides step-by-step instructions for creating a lookup field that references the "Computer Teacher" field in the "Computer Teachers" table to populate the same field in the "Classes" table. Creating the lookup field improves data accuracy and efficiency by limiting values to those existing in the source table.

Uploaded by

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

THIRD QUARTER

BRIEF INTRODUCTION:
A lookup field is a field in a table whose value is retrieved from another table or query.
Whenever possible, you should use the Lookup Wizard to create a lookup field. The Lookup Wizard
simplifies the process and automatically populates the appropriate field properties and creates the
appropriate table relationships.
WEEK 1: DATABASE CONCEPTS
Content Standard The learners demonstrate an understanding of key concepts, underlying
principles and core competencies in database.
Performance Standard The learners shall be able to independently create/provide quality
product database using Microsoft access.
21st Century Learning Critical Thinking-and-Doing, Computing/ ICT Literacy, Career and Self-
Skills reliance.
Most Essential Learning Demonstrate understanding on lookup field in creating efficient database
Competencies tables.
Core Values Excellence, Discipline, Social Responsibility

REFERENCES:
 ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
 TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON

1 TOPIC: DATABASE CONCEPTS

Introduction
A lookup field is a field in a table whose value is retrieved from another table or query.
Whenever possible, you should use the Lookup Wizard to create a lookup field. The Lookup Wizard
simplifies the process and automatically populates the appropriate field properties and creates the
appropriate table relationships.
Below are the Learning Targets/ Specific Objectives:
1. Describe and discuss the look up field with relationships
2. Apply a lookup field to the Access database table that will show the records to
the other table.

Exploration of Prior Knowledge


Directions: Fill in the K-W-H-L Chart below to assess your prior knowledge and
understanding of the topic, “What is a Network”.

What I Want to How I Can What I Have


What I Know
Find Out Learn More Learned

Skills I expect to use:

PROCESS QUESTIONS/ FOCUS QUESTIONS:


Below are the key guide questions that you should remember as you perform all the activities in
this lesson. You should be able to answer them at the end of the week.
1. How does the lookup field from another database table help us make our database table efficient?
SHORT EXERCISES/DRILLS:
Direction: Examine the illustration given and answer the question below. Use the space
provided for your answer.
1. How many field names do we have in this database table?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
2. Identify where is the lookup field on the given database table and explain why did
you say that it is the lookup field.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
CONTENT DISCUSSION
Topic: Lookup Values from another Table
You can also use values from fields. This option provides a more flexible list of values because
whatever data you may have in the source field will be included in the lookup field. Furthermore,
updating records in the source table also reflects on the data in the lookup field. This means that any data
deletion or addition in the other table’s source field is automatically reflected in the list.
In the previous topic, you learned how to create a lookup field based on values you enter in the
Lookup Wizard. This time, you will be creating a lookup field that looks up values from a field in
another table.

to understand it you may


Now in order for you to understand
do the f it you may do the following steps:
1. Create another table for the Lookup Fields
database and save the new table as Students.
2. Create the following fields for the new table with their corresponding data types as shown
in the table below.
Field Data Type
Student No Short Text
Class Code Short Text
First Name Short Text
Last Name Short Text
Middle Initial Short Text
Your table should look like the one below.

3. This time, you will create a lookup field that looks up the values in a field from another
table. For the ClassCode field, select Lookup Wizard… from the data type list.

4. Choose the first option, “I want the lookup column to look up the values in a table or
query,” in the next window then click Next.

The next window of the wizard will display the


available tables and queries in the database. This time,
however, only one table is displayed because you have not
yet created any other table. Although you already have two
tables, the table wherein the lookup field you are working on
cannot be used as its own source. Therefore, only the other
table is shown. Now select Classes table then click next.

5. The next wizard shows two field list, Available


Fields, which contains all of the fields from the table
you selected in the previous window, and Selected
Fields, which contains the fields you will select as the
lookup sources.
6. Double click Class Code in the Available
Fields list to move it to the Selected Fields list
then click Next to continue.

7. The next window will show how are you


going to sort the lookup fields, now you
don’t need to do anything in this window
so you may now click next to continue.
Click Next

8. The next window should show all the values


that are stored in the field you selected. These
values will then be made available in your
lookup column. Click Next to continue.

9. Accept the default name suggested by the wizard


(Class Code) and click Finish. When prompted to
save the table, click Yes.

10. Open the students table in datasheet view.


Notice that the field, Class Code, now has the
drop- down button beside it. Clicking this will
make the list of values or data stored in the
table, Classes, appear, which you filled in
earlier.

11. Fill in the table with the following sample data then
close and save the table when you are done.
REVISED KNOWLEDGE: Actual answer to the process questions/ focus questions
1. How does the lookup field from another database table help us make our database table efficient?
- This kind of lookup field prevent us from typing repetitive information coming from the other
table, because if we need an information from the other database table then all we have to do is
to use it not to type it again to our database table.
FINAL KNOWLEDGE: Generalization/ Synthesis/ Summary
Creating a lookup field not only improves the meaning of data but helps avoid data entry errors
by limiting the values that can be entered. A lookup field can display a user-friendly value that is bound
to another value in the source data table.

Department of Education
Division of Nueva Vizcaya
Diocese of Bayombong Educational System (DBES)
SAINT LOUIS SCHOOL
Solano, Nueva Vizcaya

---o0o---

DBES LEARNING ACTIVITY SHEET/GAWAING PAGKATUTO

Subject: DATABASE MANAGEMENT SYSTEM (COMPUTER 9)


Teacher: MARK IAN A. BILLEDO

Name of Learner : ___________________________________________________________________


Grade Level & Section: _________________________________ Inclusive Dates: _______________
Week No.: 1 Score : _______________

Mini-Task:
Activity 1: Assessing your learning

Take a video of yourself while doing the following steps below:


1. Open the Lookup Fields – Last Name, First Name database.
2. Create a new table for the database and save it as Computer Teachers
3. Now, on the new table create the following field names with its data type below. Please
do not create a primary key for this table.
Field Name Data Type
Computer Teacher Short Text
4. Click the datasheet view and type in the data below.

5. Close the table and save any changes.


6. Create another lookup field for the Classes table name Computer Teacher. The new
field should look at the values from the field, Computer Teacher, of the Computer
Teachers table.
7. Close and save the changes you made to the table then reopen it in datasheet view. Fill in
the new Computer Teacher field with data shown below.

8. Close the table and save any changes.


Rubric for Checking:
Category 5 4 3 2-1 Score
Skills All skills from the topic Most skills in the Some skills in the Few or no skills
are applied topic are applied. topic are applied from the topic
are applied.
Content The Output exceeds the The output is The output is The output is
expectations. complete. somewhat complete. incomplete
Correctness The Output is free from The output contains The output has The output
errors minimal errors several errors. contains many
errors
Efficiency The student was able to The student was The student was able The student
finish the task in the able to finish the to complete the task used the last
most effective way task in the but used methods that effective
without wasting time projected amount consumed more time method in
and effort. of time. or resource. finishing the
task.
WEEK 2: DATABASE CONCEPTS
Content Standard The learners demonstrate an understanding of key concepts, underlying
principles and core competencies in database.
Performance Standard The learners shall be able to independently create/provide quality
product database using Microsoft access.
21st Century Learning Critical Thinking-and-Doing, Computing/ ICT Literacy, Career and Self-
Skills reliance.
Most Essential Learning Demonstrate understanding on lookup field in creating efficient database
Competencies tables.
Core Values Excellence, Discipline, Social Responsibility

REFERENCES:
 ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
 TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON

2 TOPIC: DATABASE CONCEPTS

Introduction
A lookup field is a field in a table whose value is retrieved from another table or query.
Whenever possible, you should use the Lookup Wizard to create a lookup field. The Lookup Wizard
simplifies the process and automatically populates the appropriate field properties and creates the
appropriate table relationships.
Below are the Learning Targets/ Specific Objectives:
1. Discuss the multiple-column list lookup field.
2. Create a multiple-column list lookup field to the database.

Exploration of Prior Knowledge


Directions: Fill in the K-W-H-L Chart below to assess your prior knowledge and
understanding of the topic, “What is a Network”.

What I Want to How I Can What I Have


What I Know
Find Out Learn More Learned

Skills I expect to use:

PROCESS QUESTIONS/ FOCUS QUESTIONS:


Below are the key guide questions that you should remember as you perform all the activities in
this lesson. You should be able to answer them at the end of the week.
1. Why is it necessary to apply lookup field in our database table?
SHORT EXERCISES/DRILLS:
Direction: Examine the illustration given and answer the question below. Use the space
provided for your answer.
1. How many field names do we have in this database table?
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
2. Identify where is the lookup field on the given database table and explain why did
you say that it is the lookup field.
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
CONTENT DISCUSSION
Topic: Multiple-column List
In addition to displaying values from another table’s field, you can also display values from two
or more fields in another table. Look at the figure below to see how this lookup field displays values
from three field in the source table.

In this design, although three fields are displayed in the list, only one value can be stored in the
lookup field. The first field’s value selected is stored in the lookup field, which would contain the link
between the two tables.
Now, start working on your third lookup field by doing the following activity.
Do the following steps.
1. Open the Lookup Fields database
2. Open the Computer Teachers table in design view.
3. Edit the fields in the table as follows to make sure that you made the proper changes.
Field Data Type
Teacher ID Short Text
First name Short Text
Last Name Short Text

4. Close and save the changes you made to the table and reopen it in Datasheet view.
5. Edit the records in the table as shown in the table below. Your table should look similar to
the first figure below.
TeacherID FirstName LastName
AG Aldrich Gutierez
AT Alfin Trillo
CH Cherry Hermosa
GG Gian Guterez
JV Joan Villaruel
LV Loy Valenciano
ML Mich Locsin

6. Close and save the table.


7. Open the Classes table in design view.

8. Click the Data Type drop-down list for the Computer Teacher field and select Lookup
Wizard…

9. In the wizard window, select the first option then click Next.

10. In the next window, select the table, Computer Teachers


(Which you edited earlier), then click Next.

11. Add all of the available fields from the list box on the left to the selected fields on the right
as shown below. Click Next to continue.
12. The next window will display the values of the
fields you selected. You should see two columns
here, FirstName and LastName. Notice the
check box on the left side of the window labeled
Hide key column (recommended).

This key column (TeacherID field) contains the link between


this table (classes) and the table where the field source for the lookup
is located. A relationship is automatically created between the two
tables. You can choose to display this column by removing the
checkmark in the box. Try removing the checkmark now and see
what happens.
Notice that the hidden column is displayed giving you three
columns. Now, click the check box again and make sure that the key
column is hidden (only two columns should be displayed). Then click
Next to continue.

13. In the last wizard window, accept the default name and click
Finish. When prompted if you want to save changes, click Yes.

14. Close the table and make sure you save the changes
you made.

15. Open the Classes table in Datasheet View and see how your new lookup field works. It
should look similar to the one below.

When you update the records in the table, the value in the first column is the one stored in the
lookup field. In this activity, since you hid the key column and your lookup only displays two columns
(First Name and Last Name), the value in the Firs tame column is the one stored in the field. If during
the wizard, you chose not to hide the key column (Teacher ID), the lookup field will then display three
columns and store the value from the first column, Teacher ID, instead of the value in the FirstName
column.
REVISED KNOWLEDGE: Actual answer to the process questions/ focus questions
1. Why is it necessary to apply lookup field in our database table?
- The purpose of a lookup field is to replace the display of a number such as an ID with something
more meaningful, such as a name. For example, instead of displaying a contact ID number,
Access can display a contact name. The contact ID number is the bound value. It is automatically
looked up in a source table or query and replaced with the contact name. The contact name is the
display value.
FINAL KNOWLEDGE: Generalization/ Synthesis/ Summary
Creating a lookup field not only improves the meaning of data but helps avoid data entry errors
by limiting the values that can be entered. A lookup field can display a user friendly value that is bound
to another value in the source data table. For example, you want to record the customer for an order in
the Orders table. However, all customer information is tracked in the Customers table. You can create a
lookup field that displays the customer information in a combo box or list box control. Then, when you
select the customer in that control, an appropriate value — such as the customer's primary key value —
is stored in the order record.

Department of Education
Division of Nueva Vizcaya
Diocese of Bayombong Educational System (DBES)
SAINT LOUIS SCHOOL
Solano, Nueva Vizcaya

---o0o---
DBES LEARNING ACTIVITY SHEET/GAWAING PAGKATUTO

Subject: DATABASE MANAGEMENT SYSTEM (COMPUTER 9)


Teacher: MARK IAN A. BILLEDO

Name of Learner : ___________________________________________________________________


Grade Level & Section: _________________________________ Inclusive Dates: _______________
Week No.: 2 Score : _______________

Mini-Task:
Activity 1: Assessing your learning
Take a video of yourself while doing the following steps below:
1. Open your Lookup Fields-Last Name, First Name database, then create a new table and save it
as Contact Info.
2. Create the fields in the table below for the new table.
Field Data Type
Contact ID Short Text
Contact Type Short Text
Contact Number Short Text
3. Create lookup fields for the following based on the specifications described in the
table below. The lookup field for Contact ID should display three columns.
Field Lookup Source Lookup Field
Student No
Contact ID Students Table FirstName
Last Name
Contact Type Typed in values Landline
Mobile
4. Close the table and save the changes you made. Reopen it in the Datasheet View. Your lookup
fields should behave as those in the figures below.

Rubric for Checking:


Category 5 4 3 2-1 Score
Skills All skills from the topic are Most skills in the Some skills in the topic are Few or no skills from
applied topic are applied. applied the topic
are applied.
Content The Output exceeds the The output is The output is somewhat The output is
expectations. complete. complete. incomplete
Correctness The Output is free from errors The output contains The output has several The output
minimal errors errors.
contains many
errors
Efficiency The student was able to finish The student was able The student was able to The student used
the task in the most effective to finish the task in the complete the task but used the last effective
way without wasting time and projected amount of methods that consumed more method in
effort. time. time or resource. finishing the
task.

WEEK 3: DATABASE CONCEPTS


Content Standard The learners demonstrate an understanding of key concepts, underlying
principles and core competencies in database.
Performance Standard The learners shall be able to independently create/provide quality
product database using Microsoft access.
21st Century Learning Critical Thinking-and-Doing, Computing/ ICT Literacy, Career and Self-
Skills reliance.
Most Essential Learning Demonstrate understanding on lookup field in creating efficient database
Competencies tables.
Core Values Excellence, Discipline, Social Responsibility

REFERENCES:
 ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
 TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON

3 TOPIC: DATABASE CONCEPTS

Introduction
A lookup field is a field in a table whose value is retrieved from another table or query.
Whenever possible, you should use the Lookup Wizard to create a lookup field. The Lookup Wizard
simplifies the process and automatically populates the appropriate field properties and creates the
appropriate table relationships.
Below are the Learning Targets/ Specific Objectives:
1. Explain the look up field with relationships
2. Apply a lookup field to the Access database table that will show the records
to the other table.
Exploration of Prior Knowledge
Directions: Fill in the K-W-H-L Chart below to assess your prior knowledge and
understanding of the topic, “What is a Network”.

What I Want to How I Can What I Have


What I Know
Find Out Learn More Learned

Skills I expect to use:

PROCESS QUESTIONS/ FOCUS QUESTIONS:


Below are the key guide questions that you should remember as you perform all the activities in
this lesson. You should be able to answer them at the end of the week.
1. How does the lookup values that came from another table help us make our database table
efficient?
SHORT EXERCISES/DRILLS:
Short Constructed Response: Answer the following question below briefly but meaty. Use the space
provided for your answer.
1. Is it possible that the lookup values come from the different existing database table? Why did
you say so?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
2. What do you think is the purpose of the lookup field?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
CONTENT DISCUSSION
Topic: Lookup Values from another Table

You can also use values from fields. This option


provides a more flexible list of values because whatever
data you may have in the source field will be included in
the lookup field. Furthermore, updating records in the source table also reflects on the data in the lookup
field. This means that any data deletion or addition in the other table’s source field is automatically
reflected in the list.
In the previous topic, you learned how to create a lookup field based on values you enter in the
Lookup Wizard. This time, you will be creating a lookup field that looks up values from a field in
another table.
Now in order for you to understand it you may do the following steps below:
1. Create another table for the Lookup Fields database and save the
new table as Students.

2. Create the following fields for the new table with their corresponding data types as shown in the
table below.
Field Data Type
Student No Short Text
Class Code Short Text
First Name Short Text
Last Name Short Text
Middle Initial Short Text
Your table should look like the one below.

3. This time, you will create a lookup field that looks up the values in
a field from another table. For the ClassCode field, select Lookup
Wizard… from the data type list.

4. Choose the first option, “I want the lookup column to


look up the values in a table or query,” in the next
window then click Next.

The next window of the wizard will display the available


tables and queries in the database. This time, however, only one
table is displayed because you have not yet created any other
table. Although you already have two tables, the table wherein
the lookup field you are working on cannot be used as its own
source. Therefore, only the other table is shown. Now select
Classes table then click next.
5. The next wizard shows two field list, Available Fields,
which contains all of the fields from the table you
selected in the previous window, and Selected Fields,
which contains the fields you will select as the lookup
sources.

6. Double click Class Code in the Available Fields list to


move it to the Selected Fields list then click Next to continue.

7. The next window will show how are you going to sort
the lookup fields, now you don’t need to do anything in
this window so you may now click next to continue.

Click Next

8. The next window should show all the values that are stored
in the field you selected. These values will then be made
available in your lookup column. Click Next to continue.

9. Accept the default name suggested by the wizard (Class


Code) and click Finish. When prompted to save the table,
click Yes.

10. Open the students table in datasheet view. Notice that the
field, Class Code, now has the drop- down button beside it.
Clicking this will make the list of values or data stored in the
table, Classes, appear, which you filled in earlier.

11. Fill in the table with the following sample data then close and save
the table when you are done.

REVISED KNOWLEDGE: Actual answer to the process questions/ focus questions


1. How does the lookup values that came from another table help us make our database table efficient?
- It helps the user to use the entered information from the other database table to prevent the user
from making mistakes such as misspelled information because without this method the user will
repeatedly type the information which will lead to misspelled information.
FINAL KNOWLEDGE: Generalization/ Synthesis/ Summary
Creating a lookup field not only improves the meaning of data but helps avoid data entry errors
by limiting the values that can be entered. A lookup field can display a user friendly value that is bound
to another value in the source data table. For example, you want to record the customer for an order in
the Orders table. However, all customer information is tracked in the Customers table. You can create a
lookup field that displays the customer information in a combo box or list box control. Then, when you
select the customer in that control, an appropriate value — such as the customer's primary key value —
is stored in the order record.
Department of Education
Division of Nueva Vizcaya
Diocese of Bayombong Educational System (DBES)
SAINT LOUIS SCHOOL
Solano, Nueva Vizcaya

---o0o---

DBES LEARNING ACTIVITY SHEET/GAWAING PAGKATUTO

Subject: DATABASE MANAGEMENT SYSTEM (COMPUTER 9)


Teacher: MARK IAN A. BILLEDO

Name of Learner : ___________________________________________________________________


Grade Level & Section: _________________________________ Inclusive Dates: _______________
Week No.: 3 Score : _______________

Mini-Task:
Activity 1: Assessing your learning
Take a video of yourself while doing the following steps below:
1. Open the Lookup Fields – Last Name, First Name database.
2. Create a new table for the database and save it as Computer Teachers
3. Now, on the new table create the following field names with its data type below. Please
do not create a primary key for this table.
Field Name Data Type
Computer Teacher Short Text
4. Click the datasheet view and type in the data below.

5. Close the table and save any changes.


6. Create another lookup field for the Classes table name Computer
Teacher. The new field should look at the values from the field, Computer
Teacher, of the Computer Teachers table.
7. Close and save the changes you made to the table then reopen it in
datasheet view. Fill in the new Computer Teacher field with data shown
below.

8. Close the table and save any changes.


Rubric for Checking:
Category 5 4 3 2-1 Score
Skills All skills from the topic are Most skills in the Some skills in the topic are Few or no skills from
applied topic are applied. applied the topic
are applied.
Content The Output exceeds the The output is The output is somewhat The output is
expectations. complete. complete. incomplete
Correctness The Output is free from errors The output contains The output has several The output
minimal errors errors.
contains many
errors
Efficiency The student was able to finish The student was able The student was able to The student used
the task in the most effective to finish the task in the complete the task but used the last effective
way without wasting time and projected amount of methods that consumed more method in
effort. time. time or resource. finishing the
task.
WEEK 4: DATABASE QUERY
Content Standard The learners demonstrate an understanding of key concepts, underlying
principles and core competencies in database.
Performance Standard The learners shall be able to independently create/provide quality
product database using Microsoft access.
21st Century Learning Critical Thinking-and-Doing, Computing/ ICT Literacy, Career and Self-
Skills reliance.
Most Essential Learning Understand and apply Query in the database system using the Query
Competencies Wizard.
Core Values Excellence, Discipline, Social Responsibility

REFERENCES:
 ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
 TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON

4 TOPIC: DATABASE QUERY

Introduction
A database query is a similar action that is most closely associated with some sort of CRUD
(create, read, update, delete) function. A database query is a request to access data from a database to
manipulate it or retrieve it. This allows us to perform logic with the information we get in response to
the query.
Below are the Learning Targets/ Specific Objectives:
1. Define the database Query
2. Create a simple database Query using Query Wizard

Exploration of Prior Knowledge


Directions: Fill in the K-W-H-L Chart below to assess your prior knowledge and
understanding of the topic, “What is a Network”.

What I Want to How I Can What I Have


What I Know
Find Out Learn More Learned

Skills I expect to use:

PROCESS QUESTIONS/ FOCUS QUESTIONS:


Below are the key guide questions that you should remember as you perform all the activities in
this lesson. You should be able to answer them at the end of the week.
1. Why is creating a database query important?
SHORT EXERCISES/DRILLS:
Short Constructed Response: Examine the illustration below and answer the following question briefly
but meaty. Use the space provided for your answer.
1. What does the picture trying to portray?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
2. In what instances that you ask for information using the computer? Give a short explanation.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
CONTENT DISCUSSION
Topic: Creating Simple Queries
What is a Query?
A Query allows you to see and work with a specific set of records that meet the criteria you have
specified. You can use queries to view, change and analyze data in different ways. When you run a
query, the results will appear in the Datasheet view, shown like a table.
Query Window Elements
Field This is where you select a field to be part of the query. The drop-down
arrow displays the available fields. If you have more than one criterion,
go to the next column to select another field.
Table Indicates the filename of the table you are working on.
Sort This allows you to sort the result of the query
Show The show checkbox determines if the field is to be displayed in the
query results.
Criteria This is where you will enter the search conditions for the fields you
want to search. Always use quotation marks (“ ”) on your typed criteria.
You can also use operators to refine a search. Use AND and OR
operators to find records that meet more than one criteria.
A query is like a virtual table that allows users to display records from one or more tables. In
earlier chapters, you learned how to create tables for a database. Now, in this chapter, you will learn to
display different data results or records from tables using queries.
To begin, you will need at least one table in a database to work with queries.
Before you create a query we need to create first a new database table by following the steps below.
1. Create a new database and save it as Query Samples – LastName, FirstName.
2. Create a new database table using the following fields together with their data types below:
Field Data Type
ClassNo Short Text
FirstName Short Text
LastName Short Text
MiddleInitial Short Text
Gender Short Text
GradeLevel Short Text
3. Save the table as Students List but do not create a primary key. Reopen it in datasheet view, and
then enter the records in the table below:
4. Press Ctrl + S to save your work.
Select Queries
Now that you have created a table in the database, start working on your first query a select or
simple query so called because it displays results based on selected fields in one or more tables.

Displaying Records in a Table using Queries


As mentioned earlier, queries are used to display records from tables. The following activity creates a
query that displays all of the records in a single table using the Query Wizard.
Do the following procedure. Make sure that the Query Samples database is open.
8. Open the table
9. In the create tab click Query Wizard to create
a query using the said wizard.

10. A New Query dialog box will appear


showing the simple query wizard, now
click the simple query wizard then click
OK.

11. The Simple Query Wizard will


appear, displaying the list of
available fields in the selected table.
12. In the Wizard window, select which
fields you want to include in your
query. For this activity, add all of
the available fields in the table by
clicking the Add All button or by
double-clicking each field in the
available fields list. Notice that the fields you selected are transferred to the list on the right
under the Selected Fields list.
13. Once you have added all of the available fields, the wizard should
look like the one shown below. Then click Next button to continue.

14. In the next Wizard window, accept the name


suggested by MS Access (Students List Query) and
leave the open the query to view information option
selected. Click the Finish button.

15. The query in Datasheet view will open,


showing all of the fields and the records
in the table on which the query was
based.
As you notice on the query result above, all the records that we type on the database table is shown
on the query result it is because the criteria of the query is to show all the records from the table, that
why the records of the table and the query is the same.
REVISED KNOWLEDGE: Actual answer to the process questions/ focus questions
1. Why is creating a database query important?
- A query can either be a request for data results from your database or for action on the data, or
for both. A query can give you an answer to a simple question, perform calculations, combine
data from different tables, add, change, or delete data from a database.
FINAL KNOWLEDGE: Generalization/ Synthesis/ Summary
A database query is a similar action that is most closely associated with some sort of CRUD
(create, read, update, delete) function. A database query is a request to access data from a database to
manipulate it or retrieve it. This allows us to perform logic with the information we get in response to
the query.
Department of Education
Division of Nueva Vizcaya
Diocese of Bayombong Educational System (DBES)
SAINT LOUIS SCHOOL
Solano, Nueva Vizcaya

---o0o---

DBES LEARNING ACTIVITY SHEET/GAWAING PAGKATUTO

Subject: DATABASE MANAGEMENT SYSTEM (COMPUTER 9)


Teacher: MARK IAN A. BILLEDO

Name of Learner : ___________________________________________________________________


Grade Level & Section: _________________________________ Inclusive Dates: _______________
Week No.: 4 Score : _______________

Mini-Task:
Activity 1: Assessing your learning
Do the following steps:
1. Create a new database and save it as Queries Activity 2 – LastName, FirstName
2. Create a new table in the database using the fields shown below and save it as Students
StudentID
LastName
FirstName
MiddleInitial
Gender
Street
Barangay
Municipality
Province
PhoneNumber
CellphoneNumber
3. Now, enter at least five records to the new table.
4. After creating the new table and entering the five records, you may now create a new query and
save it as Full Names Query using only the FirstName, LastName, MiddleInitial fields.
5. The new query should only display the three field specified above. Your output should look like
the figure below.

Rubric for checking:


Category 5 4 3 2-1 Score
Skills All skills from the topic are Most skills in the topic Some skills in the topic are Few or no skills
applied are applied. applied from the topic are
applied.
Content The Output exceeds the The output is complete. The output is somewhat The output is
expectations. complete. incomplete
Correctness The Output is free from The output contains The output has several The output contains
errors minimal errors errors. many errors
Efficiency The student was able to The student was able to The student was able to The student used
finish the task in the most finish the task in the complete the task but used the last effective
effective way without projected amount of methods that consumed method in finishing
wasting time and effort. time. more time or resource. the task.
WEEK 5: WORKING WITH QUERIES
Content Standard The learners demonstrate an understanding of key concepts, underlying
principles and core competencies in database.
Performance Standard The learners shall be able to independently create/provide quality
product database using Microsoft access.
21st Century Learning Critical Thinking-and-Doing, Computing/ ICT Literacy, Career and Self-
Skills reliance.
Most Essential Learning Apply and display the selected fields using the query wizard.
Competencies
Core Values Excellence, Discipline, Social Responsibility

REFERENCES:
 ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
 TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON

5 TOPIC: WORKING WITH QUERIES

Introduction
A database query is a similar action that is most closely associated with some sort of CRUD
(create, read, update, delete) function. A database query is a request to access data from a database to
manipulate it or retrieve it. This allows us to perform logic with the information we get in response to
the query.
Below are the Learning Targets/ Specific Objectives:
1. Identify the database query wizard.
2. Display a selected fields only using the query wizard.

Exploration of Prior Knowledge


Directions: Fill in the K-W-H-L Chart below to assess your prior knowledge and
understanding of the topic, “What is a Network”.

What I Want to How I Can What I Have


What I Know
Find Out Learn More Learned

Skills I expect to use:

PROCESS QUESTIONS/ FOCUS QUESTIONS:


Below are the key guide questions that you should remember as you perform all the activities in
this lesson. You should be able to answer them at the end of the week.
1. How does the query wizard work?
SHORT EXERCISES/DRILLS:
Radial Diagram: Complete the Radial Diagram below by writing your ideas below. Use the space
provided for your answer.
Query
Wizard

CONTENT DISCUSSION
Topic: Displaying Selected Fields only
In the previous topic, you learned how to create a query that displays all of the fields in a table. In this
topic, you will learn how to display only the fields that you select.
Activity 1: Assessing your learning
6. Using the same database namely Query Sample – LastName, FirstName database.
7. Click Create tab, then click Query Wizard.
8. Now click again the Simple Query Wizard then click OK.
1. In the Simple Query Wizard, add only the following fields for the query by double clicking
each of the fields from the Available Fields list.
LastName
FirstName
MiddleInitial
2. Notice how only three fields from the Students List table were added to the list on the right.
Only the fields you selected from the Available fields list were moved to the Selected Fields
list.

3. Click Next to continue


4. In the next Wizard window, change the query name or title to Students Full Names as shown
in the figure below.

5. Click the Finish button to see the query in Datasheet view. Observe the difference between
this and the first query you created. The result of your query should look similar to the one
shown below.
REVISED KNOWLEDGE: Actual answer to the process questions/ focus questions
1. How does the query wizard work?
- The Query Wizard works by helping you map tables from a Source Connection to a Target
Connection. Based on your input, the Wizard will automatically create QueryPairs that compare
data based on the verification type that you have chosen.
FINAL KNOWLEDGE: Generalization/ Synthesis/ Summary
A database query is a similar action that is most closely associated with some sort of CRUD
(create, read, update, delete) function. A database query is a request to access data from a database to
manipulate it or retrieve it. This allows us to perform logic with the information we get in response to
the query.
Department of Education
Division of Nueva Vizcaya
Diocese of Bayombong Educational System (DBES)
SAINT LOUIS SCHOOL
Solano, Nueva Vizcaya

---o0o---

DBES LEARNING ACTIVITY SHEET/GAWAING PAGKATUTO

Subject: DATABASE MANAGEMENT SYSTEM (COMPUTER 9)


Teacher: MARK IAN A. BILLEDO

Name of Learner : ___________________________________________________________________


Grade Level & Section: _________________________________ Inclusive Dates: _______________
Week No.: 5 Score : _______________

Mini-Task:
Activity 1: Assessing your learning
Take a video of yourself and do the following steps below.
1. Open the Queries Activity 2 – LastName, FirstName database you created earlier.
2. Create a new query and save it as Full Names Query using only the FirstName, LastName and
MiddleName fields.
3. The new query should only display the three fields specified above.
Sample Output:

Rubric for checking:


Category 5 4 3 2-1 Score
Skills All skills from the topic are Most skills in the topic Some skills in the topic are Few or no skills
applied are applied. applied from the topic are
applied.
Content The Output exceeds the The output is complete. The output is somewhat The output is
expectations. complete. incomplete
Correctness The Output is free from errors The output contains The output has several The output contains
minimal errors errors. many errors
Efficiency The student was able to finish The student was able to The student was able to The student used the
the task in the most effective finish the task in the complete the task but used last effective method
way without wasting time and projected amount of time. methods that consumed more in finishing the task.
effort. time or resource.
WEEK 6: WORKING WITH QUERIES
Content Standard The learners demonstrate an understanding of key concepts, underlying
principles and core competencies in database.
Performance Standard The learners shall be able to independently create/provide quality
product database using Microsoft access.
21st Century Learning Critical Thinking-and-Doing, Computing/ ICT Literacy, Career and Self-
Skills reliance.
Most Essential Learning Understand and familiarize the Query Design Grid application window
Competencies
Core Values Excellence, Discipline, Social Responsibility

REFERENCES:
 ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
 TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON

6 TOPIC: WORKING WITH QUERIES

Introduction
A database query is a similar action that is most closely associated with some sort of CRUD
(create, read, update, delete) function. A database query is a request to access data from a database to
manipulate it or retrieve it. This allows us to perform logic with the information we get in response to
the query.
Below are the Learning Targets/ Specific Objectives:
1. Discuss the database Query Design Grid
2. Familiarize themselves on the Query Design Grid

Exploration of Prior Knowledge


Directions: Fill in the K-W-H-L Chart below to assess your prior knowledge and
understanding of the topic, “What is a Network”.

What I Want to How I Can What I Have


What I Know
Find Out Learn More Learned

Skills I expect to use:


PROCESS QUESTIONS/ FOCUS QUESTIONS:
Below are the key guide questions that you should remember as you perform all the activities in
this lesson. You should be able to answer them at the end of the week.
1. How does the Query Design View work?
SHORT EXERCISES/DRILLS:
Direction: Use the diagram below by writing your ideas about the word “Design” and “view”.
Design
Vie
w

CONTENT DISCUSSION

Topic: The Query Design Grid


So far you have created two
simple select queries that allow you to
display fields from a table using the
Query Wizard. However, queries can do
more than just display fields. They can
also be used to display specific records
based on specified criteria as you will
learn in this section.
To be able to perform more
advanced query functions, you need to
familiarize yourself with the Query
Design Grid.
The figure above
shows what the Query Design
Grid looks like. In this view,
you can add tables and fields
to the query as well as perform
more advanced query Criteria
functions.
The table displayed on the upper portion of the Query Design Grid shows the field sources that
can be added to the query. The query fields on the grid, just below the table source, show the fields that
are included in the query results, which, of course, represent the fields that will be displayed by the
query. Just below the query field is the table source, which tells users from which tables the fields came
from. In most cases, you will be designing queries that contain fields from different tables that contain
the same field names. Hence, the table field should be present to verify that you selected the correct
fields for the queries.
At the lower portion of the grid, you will see the Criteria grid wherein you can specify data that
can be found on the selected field, which tells the query to display only those records that meet the
criteria.
Creating Queries in Query Design Grid
Prepare to create another query from scratch but this time, you will tell the query to display only records
that meet the criteria you specified. The following activity will also teach you how to add tables to the
query Design Grid as well as add fields that will be used to display query results.
Activity 1: Using the Query Design for the first time
Do the following steps.
1. Open the Query Samples – LastName,
FirstName database.
2. Now click Create tab, then click Query Design
3. This will create a new query with the default name
Query1. It will also open the new query in Design view
but since the new query needs a table to work with, the
Show Table dialog box will appear so you can add a table
to the query. The Show Table dialog box contains three
tabs that allow you to select tables or queries to be used
with your new query. Each tab contains the list of tables
and queries available in the current database. In this case,
you only have one table, which is why there is only one
item on the list.

4. With the Students List table selected, click the Add button
to add the table to the query then click Close.

Your Query Design Grid should look similar


to the one below. Notice that the table you just
added can now be seen on the design grid, along
with its list of fields.

5. Add all of the fields in the table for the query by


simply double clicking the field in the table or by
dragging it into the design grid. You can also add
a field by clicking the drop-down list and
selecting the item from the list.

Once you are done adding all the fields to the query, your query design view should look like the one
below:

6. Now, conduct an initial check on your


new query to see if all of the fields are
properly displayed by looking at the
results in datasheet view. You can
switch between the datasheet and design
views by clicking the View button on the
toolbar. The following figures show what the View button looks like in datasheet and design
views.
In datasheet view, your query should look like the one on the right. Make sure that all records and
fields are accounted for. After checking the query result, return to design view by clicking the View
button again. This should bring you back to the Query Design Grid.

7. Now, specify criteria that will change the result of the query. The query should only display the
records of all of the female students. To do this, you need to specify the criteria under the field
that contains the data Female. In your table, this data is found under the Gender field, which
means that your criteria should also fall under this field. In the Query Design Grid, select the
criteria under Gender and type in the following expressions:
= “Female”
Refer to the figure below to make sure you entered the correct expression.

8. Switch to datasheet view to see the result. Your query should now display only the records
whose Gender fields contain the data Female.

Notice that the criteria you specified changed the result of the query based on the expression
=“Female”, which tells the query to display only records that have the value Female under the
Gender Field.
9. Save the new query as Female Students Query by pressing Ctrl + S and close your database.

REVISED KNOWLEDGE: Actual answer to the process questions/ focus questions


1. How does the Query Design View work?
- When you run a query, the results are presented to you in a table, but when you design one you
use a different view. This is called Query Design view, and it lets you see how your query is put
together.
FINAL KNOWLEDGE: Generalization/ Synthesis/ Summary
A database query is a similar action that is most closely associated with some sort of CRUD
(create, read, update, delete) function. A database query is a request to access data from a database to
manipulate it or retrieve it. This allows us to perform logic with the information we get in response to
the query.
Department of Education
Division of Nueva Vizcaya
Diocese of Bayombong Educational System (DBES)
SAINT LOUIS SCHOOL
Solano, Nueva Vizcaya

---o0o---

DBES LEARNING ACTIVITY SHEET/GAWAING PAGKATUTO

Subject: DATABASE MANAGEMENT SYSTEM (COMPUTER 9)


Teacher: MARK IAN A. BILLEDO

Name of Learner : ___________________________________________________________________


Grade Level & Section: _________________________________ Inclusive Dates: _______________
Week No.: 6 Score : _______________

Mini-Task:
Activity 1: Assessing your learning
Take a video of yourself and do the following activity below.
1. Open the Queries Activity 2 – LastName, FirstName database you created on the activity 2.
2. Create queries that will produce the results shown below.
Query Name Result
Male Students Query Query should display all records of male students
Female Students Query Query should display all records of female students
Add only the fields in the table below for new queries.
FirstName
MiddleInitial
LastName
Gender
3. Remember to always check your work by switching between the design and datasheet views.
Close your work and make sure you save any change made. Your output should look like the
figure below.

Rubric for checking:


Category 5 4 3 2-1 Score
Skills All skills from the topic are Most skills in the topic Some skills in the topic are Few or no skills
applied are applied. applied from the topic are
applied.
Content The Output exceeds the The output is complete. The output is somewhat The output is
expectations. complete. incomplete
Correctness The Output is free from The output contains The output has several The output contains
errors minimal errors errors. many errors
Efficiency The student was able to The student was able to The student was able to The student used
finish the task in the most finish the task in the complete the task but used the last effective
effective way without projected amount of methods that consumed method in finishing
wasting time and effort. time. more time or resource. the task.
WEEK 7: PARAMETER QUERY
Content Standard The learners demonstrate an understanding of key concepts, underlying
principles and core competencies in database.
Performance Standard The learners shall be able to independently create/provide quality
product database using Microsoft access.
21st Century Learning Critical Thinking-and-Doing, Computing/ ICT Literacy, Career and Self-
Skills reliance.
Most Essential Learning Understand and apply the parameter query using the Query Design Grid
Competencies View.
Core Values Excellence, Discipline, Social Responsibility

REFERENCES:
 ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
 TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON

7 TOPIC: PARAMETER QUERY

Introduction
A parameter query is one of the simplest and most useful advanced queries you can create. It
allows you to create a query that can be updated easily to reflect a new search term. When you open a
parameter query, Access will prompt you for a search term and then show you query results that reflect
your search.
Below are the Learning Targets/ Specific Objectives:
1. Identify the database Parameter Queries
2. Use a database parameter query to filter a record.

Exploration of Prior Knowledge


Directions: Fill in the K-W-H-L Chart below to assess your prior knowledge and
understanding of the topic, “What is a Network”.

What I Want to How I Can What I Have


What I Know
Find Out Learn More Learned

Skills I expect to use:


PROCESS QUESTIONS/ FOCUS QUESTIONS:
Below are the key guide questions that you should remember as you perform all the activities in
this lesson. You should be able to answer them at the end of the week.
1. How does the database parameter query help us to make our database system efficient?
SHORT EXERCISES/DRILLS:
Short Constructed Response: Answer the following questions below briefly but meaty. Use the space
provided for your answer.
1. What comes in your mind once you hear the word “Parameter”?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
2. What do you think is the purpose of a database parameter query?
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
CONTENT DISCUSSION
Topic: Parameter Queries
Parameter queries require more advanced use of criteria in queries. Parameter queries display
their own dialog boxes to prompt you for the value on which to base your criteria. Unlike simple criteria
wherein you type constant values for fields (e.g., = “Male” or = “Female”), parameters allow you to
change the value or data in the field to look in, giving you more flexibility.
Now, create a parameter query that will allow you to type the data for the record that you want to
display.

Activity 1: Two Parameter Query


For better understanding do the following steps below:
1. Open the Query Samples – LastName, FirstName database.
2. Now create a new query in design view and add the Students List table in the Show Table
dialog box.
3. Add all of the fields from the table to the new query as shown in the figure below.

4. Before you continue, save the new query as Find Students by Grade Level Query.

5. In the criterion under the Grade Level field, type the following expression:
= [Enter Student’s Grade Level:]
Look at the figure below to make sure you entered the correct expression for the
criterion. Notice that this time, you did not use double quotes in the expression. Instead, you
used brackets ([ ]) to enclose it.

The bracket tell the query that the criterion represents a variable, that is, a value that
can change and be stored to an identifier, instead of constant, that is, a value that does not
change. The text or expression inside the brackets is used as the prompt for the dialog box
that collects inputs from the user.
6. Now, run the query by switching to datasheet view. Notice that a dialog box will appear to
prompt you for data before it displays the result.
7. In the dialog box, type the value, grade 3, then click OK. Check the result of the query. It
should look like the one below.

8. Close and save your work.


You can use a parameter on any of the fields in the query. You can also use more than
one parameter for the query, which means you can assign other parameters to any field. If
you have more than one parameter, the query will display a dialog box for each parameter,
allowing you to specify more values to look for. For instance, if you added the following
criterion:
= [Enter Gender:]
Under the Gender field and the following parameter criterion:
= [Enter grade of student:]
Under the level field, the query will prompt you for the gender and the level of the student,
and then display only those records that meet both criteria. You can also use a parameter query along
with another criterion that specifies a constant value. Practice using different criteria on your queries
and observe their results.

REVISED KNOWLEDGE: Actual answer to the process questions/ focus questions


1. How does the parameter query help us to make our database system efficient?
- A parameter query is one of the simplest and most useful advanced queries you can create. It
allows you to create a query that can be updated easily to reflect a new search term. When you
open a parameter query, Access will prompt you for a search term and then show you query
results that reflect your search.
FINAL KNOWLEDGE: Generalization/ Synthesis/ Summary
When you’re running parameter queries, search terms act as variable criteria, which are query
criteria that change each time you run the query. For instance, let's say we own a bakery and want to
create a query that will quickly look up orders that were placed on a certain date. We could create a
parameter query with variable criteria in the Date field. This way, each time we run the query a dialog
box will appear prompting us to enter the date we’d like our query to search for.
Department of Education
Division of Nueva Vizcaya
Diocese of Bayombong Educational System (DBES)
SAINT LOUIS SCHOOL
Solano, Nueva Vizcaya

---o0o---

DBES LEARNING ACTIVITY SHEET/GAWAING PAGKATUTO

Subject: DATABASE MANAGEMENT SYSTEM (COMPUTER 9)


Teacher: MARK IAN A. BILLEDO

Name of Learner : ___________________________________________________________________


Grade Level & Section: _________________________________ Inclusive Dates: _______________
Week No.: 7 Score : _______________

Mini-Task:
Take a video of yourself and do the following steps below:
1. Open the Query Sample – LastName, FirstName and create two more queries that will prompt
you for the GradeLevel of Students to be displayed. One query should display only the names of
the male students while the other should only display the names of the Female students.
2. Save the two queries as specified below.
Query Name Result
Find Male Students by Query should display all records of male students that fall under the
GradeLevel Query GradeLevel you specified
Find Female Student by Query should display all records of female students that fall under the
GradeLevel Query GradeLevel you specified.
Test your work by opening the queries in datasheet view. If no matching records are found, no
records will be displayed by the query.
Rubric for checking:
Category 5 4 3 2-1 Score
Skills All skills from the topic are Most skills in the topic Some skills in the topic are Few or no skills
applied are applied. applied from the topic are
applied.
Content The Output exceeds the The output is complete. The output is somewhat The output is
expectations. complete. incomplete
Correctness The Output is free from The output contains The output has several The output contains
errors minimal errors errors. many errors
Efficiency The student was able to The student was able to The student was able to The student used
finish the task in the most finish the task in the complete the task but used the last effective
effective way without projected amount of methods that consumed method in finishing
wasting time and effort. time. more time or resource. the task.

You might also like