100% found this document useful (1 vote)
659 views

Module 08 Access & Use Database Application Frew

Uploaded by

Soli Mondo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
659 views

Module 08 Access & Use Database Application Frew

Uploaded by

Soli Mondo
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 59

Web Development and Database

Administration
Level-I
Based on March 2022, Curriculum Version 1

Module Title: Access & Use Database Application


Module code: EIS WDDBA1 M08 0322
Nominal duration: 70 Hour

Prepared by: Ministry of Labor and Skill


September, 2022
Addis Ababa, Ethiopia
Table of Contents
Acknowledgment.........................................................................................................................................3
Acronym......................................................................................................................................................4
Introduction to the Module.........................................................................................................................5
Unit one: Create database objects..............................................................................................................6
1.1. Introduction to Database Systems............................................................................................7
1.2. Database Design Principles.......................................................................................................7
1.3. Database Objects.....................................................................................................................11
1.4. Create Database Relationship.................................................................................................14
Self-check-1..........................................................................................................................................20
Operation sheet 1.1: Open and Design Database Application..........................................................22
Operation sheet 1.2: Create a Table...................................................................................................25
Operation sheet 1.3: Create Database Relationship..........................................................................28
LAP Test 1............................................................................................................................................33
Unit Two: Add record on table.................................................................................................................34
2.1 Add, Modify & Delete records................................................................................................35
2.2 Filed Properties Settings..........................................................................................................36
Self-check-2..........................................................................................................................................40
Operation sheet 2.1: Entering Data in a Table..................................................................................41
Operation sheet 2.2: Add, Edit and Delete Records..........................................................................42
Operation sheet 2.3: Creating drop-down list on your own.............................................................44
Operation sheet 2.4: Save & compile database objects.....................................................................46
LAP Test 2............................................................................................................................................49
Unit Three: Customize basic settings.........................................................................................................50
3.1 Adjusting Page Layout and Settings.......................................................................................51
3.2 Open and viewing different tools............................................................................................52
Self-check-3..........................................................................................................................................55
Reference..............................................................................................................................................56

Page 3 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Acknowledgment
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).

Page 4 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Acronym

DBMS – Database Management System

SQL – Structured Query Language

DBA – Database Administrator

ZIP – Zone Improvement Plan

Page 5 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Introduction to the Module
This learner’s guide is prepared to help you achieve the required competence in “Web
Development and Database Administration”. This will be the source of information for you to
acquire knowledge and skills in Accessing and use database applications and perform basic
operations.
This module covers the units :
 Create database objects
 Add record on table
 Customize basic settings
Learning Objective of the Module
 Know Basic Design Principles
 Opening, Designing and Modify Database Object
 Create Database Relationship
 Add, Modify And Delete Records
 Identify Field property settings
 Understand different views
Module Instruction
For effective use this modules trainees are expected to follow the following module instruction:
1. Read the information written in each unit
2. Accomplish the Self-checks at the end of each unit
3. Perform Operation Sheets which were provided at the end of units
4. Do the “LAP test” given at the end of each unit and
5. Read the identified reference book for examples and exercise

Page 6 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Unit one: Create database objects
This learning unit is developed to provide the trainees the necessary information regarding the
following content coverage and topics:
 Database Systems
 Basic Design Principles
 Creating Database Object
 Creating Relationship
This unit 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:
 Know Basic Design Principles
 Open And Design Database Application
 Create Relationship

Page 7 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
1.1. Introduction to Database Systems
A database is an integrated collection of logically related records or files consolidated into a
common pool that provides data for one or more multiple uses.
One way of classifying databases involves the type of content, for example: bibliographic, full-
text, numeric, and image. Other classification methods start from examining database models or
database architectures.
The data in a database is organized according to a database model. The relational model is the
most common.
A Database Management System (DBMS) consists of software that organizes the storage of data.
A DBMS controls the creation, maintenance, and use of the database storage structures of
organizations and of their end users. It allows organizations to place control of organization-wide
database development in the hands of Database Administrators (DBAs) and other specialists. In
large systems, a DBMS allows users and other software to store and retrieve data in a structured
way.
Database management systems are usually categorized according to the database model that they
support, such as the network, relational or object model. The model tends to determine the query
languages that are available to access the database. One commonly used query language for the
relational database is SQL, although SQL syntax and function can vary from one DBMS to
another. A great deal of the internal engineering of a DBMS is independent of the data model,
and is concerned with managing factors such as performance, concurrency, integrity, and
recovery from hardware failures. In these areas there are large differences between products.

1.2. Database Design Principles


1.2.1. Introduction to MS Access

MS Access is a database management tool that


enables one to store relevant data. This also has the
capabilities to retrieve, sort, summarize and report
results immediately and effectively. It can combine
data from various files (tables) through creating relationships.

Page 8 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Microsoft Access (MS Access) enables one to manage all important information from a single
database file. Within the file, one can use the different objects:
 Tables -Store your data in your database.
 Queries - Ask questions about information stored in your tables.
 Forms - A form is a type of a database object that is primarily used to enter or display
data in a database.
 Reports - Allow you to print data based on queries/tables that you have created

Basic Database Concept: In studying MS Access, it is but necessary to understand some basic
elements of a database before proceeding to it.
Database Elements:
 Data are raw facts. It tells the truth about something; a person, a place, an object, etc.
Example:

Name
“Girma” is a data. “Girma” is my name, so it tells something about
Girma
a person. “Girma” is a Name

Gender
“Male” is Girma’s gender. So it tells something about “Girma”.
Male

 Information is a collection of data (raw facts) which is contained in 1 file (table in Access)
Example:
ID Number First Name Last Name Gender Birthday Address
Stud-0001 Girma Abebe Male 11-05-1978 Bishoftu
This is information about a person named “Girma”
Example of a table (file):
ID Number First Name Last Name Gender Birthday Address
Stud-0001 Girma Abebe Male 11-05-1978 Bishoftu
Stud-0002 Sintayehu Kifle Male 21-03-1980 Adama
Stud-0003 Abera Tekeba Male 5-01-1970 Bahirdar
Stud-0004 Tola Asfaw Male 25-12-1982 Jima
Stud-0005 Meron Aschalew Female 8-01-1985 Hawasa
Page 9 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Naming Convention
It is manner of naming files and variables. Having a poor naming convention can only add
confusion, so it's important that you start with a good scheme, and think about what the scheme
will mean to you. Here are the three things to consider in establishing a naming convention:
1. Does my convention make sense to me?  
o Must be simple and understandable to you.
2. Will my convention make sense to other people? 
o Time will come that other people will look into your database program, so they must
able to understand it.
3. Can I be consistent in implementing and enforcing my convention? 
o All throughout my database work, your naming convention must not change.

1.2.2. Database Design Principles

Usability: Any information which we are storing in any organization should be meaningful for
that organization. If we are storing those factors which are actually not fit with organization’s
requirement then this is just waste of resources.
Extensibility: As we know that everyday new business requirements come up and every day
there is a need to change or enhance information system to capture new requirements. So
information design should be extensible so that it can adopt new requirements without much
efforts or without major breaking changes.
Data Integrity: Now at this point we understand that information is very much important for any
organization. Based on the historic information, every organization makes different strategies,
decisions for growth. One small mistake in data can lead to major issues with any organization’s
key decision and hence a big risk for growth.
Entity Integrity: Involves the structure (primary key and its attributes) of the entity. If the
primary key is unique and all attributes are scalar and fully dependent on the primary key, then
the integrity of the entity is good. In the physical schema, the table’s primary key enforces entity
integrity.

Page 10 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Domain Integrity: It defines that data should be of correct type and we should handle optional
data in correct way. We should apply Nullability to those attributes which are optional for
organization. We can define proper data types for different attributes based on organization’s
requirement so that correct format data should present in system.
Referential Integrity: This defines if any entity is dependent on another one then parent entity
should be there in the system and should be uniquely identifiable. We can do this by
implementing foreign keys.
User defined integrity: There are few business rules which we cannot validate just by primary
keys, foreign keys etc. There has to be some mechanism so that we can validate complex rules
for integrity. We can implement these rules in following ways:
Performance: As we know that information should be readily available as requested.
Performance of the system should be up to the mark. As data in increasing day by day so at some
time there will be impact on performance if database design is poor or we’ll not take any actions
to improve performance.
Availability: The availability of information refers to the information’s accessibility when
required regarding uptime, locations, and the availability of the data for future analysis. Disaster
recovery, redundancy, archiving, and network delivery all affect availability.
Security: For any organizational asset, the level of security must be secured depending on its
value and sensitivity. Sometime organizations has suffered a lot because of data leaks which
results in loss of faith and tends to business risk. So security is one of the most important aspect
of good database design.

1.2.3. Design Process


 Determine the purpose of your database: This helps prepare you for the remaining steps.
 Find and organize the information required. Gather all of the types of information you might
want to record in the database, such as product name and order number.
 Divide the information into tables: Divide your information items into major entities or
subjects, such as Products or Orders. Each subject then becomes a table.
 Turn information items into columns: Decide what information you want to store in each
table. Each item becomes a field, and is displayed as a column in the table. For example, an
Employees table might include fields such as Last Name and Hire Date.

Page 11 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
 Specify primary keys: Choose each table’s primary key. The primary key is a column that is
used to uniquely identify each row. An example might be Product ID or Order ID.
 Set up the table relationships. Look at each table and decide how the data in one table is
related to the data in other tables. Add fields to tables or create new tables to clarify the
relationships, as necessary.
 Refine your design: Analyze your design for errors. Create the tables and add a few records
of sample data. See if you can get the results you want from your tables. Make adjustments to
the design, as needed.
 Apply the normalization rules: Apply the data normalization rules to see if your tables are
structured correctly. Make adjustments to the tables, as needed.

1.3. Database Objects


1.3.1. Database Objects

A database object in a relational database is a data structure used to either store or reference data.
The most common object that people interact with is the table. Other objects are indexes, stored
procedures, sequences, views and many more.
When a database object is created, a new object type cannot be created because all the
various object types created are restricted by the very nature, or source code, of the relational
database model being used, such as Oracle, SQL Server or Access. What is being created is
instances of the objects, such as a new table, an index on that table or a view on the same table.

1.3.2. The different type of Database objects

Tables: - Recently, we define it as a file but technically, it was defined as a container or a


worksheet-like container where the collection of data has been stored.
Tables - A table is a collection of data about a specific topic, such as products or suppliers
 Basic Component of a Table:
 Meta Data – Database Structure
 Field – Column – Data
 Fieldname
 Record - Row - Information

Page 12 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Metadata – is a “data about data” or synonymously called table structure that defines what
type of data your data is?
Queries –Queries used to view, change, and analyze data in different ways. You can also use
them as a source of records for forms, reports.
Forms - A form is a type of a database object that is primarily used to enter or display data in a
database. You can also use a form as a switchboard that opens other forms and reports in the
database, or as a custom dialog box that accepts user input and carries out an action based on the
input.
Reports - A report is an effective way to present your data in a printed format. Because you
have control over the size and appearance of everything on a report.
1.3.3. Data types in Microsoft Access

Every field in a table has properties and these properties define the field's characteristics and
behavior. The most important property for a field is its data type. A field's data type determines
what kind of data it can store. MS Access supports different types of data, each with a specific
purpose.
 The data type determines the kind of the values that users can store in any given
field.
 Each field can store data consisting of only a single data type.
Table 1. 1 Common data types in Access

Type of Data Description Size

Short Text Text or combinations of text and numbers, Up to 255 characters.


including numbers that do not require
calculating (e.g. phone numbers).

Long Text Lengthy text or combinations of text and Up to 63, 999 characters.
numbers.

Number Numeric data used in mathematical 1, 2, 4, or 8 bytes (16 bytes if


calculations. set to Replication ID).

Date/Time Date and time values for the years 100 8 bytes
through 9999.

Currency Currency values and numeric data used in 8 bytes


Page 13 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
mathematical calculations involving data
with one to four decimal places.

AutoNumber A unique sequential (incremented by 1) 4 bytes (16 bytes if set to


number or random number assigned by Replication ID).
Microsoft Access whenever a new record is
added to a table.

Yes/No Yes and No values and fields that contain 1 bit.


only one of two values (Yes/No, True/False,
or On/Off).
 If you use previous versions of Access, you will notice a difference for two of those
data types.
 In Access 2013, we now have two data types — short text and long text. In previous
versions of Access these data types were called text and memo.
 The text field is referred to as short text and your memo field is now called long text.
Table 1. 2 Specialized data types in Access

Type of Data Description Size

Attachment Files, such as digital photos. Multiple files Up to about 2 GB.


can be attached per record. This data type is
not available in earlier versions of Access.

OLE objects OLE objects can store pictures, audio, video, Up to about 2 GB.
or other BLOBs (Binary Large Objects)

Hyperlink Text or combinations of text and numbers Up to 8,192 (each part of a


stored as text and used as a hyperlink Hyperlink data type can
address. contain up to 2048
characters).

Lookup The Lookup Wizard entry in the Data Type Dependent on the data type of
Wizard column in the Design view is not actually a the lookup field.
data type. When you choose this entry, a
wizard starts to help you define either a
simple or complex lookup field.

Calculated You can create an expression that uses data You can create an expression
from one or more fields. You can designate that uses data from one or
different result data types from the more fields. You can
expression. designate different result data
Page 14 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
types from the expression.

These are all the different data types that you can choose from when creating fields in a
Microsoft Access table.

1.4. Create Database Relationship


1.4.1. Table Relationship

Newcomers to the world of databases often have a hard time seeing the differences between a
database and a spreadsheet. They see tables of data and recognize that databases allow you to
organize and query data in new ways, but fail to grasp the significance of the relationship that
gives relational database technology & its name. Relationships allow you to describe the
connections between different database tables in powerful ways. Once you’ve described the
relationships between your tables, you can later leverage that information to perform powerful
cross-table queries, known as joins. A relationship is a logical connection between two tables.
Keys are fields that are part of a table relationship. There are two kinds of keys

A. Primary key
A table can have only one primary key. A primary key is used to identify each record that you
store in the table. It will not allow a duplication of the Primary Key thus make it unique.
Primary Key is the unique identification of one record. There is a uniquely identification number,
such as
 ID number
 A serial number
 A code that serves as a primary key
B. Foreign key
A table can also have one or more foreign key. A foreign key contains values that correspondent
to values in the primary key of another table. You use table relationship to combine data from
related table

Page 15 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Figure 1. 1 Primary key & Foreign key relationship

1.4.2. Types of Database Relationships


A. One to One Relationship
In a one-to-one relationship, each row in one database table is linked to 1 and only 1 other row in
another table. In a one-to-one relationship between Table A and Table B, each row in Table A is
linked to another row in Table B. The number of rows in Table A must equal the number of rows
in Table B.
To illustrate the one-to-one relationship consider the sample table design and data below:

Customer name table


cust_id (primary key - link to cust_id of customer details table)
first name
last name

Customer details table


cust_id (primary key - link to cust_id of customer name table)
height
weight
date of birth

Page 16 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
cust_id firstname last name
cust_id height weight  dateofbirt
0001     Abebe Tekalign h
0002     Sintayehu Balcha 0001     181     75      03/05/1960
0002     179     82      06/08/1974
0003     Kebede  Daba 
0003 171     65      04/01/1955
0004 Simehar     Belay
0004     185     93      05/05/1980
0005  Makida  Teka  
0005     168     71   09/09/1975

Notice that each row in the customer name table is related to 1 and only 1 other row in the
customer details table. Similarly, each row in the customer details table is related to 1 and only 1
other row in the customer name table.
However, if you think about it carefully, the above relationship does not really bring any design
benefits. In fact, it would cause performance overheads to the database engine for having to link
the table rows together to service user queries related to customers. The 2 tables can actually be
combined into a single table as illustrated below:

Customer name table

cust_id
First name
last name
height
weight
date of birth

Page 17 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
cust_id firstname last name height weight  dateofbirth

0001     Abebe Tekalign 181     75      03/05/1960

0002     Sintayehu Balcha 179     82      06/08/1974

0003     Kebede  Daba  171     65      04/01/1955

0004 Simehar     Belay 185     93      05/05/1980

0005  Makida  Teka   168     71   09/09/1975

However, there are some situations in which the one-to-one relationship may improve
performance. For our example above, if the height, weight and date of birth columns are rarely
used, it may make sense to separate them out into a separate database table that is linked to the
original table using a one-to-one relationship. This would reduce the overhead needed to retrieve
the height, weight and date of birth columns whenever a query is performed on the last name and
first name fields.

B. One to Many Relationships


In a one-to-many relationship, each row in the related to table can be related to many rows in the
relating table. This allows frequently used information to be saved only once in a table and
referenced many times in all other tables. In a one-to-many relationship between Table A and
Table B, each row in Table A is linked to 0, 1 or many rows in Table B. The number of rows in
Table A is almost always less than the number of rows in Table B.
To illustrate the one-to-many relationship consider the sample table design and data below:

Authors table Books table

author_id (primary key) book_id (primary key)


first name title
last name author_id  (foreign key - link to author_id of author table)
author_id  first name  last name

0001     Abebe Tekalign

Page 18 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
book_id  title author_id 
b1     a database primer 0001
0002     Sintayehu Balcha b2     building data warehouse 0001

0003     Kebede  Daba  b3 teach yourself sql            0001


b4     101 exotic recipes 0002
0004 Simehar     Belay
b5     visiting ethiopia             0003

Notice that each row in the authors table is related to 0, 1 or many rows in the books table. This
makes intuitive sense because an author can write 0, 1 or more than 1 books. In our example
above, Aebe tekalign has written 3 books, Sintayehu balacha has written 1 book, Kebede daba
has written 1 book and Simhar belay has not written any books.
If you notice carefully, the above relationship between the authors table and the books table is a
one-to-many relationship. Turning around, the relationship between the books table and the
authors table is a many-to-one relationship.

C. Many to Many Relationships


In a many-to-many relationship, one or more rows in a table can be related to 0, 1 or many rows
in another table. In a many-to-many relationship between Table A and Table B, each row in
Table A is linked to 0, 1 or many rows in Table B and vice versa.  A 3rd table called a mapping
table is required in order to implement such a relationship.
To illustrate the many-to-many relationship consider the sample table design for a bank below:

Customers table

cust_id (primary key)


last name
first name

Products table

product_id (primary key)


name

Page 19 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Mapping table

cust_id
product_id

Assume that the bank has only 2 customers and 2 products:

Customer Table
cust_id firstname last name

0001     Abebe Tekalign


Products Table
0002     Sintayehu Balcha
product_id  name
P0001 savings
P0002  credit card

Mapping Table
cust_id product_id

0001     P0001
0001     P0002
0002     P0002

Notice from the mapping table, Abebe tekalign has 2 facilities with the bank - a Savings account
and a Credit Card. Also, notice that both the customers own Credit Cards issued by the bank.
This means that with the way the database tables are designed:
1. One customer can have 0, 1 or many products
2. One product can be owned by 0, 1 or many customers

Page 20 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Self-check-1
Test-I Choice
Directions: Answer all the questions listed below.
1. _______ Involves the structure (primary key and its attributes) of the entity
A. Data integrity C. A&B
B. Entity integrity D. None
2. Which integrity defines any entity is dependent on another
A. Data integrity C. Entity
B. Referential D. All of the above
3. How do key fields work with a one-to-one relationship between two tables?
A. The first table uses the primary key field, and the second table uses a foreign key
field.
B. The first table uses the foreign key field, and the second table uses a primary key
field.
C. Both tables use primary key fields.
D. Neither table uses primary key fields.
4. ________ is a column that is used to uniquely identify each row
A. Foreign key C. A&B
B. Primary key D. All of the above
5. __________ Which one of the following is the component of table.
A. Mete data C. Records
B. Field D. All of the above
6. Allows for the storage of lengthy text or combinations of text and numbers.
A. Number C. Long Text
B. Short Text D. AutoNumber
7. Which one of the following is a database object?
A. Form C. Query
B. Table D. All of the above

Page 21 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
8. Which type of relationship uses a junction table?
A. One - to – one
B. Many - to - one
C. One - to – many
D. Many - to – Many
9. Which one of the following is true about the primary key?
A. Should Not Null
B. It should be both Null and not Null
C. It should be Null
D. Cannot have character data type
10. _________ describes how entities are related and it help to view information from two
or more table at the same time.
A. Entity C. Table
B. Form D. Relationship

Test II: Short Answer


Instruction: write short answer for the given question.
1. Explain about the difference between Primary key and Foreign key.

2. Identify the main difference of Many to Many relationship to the other relationships.

3. What is Domain Integrity?

Page 22 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Operation sheet 1.1: Open and Design Database Application
 Operation title: Launch MS Access 2016
 Purpose: To open and use new blank document
 Instruction: Use the given step below appropriately. For this operation you have given 5
minutes and you are expected to provide the answer.
 Tools and requirement: Computer & MS office 2016 application software
 Procedures in doing the task
1. Start Access
2. Click on Blank desktop database

3. Under File Name type a name for the database


4. To change the location of where to store the database, click the folder icon and select
a location
5. Click Create

Page 23 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
6. Your new database has now been created. It's a blank database with a table that is
ready to be configured. You'll see the menu at the top, and the Ribbon below it
containing various options for customizing your database. We'll be working with
them throughout this tutorial.

Steps to Open an existing Access database


1. Click the File tab.
2. Click Open. The databases you’ve recently opened show up here.

Page 24 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
3. Click Browse.
4. Navigate to where your file is saved and select the file you want to open.
5. Click Open.

The database opens.


 Quality Criteria: Once you complete the steps, you have to open new a database file & access
exciting database files.

Page 25 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Operation sheet 1.2: Create a Database Object: Table
 Operation title: Create Table
 Purpose: To Create and save table
 Instruction: Use the given step below appropriately. For this operation you have given
15 minutes and you are expected to provide the answer.
 Tools and requirement: Computer & MS office 2016 application software
 Procedures in doing the task
1. Before you can create a database objects, you need to launch first the MS Access
Software and then create a blank database.
2. Microsoft Access automatically creates a new table in the database called Table1.
This is a temporary name until the table is saved.

To Switch to Design view:


1) Click the View button on the Home Ribbon and type a name for the table “Student List”

2) Click OK

Page 26 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Let’s now start creating a table
Creating a table would start by creating a table structure which would define every field in a
table. Let us create a table Students List and let’s define the following fields as follows:

Field Name Data Type


Student ID Short Text
First Name Short Text
Last Name Short Text
Birth Date Date
Gender Short Text
Age Number
Course Short Text

To Enter Fields in a Table:


1) Type a name for the first field in the table and press Enter
2) Select a data type and press Enter
Continue this until all necessary fields have been entered into the table.
Note: The order that you enter the field names is the order the fields will appear in the table
and on a form.

Page 27 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
To View the Datasheet:
Click the View button on the Ribbon
Setting a Primary Key
The Primary Key is the unique identifier for each record in a table. Access will not allow
duplicate entries in a Primary Key field. By default, Access sets the first field in the table as the
Primary Key field. An example of a Primary Key would be your Social Security Number. This is
something unique about you and should not be duplicated.
To Set a Primary Key:
1) Switch to Design View
2) Position your cursor in the field you wish to set as the Primary Key
3) Click the Primary Key button on the Ribbon

 Quality Criteria: Once you complete these steps, you have to create database table, enter fields
& assign primary key.

Page 28 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Operation sheet 1.3: Create Database Relationship
 Operation title: Create Table Relationship
 Purpose: To Create relationship between two or more tables
 Instruction: Use the given step below appropriately. For this operation you have given
20 minutes and you are expected to provide the answer.
 Tools and requirement: Computer & MS office 2016 application software
 Procedures in doing the task
1. In your MS Access application window, go to Database Tools  Now, from
the Relationships section, tap to the Relationships icon.

2. Tapping to this Relationships icon will automatically open up “Show Table” dialog


box on your screen. If this dialog box won’t come automatically. After then go to
the Design tab>Relationships section and tap to the Show Table option. In this Show
Table dialog box, you can see all tables and queries used in your particular database.
If you want to see only Access tables then click to the Tables tab. In order to see only
Access queries, tap to Queries tab. To see all tables and queries tap to Both tab.

Page 29 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
3. Make a selection of either one or more queries/tables after then tap to the Add After
completing up the work of adding tables and queries into the Relationships document
tab, hit the Close option.

Page 30 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
4. Now you need to drag the field (mainly the primary key field) of one table into the
common field (which a foreign key) in another table. If you need to drag more than
one field. Then keep pressing the CTRL key, tap to each field, after then drag them
all. Now Edit Relationships dialog box pop-up on your screen.

Page 31 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
5. You need to verify for the field names that all the shown field names are actually
common fields for relationships. If in case the field name won’t match or it is
incorrect, then tap to the field name and make a selection of the right field from the
list.
For enforcing referential integrity for this new relationship, choose the Enforce
Referential Integrity check box.

6. Hit the Create option.


MS Access will make a
relationship line

between two tables. If you have chosen the Enforce Referential Integrity check box,
the line will seem to be thicker at each of the ends.

Edit table relationship

Page 32 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
1. Go to the database tools tab, and from the Relationships group, tap
the Relationships icon. This will open up the Relationships window on your screen.
2. Now on the Design tab, go to the Relationships group and hit the All
Relationships option. You will see all the tables are get listed along with their
relationships and relationship lines.
3. For changing the relationship, tap into the relationship line. When it is selected it
appears thicker.
4. Make double tap on the relationship line.
OR
Go to the Design tab and from the Tools group, hit on the Edit Relationships option.
This will open up the Edit Relationships dialog box.
5. Do whatever change you want to do, and then click to the OK

Steps to delete a table relationship


Remark: With the deletion of the relationship, the referential integrity support for that specific
relationship is also been removed. After then the Access will not prevent the automatic creation
of records on many sides of the relationship.
1. Firstly, you need to go to the Database Tools tab, and then from
the Relationships group, hit the Relationships
2. Now go to the Design tab, and in the Relationships section, tap to the All
Relationships after then all the tables along with their relationships and relationship
lines are displayed.
3. Hit on the relationship line of the relationship which you want to delete. The line of
relationship appears thicker after being selected.
4. Hit the DELETE key.
5. After then the Access will display the pop-up message like: “Are you sure you want to
permanently delete the selected relationship from your database?”. when this
confirmation message comes to your screen, tap to the Yes option.
 Quality Criteria: Once you complete these steps, you have to create, edit & database
relationships.

Page 33 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
LAP Test 1
Instructions: Given necessary templates, tools and materials you are required to perform the
following tasks
Task 1
1. Create a new database, save it on the desktop and name it “School Database”
2. Create a Table in the School Database with the following:
Field Name Data Type Field Size or Format
ID Number Short Text 10
Full Name Short Text 15
Telephone Number Number Long Integer

Date of Birth Date/Time Medium Date


Salary Currency Currency

Task 2
2. Make the “ID Number” Field as the Primary Key.
3. Save the table as “Student’s Table”
4. Return to the main Access window.

Page 34 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Unit Two: Add record on table
This unit to provide you the necessary information regarding the following content coverage
and topics:
 Adding data in a table according to information requirements
 Modifying and deleting records as required
 Saving and Compiling database objects
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:
 Add, Modify and Delete Records
 Identify Field Property Setting
 Save & Compile database objects

Page 35 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
2.1 Add, Modify & Delete records
A. Ways to Add, Edit, and Delete records

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.

Figure 2. 1 Data entry form

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.

Page 36 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Figure 2. 2 Datasheet view of the record

B. Understanding data entry symbols

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 record is locked by another user; you can't edit it.
This is a new record in which you can enter information.
This is the primary key field and contains a value that uniquely identifies the record.

C. Lookup data-entry list in MS Access

Perhaps the best way to make sure that data is entered correctly is to create a data-entry drop-
down list. That way, anyone entering the data in your database table can do so by choosing an
item from the list, not by typing it in. This method saves time and prevents invalid data from
being entered. Access offers two ways to create the drop-down list:
 Create the list by entering the items yourself: Go this route when you’re dealing with a
finite list of items that never change.
 Get the items from another database table: Go this route to get items from a column in
another database table. This way, you can choose from an ever-expanding list of items.
When the number of items in the other database table changes, so does the number of
items in the drop-down list because the items come from the other database table. This is
a great way to get items from a primary key field in another table.

Page 37 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
2.2 Filed Properties Settings
The Field Properties settings safeguard data from being entered incorrectly. Following is a
description of the different properties (listed here in the order in which they appear in the Design
view window) and instructions for using them wisely. Which properties you can assign to a field
in Access depends on which data type the field was assigned.

A. Field Size

In the Field Size box for Text fields, enter the maximum number of characters that can be
entered in the field. Suppose that the field you’re dealing with is ZIP code, and you want to enter
five-number ZIP codes. By entering 5 in the Field Size text box, only five characters can be
entered in the field. A sleepy data-entry clerk couldn’t enter a six-character ZIP code by
accident.
For Number fields, select a value for the field size from the drop-down list. 

B. Format

Click the drop-down list and choose the format in which text, numbers, and dates and times are
displayed.

C. Decimal Places

For a field that holds numbers, open the Decimal Places drop-down list and choose how many
numbers can appear to the right of the decimal point. This property affects how numbers and
currency values are displayed, not their real value. Numbers are rounded to the nearest decimal
point. The Auto option displays the number of decimal places permitted by the format you chose
on the Format drop-down list.

D. Input Mask

For Text and Date field types, this feature provides a template with punctuation marks to make
entering the data easier. Telephone numbers, social security numbers, and other numbers that
typically are entered along with dashes and parentheses are ideal candidates for an input mask
(another ridiculous database term!). On the datasheet, blank spaces appear where the numbers
go, and the punctuation marks stand at the ready to receive numbers.

Page 38 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Figure 2. 3 Input Mask Sample
In the Input Mask text box, enter a 0 where numbers go and enter the punctuation marks where
they go. For example, enter (000) 000-0000 or 000/000-0000 to enter an input mask for a
telephone number. You can also create input masks by clicking the three dots beside the Input
Mask text box. Doing so opens the Input Mask Wizard dialog box, where you can fashion a very
sophisticated input mask.

E. Caption

If the field you're working on has a cryptic or hard-to-understand name, enter a more descriptive
name in the Caption text box. The value in the Caption property appears as the column heading
in Datasheet view, as a label on forms, and on reports in place of the field name. People entering
data understand what to enter after reading the descriptive caption.

F. Default Value

When you know that the majority of records require a certain value, number, or abbreviation,
enter it in the Default Value text box. That way, you save yourself the trouble of entering the
value, number, or abbreviation most of the time because the default value appears already in
each record when you enter it. You can always override the default value by entering something
different.

G. Validation Rule

As long as you know your way around operators and Boolean expressions, you can establish a
rule for entering data in a field. For example, you can enter an expression that requires dates to
be entered in a certain time frame. Or you can require currency figures to be above or below a

Page 39 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
certain value. To establish a validation rule, enter an expression in the Validation Rule text box.
To use dates in an expression, the dates must be enclosed by number signs (#). 
To get help forming expressions, click the three dots beside the Validation Rule text box to open
the Expression Builder and build an expression there. Try clicking the Help button in the
Expression Builder dialog box. Doing so opens the Access Help program, where you can get
advice about building expressions.

Figure 2. 4 Validation Rule Expression

H. Validation Text

If someone enters data that violates a validation rule that you enter in the Validation Rule text
box, Access displays a standard error message. The message reads, “One or more values are
prohibited by the validation rule set for [this field]. Enter a value that the expression for this field
can accept.” If this message is too cold and impersonal for you, you can create a message of your
own for the error message dialog box. Enter your friendly message in the Validation Text text
box.

I. Required

Page 40 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
By default, no entry has to be made in a field, but if you choose Yes instead of No in the
Required box and you fail to make an entry in the field, a message box tells you to be sure to
make an entry.

Self-check-2
Test-1 Short Answer
Directions: Answer all the questions listed below.
1. When do we need to add, Modify & Delete Records?

2. Describe the purpose of Lookup data-entry in MS Access.

3. Write the input mask format for ID-123/2014.

4. Write the expression for validation rule the value between 45-100.

5. What is the need of required field properties setting in a database?

Page 41 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Operation sheet 2.1: Entering Data in a Table
 Operation title: Fill Data in a Table
 Purpose: To fill appropriate data properly
 Instruction: Use the given step below appropriately. For this operation you have given
10 minutes and you are expected to provide the answer.
 Tools and requirement: Computer & MS office 2016 application software
 Procedures in doing the task
1. Make sure you are in Datasheet View
2. Enter the data into the table by pressing the tab key to move from one cell to another
3. When you have completed the record (row), press Enter
-

 Quality Criteria: Once you complete the steps, you will be able to fill records to the table.
Page 42 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Operation sheet 2.2: Add, Edit and Delete Records
 Operation title: Add, Edit & Delete records
 Purpose: To Add, Edit and Delete records to the database properly
 Instruction: Use the given step below appropriately. For this operation you have given
15 minutes and you are expected to provide the answer.
 Tools and requirement: Computer & MS office 2016 application software
 Procedures in doing the task
Add a Record
1. Click the New Record button on the Record Navigation bar.

Page 43 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
2. Click a field value in the new record and enter data as desired.
As you enter data, you don’t have to click a Save button to save the information—Access
automatically saves the information as you enter it.

Edit a Record
1. Click the field value you want to edit and make the changes.
Page 44 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Delete a Record
You can permanently delete records that you no longer need from a table.
1. Click the record selector next to the record you want to delete.
2. Click the Delete button on the ribbon.
3. Click Yes to confirm the deletion.

Page 45 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
 Quality Criteria: Once you complete the steps, you will be able to add, edit & delete records to
the table.

Operation sheet 2.3: Creating drop-down list on your own


 Operation title: Create drop down list
 Purpose: To create a drop down or lookup list with entries
 Instruction: Use the given step below appropriately. For this operation you have given
10 minutes and you are expected to provide the answer.
 Tools and requirement: Computer & MS office 2016 application software
 Procedures in doing the task
1. In Design view, click the field that needs a drop-down list.
2. Open the Data Type drop-down list and choose Lookup Wizard, the last option in the
list.
The Lookup Wizard dialog box appears.
Page 46 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
3. Select the second option, I Will Type in the Values That I Want, and click the Next
button.
4. Under Col1 in the next dialog box, enter each item you want to appear in the drop-
down list; then click the Next button.
You can create a multicolumn list by entering a number in the Number of Columns text
box and then entering items for the list.
5. Enter a name for the field, if necessary, and click the Finish button.
Switch to Datasheet view and open the drop-down list in the field to make sure that it
displays properly.
To remove a lookup list from a field, select the field, go to the Lookup tab in the Design view
window, open the Display Control drop-down list, and choose Text Box.

 Quality Criteria: Once you complete the steps, you will be able to add, edit & delete records to
the table.

Operation sheet 2.4: Save & compile database objects


 Operation title: Save and Compile the database
 Purpose: To reuse a database or a database object

Page 47 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
 Instruction: Use the given step below appropriately. For this operation you have given
10 minutes and you are expected to provide the answer.
 Tools and requirement: Computer & MS office 2016 application software
 Procedures in doing the task
1. Open the database or database object.
2. On the File tab, click Save As.
3. Do one of the following steps:
A. To save a database in a different format, click Save Database As.
B. To save a database object in a different format, click Save Object As.
4. Click the format you want to use for the new copy.

Save a Database as an Executable-only File


1. Go to the File Menu. Ensuring you have the front-end database open, click the File tab
on the Ribbon to bring up the File menu.

2. Choose the ACCDE Format. Select Save As from the left menu.


From the Save Database As pane, select Make ACCDE and click Save As.

Page 48 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
3. Save the Executable File. Name the file and select a location for the ACCDE file, and
click Save.

Page 49 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
 Quality Criteria: Once you complete the steps, you will be able save and compile data.

Page 50 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
LAP Test 2
Instructions: Given necessary templates, tools and materials you are required to perform the
following tasks
Note: This LAP test is a continuation from LAP test 1
Task 1
1. Open the “Students Table” and enter 5 complete records.
2. Sort the table in ascending order by Full Name
3. Move the Date of Birth and Telephone Number fields so that the Date of Birth field is
now directly after the Full Name field.
4. Delete the last Record you have entered
5. Change the field size of the Full Name to 20

Task 2
1. Create executable file for your Database.

Page 51 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Unit Three: Customize basic settings
This unit to provide you the necessary information regarding the following content coverage
and topics:
 Adjust page layout to meet user requirements
 Open and view different toolbars
 Format fonts as appropriate for the purpose of the database entries
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:
 Understand different views
 Open and view different tools

Page 52 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
3.1 Adjusting Page Layout and Settings
3.1.1. Understanding Layout view

Layout view is the most intuitive view to use for report modification, and can be used for nearly
all the changes you would want to make to a report in Access. In Layout view, the report is
actually running, so you can see your data much as it will appear when printed. However, you
can also make changes to the report design in this view. Because you can see the data while you
are modifying the report, it's a very useful view for setting column widths, add grouping levels,
or performing almost any other task that affects the appearance and readability of the report.

3.1.2. Understanding Views

There are multiple ways to view a database object. The two views for tables are Design View
and Datasheet View.
 Design View is used to set the data types, insert or delete fields, and set the Primary
Key
 Datasheet View is used to enter and view the data for the records
Switching Between Design View and Datasheet View:
Click the View arrow on the Home tab and click on either Datasheet View or Design View

Figure 3. 1 Datasheet & Design Views

Page 53 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
3.2 Open and viewing different tools
Access 2016 uses the Ribbon to organize commands, just like in Access 2013 and 2010. If
you've used these versions before, Access 2016 will feel familiar. But if you are new to Access
or have more experience with older versions, you should first take some time to become familiar
with the Access 2016 interface.

Figure 3. 2 MS-Access Interface Elements


The Ribbon

Access uses a tabbed Ribbon system instead of traditional menus. The Ribbon contains multiple


tabs, each with several groups of commands. For example, the Clipboard group on the Home tab
contains commands such as Cut, Copy, and Paste.

Figure 3. 3 Ribbon

Page 54 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Some groups also have a small arrow in the bottom-right corner that you can click for even more
options.
Using the Tell me feature
If you're having trouble finding command you want, the Tell me feature can help. It works just
like a regular search bar: Type what you're looking for, and a list of options will appear. You can
then use the command directly from the menu without having to find it on the Ribbon.

Figure 3. 4 Tell me feature


The Quick Access Toolbar
The Quick Access Toolbar, located above the Ribbon, lets you
access common commands no matter which tab you are on. By
default, it shows the Save, Undo, and Redo commands. If you'd like,
you can customize it by adding additional commands.
Backstage view
Backstage view gives you various options for saving, opening, and printing your database.

Figure 3.5 Back View of Access

Page 55 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Additionally, you can use the File menu to see information about your currently open file. This
means seeing the time it was created, last modified, the owner, as well as the file size and much
more. You can also use the Compact & Repair feature, or add password protection as the owner
of a file.
The Navigation pane

The Navigation pane is a list containing every object


in your database. For easier viewing, the objects are
organized into groups by type. You
can open, rename, and delete objects using the
Navigation pane.

Self-check-3
Page 56 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Test-1 Short Answer
Directions: Answer all the questions listed below.
1. What is the difference between Design and Datasheet view?

2. List at least three Interface elements of Access 2016.

3. Describe the purpose of Backstage View.

Page 57 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Reference
 A book by Brian Underdahl, September 2005, Access Forms & Reports for Dummies.
 A book by Mark Shellman, Sasha Vodnik, New Perspectives MS Office 365 & Access
2016.
 https://www.databaseprimer.com/pages/table-relationships/
 https://www.google.com/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjP_O61zej
3AhU9gf0HHZ5TBmkQFnoECAMQAQ&url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Ficvcollege.edu.in
%2Fsites%2Fdefault%2Ffiles%2FIT%2520notes%2520for
%2520commerce4.pdf&usg=AOvVaw3WUvi4jElZlO38zciV8Iqd A Basic introduction
to MS Access
 https://www.customguide.com/access/how-to-create-a-table-in-access
 https://training.nottingham.ac.uk/Public/O2016/AccessIntroduction.pdf
 https://www.tutorialspoint.com/ms_access/ms_access_data_types.htm
 https://support.microsoft.com/en-us/office/ways-to-add-edit-and-delete-records-
5e90a80c-106d-4c55-996e-07d7200980ce
 https://www.dummies.com/article/technology/software/microsoft-products/general-
microsoft/ms-access-field-properties-for-making-sure-that-data-entries-are-accurate-
259206/
 https://www.quackit.com/microsoft_access/microsoft_access_2016/tutorial/
make_an_executable_database_in_microsoft_access.cfm

Page 58 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright
Participants of this Module (training material) preparation

No Name Level Field of Study Organization/ Mobile E-mail


Institution number

1 Abel G/Egziabher A Computer Science MOLS 0911776728 [email protected]

2 Endalew Kassa A IT Debremarkos PTC 0913305454 [email protected]

3 Frew Atkilt A Network & Bishoftu PTC 0911787374 [email protected]


Information Security

4 Getnet Alemu B IT Nefasmewucha 0922550906 [email protected]


PTC

5 Remedan Mohammed A ICT Harar PTC 0913478937 [email protected]

Page 59 of 59 Ministry of Labor and Access & Use Database Application Version -1
Skills September, 2022
Author/Copyright

You might also like