Operate Database Application
Operate Database Application
Level-II
Based on March 2022, Curriculum Version 1
Ministry of Labor and Skills wish to extend thanks and appreciation to the many representatives of TVET instructors
and respective industry experts who donated their time and expertise to the development of this Teaching, Training
and Learning Materials (TTLM).
A Database is information that is set up for easy access, management and updating. Computer databases typically
store aggregations of data records or files that contain information, such as sales transactions, customer data,
financials and product information. Databases are used for storing, maintaining and accessing any sort of data.
This module is designed to meet the industry requirement under operate Database application occupational standard,
This unit is developed to provide you the necessary information regarding the following content coverage and
topics:
Introduction to Database
Basic design principles
Database object
Relationship
Record
This unit will also assist you to attain the learning outcomes stated above. Specifically, upon completion of this
learning guide, you will be able to:
Customer Employee
c-id e- id
c-name e- name
c-age e- age
c-sex e- sex
c-phone e- address
c-address e- salary
c-id
Primary key
Foreign key
In the diagram, the elements inside rectangles are called entities while the items inside diamonds denote the
relationships between entities.
ER Diagrams Usage
ER diagrams are most often associated with complex databases that are used in software engineering and IT
networks.
Figure are
In particular, ER diagrams 1 Entity Relationship
frequently used duringDiagram
the design stage of a development process in order to identify
different system elements and their relationships with each other. For example, inventory software used in a retail
shop will have a database that monitors elements such as purchases, item, item type, item source and item price.
Rendering this information through an ER diagram would be something like this:
In the diagram, the information inside the oval shapes is attributes of a particular entity.
ER Diagram Symbol and Notations
Figure 2 ER Diagrams Usage
Elements In ER Diagram
Entity
An entity can be a person, place, event, or object that is relevant to a given system.
For example, a school system may include students, teachers, major courses, subjects, fees, and other items.
Entities are represented in ER diagrams by a rectangle and named using singular nouns.
Attribute
An attribute is a property, trait, or characteristic of an entity, relationship, or another attribute.
For example, the attribute Inventory Item Name is an attribute of the entity Inventory Item. An entity can have as
many attributes as necessary.
Meanwhile, attributes can also have their own specific attributes. For example, the attribute “customer address” can
have the attributes number, street, city, and state. These are called composite attributes.
Note that some top level ER diagrams do not show attributes for the sake of simplicity.
In those that do, however, attributes are represented by oval shapes.
Page 13 of 68 Ministry of Labor and Operate Database Application Version -1
Skills August, 2022
Author/Copyright
Attributes in ER diagrams, note that an attribute can have its own attributes (composite attribute)
Figure 4 Example of Entity and Attribute
Relationship
A relationship describes how entities interact. For example, the entity “carpenter” may be related to the entity
“table” by the relationship “builds” or “makes”.
Relationships are represented by diamond shapes and are labeled using verbs.
ER Diagram Template
ERD templates can be edited and adjusted to fit into your work, regardless of industry. This entity-relationship
diagram template will help you organize databases and information systems efficiently, highlighting vital
relationships developed between a system’s components.
Benefit of ER Diagram
Constitute a very useful framework for creating and manipulating databases.
Are easy to understand and do not require a person to undergo extensive training to be able to work with it
efficiently and accurately.
Designers can use ER diagrams to easily communicate with developers, customers, and end users, regardless of their
IT proficiency.
Are readily translatable into relational tables which can be used to quickly build databases.
Can be directly used by database developers as the blueprint for implementing data in specific software applications.
May be applied in other contexts such as describing the different relationships and operations within an
organization.
Datasheets are grids of data that look like Excel worksheets. You can change data by working directly in Datasheet
view. If you are familiar with Excel, datasheets should be relatively easy to understand. You can change data in
tables, query result sets, and forms that display datasheets. Typically, you use datasheets when you need to see many
records at once.
The following table shows some of the record selector symbols you might see when updating data and what they
mean.
Symbol Meaning
This is the current record; the record has been saved as it appears. The current record is indicated by a
change in color in the record selector.
You are editing this record; changes to the record aren't yet saved.
This is the primary key field and contains a value that uniquely identifies the record.
1. In the Blank Database pane, type a file name in the File Name box. If you do not supply a file name
extension, Access adds it for you. To change the location of the file from the default, click Browse for a
location to put your database (next to the File Name box), browse to the new location, and then
click OK.
2. Click Create.
3. Access creates the database with an empty table named Table1, and then opens Table1 in Datasheet view.
The cursor is placed in the first empty cell in the Add New Field column.
4. Begin typing to add data, or you can paste data from another source, as described in the section Copy data
from another source into an Access table.
1. Follow the instructions in the dialog boxes that appear at each step.
Steps to Use a SharePoint site to create a table
6. Click the related field in the first table and drag it to the related field in the second table.
Whenever you link a primary key from one table to a field from another table, you create a foreign key.
This unit to provide you the necessary information regarding the following content coverage and topics:
2.3. Fonts
A font is a graphical representation of text that may include a different typeface, point size, weight, color, or design.
The image shows some examples of different computer fonts. Software programs like Microsoft Word, Microsoft
Excel, and Ms-access allow users to change the font used when typing text in the document or spreadsheet, as do
web designers. Formatting Fonts Sometimes users want to specify or change the appearance of a group of words or
characters, or even of a single word or character, and they are not familiar enough with all of Word's font formatting
options to know how to achieve the effect that they are seeking. Although most users are probably familiar with
some different font families and sizes and with the italic and bold typefaces, many users do not know how to
determine and apply the settings that are needed to add a colored background to their text or to type
Self check 2
Instruction: Answer all the questions listed below. You have given 1 Minute for each question. Each question
carries 2 Point.
1. Which View is the most intuitive view to use for report modification
A. Design view
B. Lay out view
C. A&B
D. None
2. Layout view is useful for
A. setting column widths
B. add grouping levels
C. performing almost any other task
D. All of the above
3. A bar that shows available commands in a program.
A. Commands bar
B. Menu bar
C. Title Bar
4. Toolbar that shows text formatting options.
A. Formatting toolbar
B. Command bar
C. Status bar
5. ……….is a graphical representation of text
A. Font
B. Lay out view
C. A&B
D. None
Test II: short Answer writing
Page 27 of 68 Ministry of Labor and Operate Database Application Version -1
Skills August, 2022
Author/Copyright
Instruction: write short answer for the given question. You are provided 3 minute for each question and each point
has 5Points
1. What is font?
2. Write down at least 3 database toolbar.
Note: Satisfactory rating – above 60% Unsatisfactory - below 60%
You can ask you teacher for the copy of the correct answers
This learning guide is developed to provide you the necessary information regarding the following content coverage
and topics:
Create a simple form
Modifying records
Rearranging objects within the form
This guide will also assist you to attain the learning outcomes stated in the cover page. Specifically, upon completion
of this learning guide, you will be able to:
Create a simple form Using wizard
Open existing database and modify records
Order objects within the form
A Form is a database object that you can use to create a user interface for a database application. A "bound" form is
one that is directly connected to a data source such as a table or query, and can be used to enter, edit, or display data
from that data source.
Forms are made up of controls, such as text boxes, buttons, document tabs, and drop-down lists, grouped in a way
that makes them easy to use and helps you get work done. The controls in the form are usually bound, or connected,
to the tables or queries in your database — but not always. For example, a control that displays your corporate logo
doesn't have to be bound to a table field. It can just point to the image it displays. In addition to entering data, you
can use forms in other ways. For example, you can create a form that asks for input, and then generates a custom
report based on that input.
In Access a form is an object that generally serves three purposes:
To allow users to perform data entry. Data can be inserted, updated, or deleted from a table using a Form
object.
To allow users to enter custom information, and based on that information perform a task. For example,
you may want to ask a user for parameters before running a report.
To allow users a method of navigating through the system. For example, you may create a form where a
user can select a form to load, a report to run, etc.
Creation of a form by using a wizard is the Ms Access pre-defined way of creating a form by simply following the
series of steps and choosing which field and format you would want for your Form.
1. Personal computer
2. Microsoft Window
Steps to create a form
1. Click the Create tab on the ribbon.
2. Click Form Wizard.
The Form Wizard appears. Anytime you create a form, you must tell Access which table or query you want to use
for your form
3. Click the Tables/Queries list arrow and select the table or query you want to use to create your form.
4. Click the Tables/Queries list arrow and select the table or query you want to use to create your form
Next the Form Wizard asks how you want to lay out the data on the form. There are a few different layout options:
Columnar: Displays one record at a time in a format that's easy to read.
Tabular: Displays multiple records at a time.
Datasheet: Displays multiple records at a time and looks like a table in Datasheet view.
Justified: Displays one record at a time. The format usually creates complicated forms that are difficult to
work with.
7. Select a layout option and click Next.
4. On the Create tab, in the Forms group, click More Forms, and then click Split Form
The default split form will open as shown below. The Form view is on top of the Datasheet view. However, you can
change the settings under the form property.
3. Click Browse.
4. The Open dialog box will appear. Locate and select the database, then click Open.
4. The Command Button Wizard will appear. In the Categories pane, select the category of button you want to
add. We want to find a way to move more quickly to specific records, so we'll choose the Record
Navigation category.
5. The list in the Actions pane will update to reflect your chosen category. Select the action you want the
button to perform, then click Next. In our example, we'll choose Find Record.
6. You can now decide whether you want your button to include text or a picture. A live preview of your
button appears on the left.
7. To include text, select the Text option, then type the desired word or phrase into the text box.
8. To include a picture, select the Picture option. You can decide to keep the default picture for that command
button or select another picture. Click Show All Pictures to choose from another command button icon
or Browse to choose a picture from your computer.
This learning guide is developed to provide you the necessary information regarding the following content
coverage and topics:
Browse through all recordsYou can browse through records by using the TAB key when you want to move through
one record at a time, in order, to locate a specific record. You can also browse through records in a table in
Datasheet view using the record navigation buttons. The record navigation buttons are available at the bottom of the
table or form.
The techniques that you can use to search and filter records are very useful for finding specific records for the case
at hand. However, you might want to perform the same search or filter operation regularly. Instead of reproducing a
set of search and filter steps every time, you can create a query. A query is a powerful and flexible way to locate
specific records because it lets you perform customized searches, apply customized filters, and sort records. You can
build your own queries to help you focus on specific records and to answer specific questions. Once created, a query
can be saved and reused, and can also be used in building forms and reports.
4.2. Retrieve information using query
4.2.1. Query
A query is a request for data results, for action on data, or for both. You can use a query to answer a simple question,
to perform calculations, to combine data from different tables, or even to add, change, or delete table data.
A query is a derived item in the database meant to answer specific questions that relate to the information in the
database.
It is the means to retrieve relevant information in one or more tables.
Page 45 of 68 Ministry of Labor and Operate Database Application Version -1
Skills August, 2022
Author/Copyright
4.2.2. Types of queries
1. Select Query
is the simplest type of query and because of that, it is also the most commonly used one in Microsoft
Access databases.
is the most common type of query.
It retrieves data from one or more tables and displays the results in a datasheet where you can update the
records (with some restrictions).
is used to group records and calculate sums, counts, averages, and other types of totals.
can be used to select and display data from either one table or a series of them depending on what is
needed.
is the user-determined criteria that tell the database what the selection is to be based on.
After the select query is called, it creates a "virtual" table where the data can be changed, but at no more than one
record at a time.
Action Query
are very popular in data management because they allow for many records to be changed at one time
instead of only single records like in a select query.
When the action query is called, the database undergoes a specific action depending on what was specified
in the query itself.
This can include such things as creating new tables, deleting rows from existing ones and updating records
or creating entirely new ones.
There are four kinds of Action Query. These are
Append Query
An append query adds a group of records from one or more tables to the end of one or more tables. For example,
suppose that you acquire some new customers and a database containing a table of information on those customers.
To avoid typing all this information into your own database, you'd like to append it to your Customers table.
Delete Query
A delete query deletes a group of records from one or more tables. For example, you could use a delete query to
remove products that are discontinued or for which there are no orders. With delete queries, you always delete entire
records, not just selected fields within records.
Make Table Query
As the name suggests, it creates a table based on the set results of a query. A make-table query creates a new table
from all or part of the data in one or more tables. Make-table queries are helpful for creating a table to export to
other Microsoft Access databases or a history table that contains old records.
Update Query
Allows for one or more field in your table to be updated.
An update query makes global changes to a group of records in one or more tables. For example, you can raise
prices by 10 percent for all dairy products, or you can raise salaries by 5 percent for the people within a certain job
category. With an update query, you can change data in existing tables.
Parameter query
In Microsoft Access, a parameter query works with other types of queries to get whatever results you want. This is
because, when using this type of query, you are able to pass a parameter to a different query, such as an action or a
select query.
Page 46 of 68 Ministry of Labor and Operate Database Application Version -1
Skills August, 2022
Author/Copyright
It can either be a value or a condition and will essentially tell the other query specifically what you want it to do.
It is often chosen because it allows for a dialog box where the end user can enter whatever parameter value they
wish each time the query is run. The parameter query is just a modified select query.
A parameter query is a query that when run displays its own dialog box prompting you for information, such as
criteria for retrieving records or a value you want to insert in a field.
You can design the query to prompt you for more than one piece of information; for example, you can design it to
prompt you for two dates.
Access can then retrieve all records that fall between those two dates.
Parameter queries are also handy when used as the basis for forms, reports, and data access pages.
4.3. Query Development
4.3.1. Query criteria
A query criterion is an expression that Access compares to query field values to determine whether to include the
record that contains each value.
The following tables shows some sample criteria and explains how they work.
Table 1. Simple criteria for all data types
Criteria Name Write it like... Function
Equals "x" Searches for values equal to x
Does Not Equal Not in ("x") Searches for all values except those equal to x
Null Is Null Searches for empty fields
Not Null Is Not Null Searches for non-empty fields
Table 2. Simple criteria for text
Criteria Name Write it like... Function
Contains Like "*x*" Searches for all values that contain x
Does Not Contain Not like "*x*" Searches for all values except those that contain x
Begins with Like "x*" Searches for all values beginning with x
Ends with Like "*x" Searches for all values ending with x
Searches for all values that come after x in
Comes After >= "x" alphabetical order.
Searches for all values that come before x in
Comes Before <= "x" alphabetical order.
Table 3.Simple criteria for numbers
Criteria Name Write it like... Function
Between Between "x" and "y" Searches for values in the range between x and y
Less Than <x Searches for all values smaller than x
Less Than or Equal To <= x Searches for all valuessmaller than or equal to x
Greater Than >x Searches for all values larger than x
Greater Than or Equal To >= x Searches for all values larger than or equal to x
Between Between "x" and "y" Searches for values in the range between x and y
Table 4.Simple criteria for dates
Criteria Name Write it like... Function
Between "#mm/dd/yy#" and
Between "#mm/dd/yy#" Searches for dates that fall between two dates.
Before <#mm/dd/yy# Searches for dates before a certain date
After >#mm/dd/yy# Searches for dates after a certain date.
Today =Date() Searches for all records containing today's date
Searches for all records containing dates x or more
Days Before Today <=Date()-x days in the past
Self check-4
Test I. Choose
Instruction: select the correct answer for the give choice. You have given 1 Minute for each question. Each question
carries 2 Point
1………is a collection of information organized in a table that pertains to a specific topic or category.
A. Record
B. Query
C. Font
2………. is a request for data results, for action on data, or for both.
A. Table
B. Query
C. Database
3………….. is an expression that Access compares to query field values to determine whether to include the record
that contains each value.
A. Simple query
B. Design
C. Font
Test II.
Instruction: Instruction: select the correct answer for the give choice. You have given 1 Minute for each question.
Each question carries 2 Point.
A B
...........1. Select Query A. makes global changes to a group of records
...........2. Update Query B. the process of determining the appropriate data type and source
4. Type the text you’re looking for in the Find What box.
8. Type a title for your query in the text box and then click Finish.
The wizard builds your query and saves it with the title you entered; then Access displays the results.
4. Create criteria
7. Click Yes
This learning guide is developed to provide you the necessary information regarding the following content coverage
and topics:
Design reports in a logical sequence
Modify reports
Distribute reports to appropriate person
This guide will also assist you to attain the learning outcomes stated in the cover page. Specifically, upon completion
of this learning guide, you will be able to:
Design reports in a logical sequence
Modify reports
Distribute reports to appropriate person
Self check 5
Test I. Choose
To save your report, click the Save command on the Quick Access Toolbar. When prompted, type a name for your
report, then click OK.
2. On the Create tab in the Reports group, click Report Wizard. The wizard starts
3. From the Tables/Queries drop-down list, select the table (or query) to base the report on.
The fields for the selected table load in the Available Fields list box.
4. Move the fields to include on the report from the Available Fields list box to
the Selected Fields list box. To do so, double-click a field name to move it or highlight
the field name and click >. To move all fields at once, click >>.
5. Click Next
6. To group records on the report by a particular field, highlight the field in the list box and
click.