Operate DB Application
Operate DB Application
Operate DB 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
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:
Open and design data base using basic design principles
Create and modify Database object
Create relationship
Add, modify and delete records
Save and compile database objects
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 1 Entity Relationship Diagram
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.
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.
Page 13 of 64 Ministry of Labor and Operate Database Application Version -1
Skills August, 2022
Author/Copyright
Figure 5 Using Relationships in Entity Relationship Diagrams
There are more elements which are based on the main elements. These are:
Weak Entity
A weak entity is an entity that depends on the existence of another entity.
In more technical terms it can defined as an entity that cannot be identified by its own attributes.
It uses a foreign key combined with its attributed to form the primary key.
An entity like order item is a good example for this. The order item will be meaningless without an order so it
depends on the existence of order.
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.
1.7. Record
There are several ways to update data in an Access database. You add a record to your database when you have
a new item to track, such as a new contact to the Contacts table. When you add a new record, Access appends
the record to the end of the table. You also change fields to stay up-to-date, such as a new address or last name.
To maintain data integrity, the fields in an Access database are set to accept a specific type of data, such as text
or numbers. If you don't enter the correct data type, Access displays an error message. Finally, you can delete a
record when it is no longer relevant and to save space.
You use a form to manually update data. Data entry forms can provide an easier, faster, and more accurate way
to enter data. Forms can contain any number of controls such as lists, text boxes, and buttons. In turn, each of
the controls on the form either reads data from or writes data to an underlying table field.
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.
Self check-1
Test I. Matching
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. Domain integrity A. Refers to the information’s accessibility
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.
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:
Setting page layout
Database toolbars
Fonts
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:
Adjust page layout
Open and view different toolbars
Format Fonts
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
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%
Page 26 of 64 Ministry of Labor and Operate Database Application Version -1
Skills August, 2022
Author/Copyright
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
Now that you have specified the table, you need to tell the Wizard which fields you want to display on the form.
To add a field to the form, you can either double-click the field or select the field and click the right arrow
button
5. Double-click the fields that you want to appear on the form.
6. 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.
2. Click Open
3. Click Browse.
3. choose the desired location for the command button, then click the mouse.
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.
9. When you are satisfied with the appearance of your command button, click Next.
10. Type a name for the button. This name won't appear on the button, but knowing the name will help you
quickly identify the button if you ever want to modify it with the Property Sheet. After adding the
button name, click Finish.
This learning guide is developed to provide you the necessary information regarding the following content
coverage and topics:
Locate Database Records
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.
4.2.2. Types of queries
1. Select Query
...........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.
6. If the wizard asks you to choose between a Detail and a Summary query, click the radio button next to
your choice and then click Next.
7. in the wizard page that appears, select a radio button for what you want to do next
2. Select each table that you need in the query and click Addto add it to the query.
Once you've added all the tables you need, click Close to close the dialog box.
4. Create criteria
3. Double-click the tables and queries you want to add and click Close
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
When you design a report, you must first consider how you want the data arranged on the page and how the data
is stored in the database. During the design process, you might even discover that the arrangement of data in the
tables will not allow you to create the report that you want. This can be an indication that the tables are not
normalized — this means that the data is not stored in the most efficient manner.
Make a sketch of your report this step is not required — you might find that the Access Report Wizard or the
Report tool(both of which are available on the Create tab, in the Reports group) provide a sufficient starting
design for your report
Decide which data to put in each report section Each report has one or more report sections. The one section that
is present in every report is the Detail section. This section repeats once for each record in the table or query that
the report is based on. Other sections are optional and repeat less often and are usually used to display
information that is common to a group of records, a page of the report, or the entire report
Decide how to arrange the detail data Most reports are arranged in either a tabular or a stacked layout, but
Access gives you the flexibility to use just about any arrangement of records and fields that you want.
5.1.2. Types of lay out
Tabular layout A tabular layout is similar to a spreadsheet. Labels are across the top, and the data is aligned in
columns below the labels. Tabular refers to the table-like appearance of the data. This is the type of report that
Access creates when you click Report in the Reports group of the Create tab. The tabular layout is a good one to
use if your report has a relatively small number of fields that you want to display in a simple list format. The
following illustration shows an employee report that was created by using a tabular layout.
Stacked layout A stacked layout resembles a form that you fill out when you open a bank account or make a
purchase from an online retailer. Each piece of data is labeled, and the fields are stacked on top of each other.
This layout is good for reports that contain too many fields to display in a tabular format — that is, the width of
the columns would exceed the width of the report. The following illustration shows an employee report that was
created by using a stacked layout.
Mixed layout You can mix elements of tabular and stacked layouts. For example, for each record, you can
arrange some of the fields in a horizontal row at the top of the Detail section and arrange other fields from the
same record in one or more stacked layouts beneath the top row. The following illustration shows an employee
report that was created by using a mixed layout. The ID, Last Name, and First Name fields are arranged in a
tabular control layout, and the Job Title and Business Phone fields are arranged in a stacked layout. In this
example, gridlines are used to provide a visual separation of fields for each employee.
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.
7. Add more grouping levels if desired. You can use the arrows to change the order of
the grouping levels if needed.
8. When you finish defining how you want records grouped, click Next