Vietnam National University Ho Chi Minh City
International University
School of Business
LECTURE 1
MS ACCESS TUTORIALS – CREATING TABLES
Instructor: Dr. Nguyen Ngoc Truong Minh
School of Electrical Engineering
International University, VNU-HCMC
Ho Chi Minh City, Fall 2023
LECTURE OBJECTIVES
This lecture is to support an introductory database system course which, to
the student, is either a service course providing an introduction to database
concepts, or, as a prerequisite for more advanced study in the field.
This discourse provides the fundamentals of Microsoft Access in a step-by-
step and hands-on fashion. This is accomplished by looking at Access
databases from an end-user perspective so that you can familiarize
yourself with what databases are, what they contain, and in general how
they are used.
2
LECTURE OUTCOMES
On successful completion of this module, you will be able to:
Learning outcomes Assessment criteria
1. Overview of Microsoft 1.1 Understand the broad overview of Microsoft Access
Access Databases 1.2 Identify some general database terminology
2.1 Explore what databases are used for and how they should be
2. Design and Create properly designed and constructed
Tables to Store Data 2.2 Learn about the specific properties and settings for tables
2.3 Some basic table design principles to follow
3.1 Facilitate data entry in a user-friendly fashion
3. Simplify Data Entry
3.2 Explain the ways forms are used in databases, and the technical
with Forms
specifics of designing and building forms
3
LECTURE CONTENT
1. Overview of Microsoft Access Databases
2. Design and Create Tables to Store Data
3. Simplify Data Entry with Forms
4
CLASS EXERCISES AND ACTIVITIES
Students will be required to complete a number of exercises and activities in
class. These activities and exercises may also contribute to obtaining a pass,
therefore, it is important that students are present in class so that they do
not forfeit the opportunity to be exposed to such exercises and activities.
Activity files that are submitted on Blackboard should be kept by the lecturer
so that they can be used as proof of criteria that were met, if necessary.
5
REFERENCE BOOKS
1. Roy McFadyen. Relational Databases and Microsoft Access 365. 2021.
2. David Murray. Microsoft Access 2019 Tutorial and Lab Manual. 2020.
3. MS Access Tutorials Point. Simply Easy Learning. 2018.
4. Using Microsoft Access Tutorial – Database Use.
5. Using Microsoft Access Tutorial – Getting Started.
6
THE USE OF ICONS
Icons are used to highlight (emphasize) particular sections or points in the
Study Guide, to draw your attention to important aspects of the work, or to
highlight activities. The following icons are used in the Study Guide:
Learning outcome alignment
This icon is used to indicate how individual units in the Study Guide are aligned to a
specific outcome and its assessment criteria
Prescribed reading
This icon indicates reference to relevant chapters and/or sections in the textbook
that you are expected to study.
Test your knowledge
This icon appears at the end of each unit in the Study Guide, indicating that you are
required to answer self-assessment questions to test your knowledge of the content
of the foregoing unit. 7
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Learning outcomes
1. Overview of Microsoft Access Databases
Assessment criteria
1.1 Understand the broad overview of Microsoft Access
1.2 Identify some general database terminology
8
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Have You Ever Used a Database?
▪ Databases store all kinds of data.
▪ Databases are either low-tech (manual) or high-tech (electronic).
▪ Databases are highly structured and organized.
▪ Databases are somewhat analogous to multiple spreadsheets that are linked
together.
▪ Databases are designed to allow easy extraction and use of the stored data.
9
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
▪ So, if you have ever used a phone book or a library card catalog, you have
indeed used a database. Also, many online search engines and e-commerce
websites rely on databases for their proper functioning, so you likely have
interacted with them. See, you may already be more familiar with databases
than you realize!
▪ Although the concept of a database may still seem foreign and new to you, it is
helpful to relate the material in this lecture to examples of databases you are
familiar with. Doing so will often help you to demystify and better understand
these strange things called databases.
10
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Relational Databases (1 of 4)
▪ We begin with a very small example: a database with one relation, the list of
employees. You should notice this looks just like a two dimensional table of
rows and columns. The name of the table is Employees, each column of the
table has its own title, and each row has the same structure.
▪ Each row has a value for employee number, first name, last name, and gender.
As tables of data appear in so many places (newspaper articles, text books,
web pages, etc.) it is very likely you have seen and used this representation for
data previously.
11
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
12
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Relational Databases (2 of 4)
▪ Let us assume the Employees table has one row for each employee who works
for some hypothetical company. Data kept for each employee comprises their
employee identification number, their first and last names, and their gender.
According to the database design methodology in Information Modeling and
Relational Databases, a database designer must be able to express structured
information as verbalizations. A verbalization that fits the information in one
row of the Employees table is:
Employee with ID … has a first name …, a last name …, and is of … gender
13
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Relational Databases (3 of 4)
▪ In verbalizations like this the ellipses are placeholders: we can use values
from a single row to create complete statements that explain the meaning of a
row. For example,
Employee with ID 123 has a first name Joe, a last name Smith, and is of Male gender
Employee with ID 333 has a first name Jim, a last name Jones, and is of Male gender
▪ A similar approach to organizing knowledge about data appears in the
literature on literacy.
14
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Relational Databases (4 of 4)
▪ Let us be a bit formal for a moment. Commercial relational database systems
are systems where data is organized into relations. Next figure shows the
general structure of a relation. We say a relation comprises a set of tuples
where each tuple has the same number of attribute values, where each
attribute value is taken from some corresponding domain, and where a domain
represents a set of valid values for an attribute.
▪ The Employees table can be considered a relation of 5 tuples where each tuple
has 4 values drawn from each of the employee identifier, first name, last name,
and gender domains. 15
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
16
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
In-class Activity 1.1
▪ To design a database, a database engineer needs to find good representations
of how an organization uses data. Good sources include: input forms, reports,
web pages, etc. A challenge for database designers is to find these sources and
interpret them.
1. Consider the following table of product information sold by ABC Foods.
Verbalize the information presented.
17
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
18
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
In-class Activity 1.2
▪ To design a database, a database engineer needs to find good representations
of how an organization uses data. Good sources include: input forms, reports,
web pages, etc. A challenge for database designers is to find these sources and
interpret them.
2. Consider the following report that the Human Resources department of ABC
Foods must produce. Verbalize the information in that report.
19
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
20
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
What is MS Access?
▪ MS Access is a Database Management System (DBMS) from Microsoft that
combines the relational Microsoft Jet Database Engine with a graphical user
interface and software development tools. It is a member of the Microsoft
Office suite of applications, included in the professional and higher editions.
▪ Microsoft Access is a relational database system for workstations that run the
Microsoft Windows operating system. MS Access is typically used by
individuals for data they use personally, but in some situations a single MS
Access database may be used by a group of people or small department.
21
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
What are MS Access file extensions?
▪ MS Access databases are stored in a single file that has a file suffix of “.accdb”
or “.mdb”. Databases created using MS Access 2007 and later have a file suffix
“.accdb”, and databases created using MS Access 2003 or earlier have a file
suffix “.mdb”.
▪ We will be using databases where the files have names ending in “.accdb”. You
need to use MS Access 2007 or later to open these databases.
22
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Features of MS Access (1 of 3)
▪ Microsoft Access is just one part of Microsoft’s overall data management
product strategy. It stores data in its own format based on the Access Jet
Database Engine.
▪ Like relational databases, Microsoft Access also allows you to link related
information easily. For example, customer and order data. However, Access
2013 also complements other database products because it has several
powerful connectivity features.
▪ It can also import or link directly to data stored in other applications and
databases.
23
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Features of MS Access (2 of 3)
▪ As its name implies, Access can work directly with data from other sources,
including many popular PC database programs, with many SQL (Structured
Query Language) databases on the desktop, on servers, on minicomputers, or
on mainframes, and with data stored on Internet or intranet web servers.
▪ Access can also understand and use a wide variety of other data formats,
including many other database file structures.
24
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Features of MS Access (3 of 3)
▪ You can export data to and import data from word processing files,
spreadsheets, or database files directly.
▪ Access can work with most popular databases that support the Open
DataBase Connectivity (ODBC) standard, including SQL Server, Oracle,
and DB2.
▪ Software developers can use Microsoft Access to develop application
software.
25
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
How to use MS Access?
Microsoft Access stores information which is called a database. To use MS Access,
you will need to follow these four steps:
▪ Database Creation - Create your Microsoft Access database and specify what
kind of data you will be storing.
▪ Data Input - After your database is created, the data of every business day can
be entered into the Access database.
▪ Query - This is a fancy term to basically describe the process of retrieving
information from the database.
▪ Report (optional) - Information from the database is organized in a nice
presentation that can be printed in an Access Report.
26
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
What Will I Find in a Microsoft Access Database? (1 of 3)
There are five main things (objects) you will find in an Access database: tables,
queries, forms, reports, and macros. Each of these topics will be covered in
greater detail throughout the subsequent chapters.
1. Tables store the data in the database and are analogous to the foundation of the
database. It is critically important that the tables be designed properly; they
provide the foundation for building the remainder of the database.
27
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
What Will I Find in a Microsoft Access Database? (2 of 3)
2. Queries enable you to extract data from your database tables and allow us to
answer questions we have about the data. Queries may combine data from
multiple tables and manipulate data output through the use of expressions,
formulas, and functions.
3. Forms are based on tables or queries, and they are used for entering data into
the database in a user-friendly manner. They are also used for displaying data to
the end user and can be used to create a menu system for the database.
28
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
What Will I Find in a Microsoft Access Database? (3 of 3)
4. Reports use data from a table or query and format the output in a professional-
looking manner. Reports provide you with the ability to summarize, sort, group,
and display the data in many different ways suited to the needs of the end user.
Often, the purpose of a report is to provide a printed output of some data in your
database.
5. Macros are small programs that you build into Microsoft Access; they perform
some advanced operations, making the database more user-friendly and/or
functional.
29
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Architecture
▪ Access calls anything that can have a name an object. Within an Access
desktop database, the main objects are tables, queries, forms, reports, macros,
data macros, and modules.
▪ If you have worked with other database systems on desktop computers, you
might have seen the term database used to refer to only those files in which
you store data.
▪ But, in Access, a desktop database (.accdb) also includes all the major objects
related to the stored data, including objects you define to automate the use of
your data.
30
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
MS Access vs. Data (1 of 3)
▪ Data Definition: In document or a spreadsheet, you generally have complete
freedom to define the contents of the document or each cell in the spreadsheet.
▪ In spreadsheet, you can have text data at the top to define a column header for
printing or display, and you might have various numeric formats within the
same column, depending on the function of the row.
▪ An RDBMS allows you to define the kind of data you have and how the data
should be stored.
▪ You can also usually define rules that the RDBMS can use to ensure the
integrity of your data.
31
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
MS Access vs. Data (2 of 3)
▪ Data Manipulation: Working with data in RDBMS is very different from working
with data in a word processing or spreadsheet program.
▪ In a word processing document, you can include tabular data and perform a
limited set of functions on the data in the document, also search for text strings
in the original document and, with ActiveX controls, include tables, charts, or
pictures from other applications.
▪ In a spreadsheet, some cells contain functions that determine the result you
want, and in other cells, you enter the data that provides the source
information for the functions. An RDBMS provides you many ways to work with
your data. 32
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
MS Access vs. Data (3 of 3)
▪ Data Control: Spreadsheets and word processing documents are great for
solving single-user problems, but difficult to use when more than one person
needs to share the data. When you need to share your information with others,
RDBMS gives you the flexibility to allow multiple users to read or update data.
▪ An RDBMS that is designed to allow data sharing also provides features to
ensure that no two people can change the same data at the same time.
▪ The best systems also allow you to group changes (which is also known as
transaction) so that either all the changes or none of the changes appear in
your data.
▪ You might also want to be sure that no one else can view any part of the order
until you have entered all of it.
33
1. OVERVIEW OF MICROSOFT ACCESS DATABASES
Test your knowledge
1. What is a relational database? What is MS Access?
2. What are the features of MS Access?
3. What are the objects in MS Access?
4. How do MS Access deal with data?
34
2. DESIGN AND CREATE TABLES TO STORE DATA
Learning outcomes
2. Design and Create Tables to Store Data
Assessment criteria
2.1 Explore what databases are used for and how they should be
properly designed and constructed
2.2 Learn about the specific properties and settings for tables
2.3 Some basic table design principles to follow
35
2. DESIGN AND CREATE TABLES TO STORE DATA
Important Key Terms (1 of 2)
▪ Database A collection of information organized in such a way that a computer
program can quickly select desired pieces of data.
▪ Field A category of information. E.g. First name or last name.
▪ Form Used in databases to make it easier to enter and modify information.
▪ Primary Key A field that can uniquely identify each record.
▪ Query A query uses a set of rules (criteria) to select specific records from
the database. 36
2. DESIGN AND CREATE TABLES TO STORE DATA
Important Key Terms (2 of 2)
▪ Record A complete set of information in a database. E.g. details about a
particular person
▪ Relationship A link between two database tables that have related
information. E.g. A link between student details and the results for each
student.
▪ Report Reports are used to present data in a neat, ready to print format.
▪ Table Data arranged in rows and columns. All database information is stored
in tables. 37
2. DESIGN AND CREATE TABLES TO STORE DATA
Possible Uses for a Database
▪ Store student details and marks
▪ Keep track of books and book loans
▪ Collect customers/suppliers information
▪ Retrieve consumer/partner contacts
▪ Secure personal health information
▪ Improve business processes
▪ Manage grocery stores
▪ Online video streaming/Social gaming
▪ Social media
▪ …
38
2. DESIGN AND CREATE TABLES TO STORE DATA
Steps in creating a database
1. Clearly define the purpose of the database.
2. Decide what information you want to get out of the database. E.g. weekly
printout of book loans.
3. Decide what information the database will need to store in order to generate
the desired output.
4. Plan tables to store the information in the database and decide what fields will
be in each table.
5. Create a database file in Access and create the tables in the database.
6. Create forms to assist in entering information.
7. Create queries to generate the required output.
8. Create reports to present the output neatly, ready for printing
39
2. DESIGN AND CREATE TABLES TO STORE DATA
No Data Type Usage Size
Alphanumeric data (names, titles, Up to 255 characters.
1 Short Text (Text)
etc.)
Large amounts of alphanumeric Up to about 1 gigabyte (GB), but
data: sentences and paragraphs. controls to display a long text
2 Long Text (Memo)
are limited to the first 64,000
characters.
3 Number Numeric data. 1, 2, 4, 8, or 16 bytes.
4 Large Number Numeric data. 8 bytes.
5 Date/Time Dates and times. 8 bytes
Date/Time Dates and times. Encoded string of 42 bytes.
6
Extended 40
2. DESIGN AND CREATE TABLES TO STORE DATA
No Data Type Usage Size
Currency Monetary data, stored with 4 decimal places of 8 bytes.
7
precision.
AutoNumber Unique value generated by Access for each new 4 bytes (16 bytes for
8
record. ReplicationID).
Boolean (true/false) data; Access stores the 1 byte.
9 Yes/No
numeric value zero (0) for false, and -1 for true.
Pictures, graphs, or other ActiveX objects from Up to about 2 GB.
10 OLE Object
another Windows-based application.
Hyperlink A link address to a document or file on the Up to 8,192 (each part
Internet, on an intranet, on a local area network of a Hyperlink data
11
(LAN), or on your local computer type can contain up to
2048 characters).
41
2. DESIGN AND CREATE TABLES TO STORE DATA
No Data Type Usage Size
Attachment Pictures, documents, spreadsheets, or charts; Up to about 2 GB.
each Attachment field can contain an unlimited
12
number of attachments per record, up to the
storage limit of the size of a database file.
Calculated An expression that uses data from one or more Dependent on the data
13 fields. You can designate different result data type of the Result Type
types from the expression. property.
Lookup The Lookup Wizard defines either a simple or Dependent on the data
complex lookup field. A simple lookup field uses type of the lookup
14 Wizard
the contents of another table or a value list to field.
validate the contents of a single value per row.
42
2. DESIGN AND CREATE TABLES TO STORE DATA
Test your knowledge
1. What do Table, Query, Form, Report mean?
2. Primary Key, Foreign Key, 1-to-1, 1-to-Many, Many-to-Many
relationships?
3. Describe different data types in MS Access.
4. Do the practical exercises under instructions.
43
3. SIMPLIFY DATA ENTRY WITH FORMS
Learning outcomes
Simplify Data Entry with Forms
Assessment criteria
3.1 Facilitate data entry in a user-friendly fashion
3.2 Explain the ways forms are used in databases, and the
technical specifics of designing and building forms
44
3. SIMPLIFY DATA ENTRY WITH FORMS
How to use form for data entry
▪ Many people find it easier to enter data with the help of a form. Especially
since we tend to fill out a lot of forms in real life more often than adding
details to the bottom of a list.
▪ Use Form View of a table. Move from one record or Field to another using
your mouse or the keyboard.
▪ Press [Tab] to move to the next field and [Shift][Tab] to move to the previous
field; Press [Page Down] to move to the next record and [Page Up] to move to
the previous record; Press [Ctrl][End] to move to the last record and
[Ctrl][Home] to move to the first record.
45
3. SIMPLIFY DATA ENTRY WITH FORMS
Test your knowledge
1. Define Field Properties (Size, Format, Default Value,
Validation, Allow Zero Length…)
2. Enter data in either table datasheet view and form.
3. Do the practical exercises under instructions.
46
END OF LECTURE 1
47