Third Quarter: Week 1: Database Concepts
Third Quarter: Week 1: Database Concepts
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
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.
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.
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---
Mini-Task:
Activity 1: Assessing your learning
REFERENCES:
ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON
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.
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
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.
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).
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
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.
REFERENCES:
ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON
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”.
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.
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.
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.
---o0o---
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.
REFERENCES:
ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON
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
---o0o---
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.
REFERENCES:
ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON
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.
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.
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---
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:
REFERENCES:
ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON
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
CONTENT DISCUSSION
4. With the Students List table selected, click the Add button
to add the table to the query then click Close.
Once you are done adding all the fields to the query, your query design view should look like the one
below:
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.
---o0o---
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.
REFERENCES:
ABIVA Publishing House Incorporated, My Computer Microsoft Access XP
TechFactors Inc., Programming and Databases, Joy de Jesus, Jr. et. al.
LESSON
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.
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.
---o0o---
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.