Introduction to Database Concepts
and Microsoft Access 2010
National Archive and Library Agency
ICT– TOT Training
abebayf@gmail.com
0913631635
IT Center - System Department 2017
Database Concepts and Access 2007
• Introduction
– Database
– Microsoft Access
• Design and Creation
– Plan
– Tables
– Queries
– Forms
– Reports
ICT System Department 02/19/2021
What is a Database?
• A structured collection of related data
• An filing cabinet, an address book, a
telephone directory, a timetable, etc.
• In Access, your Database is your collection
of related tables
IT Center System Deparment 02/19/2021
Data vs. Information
• Data – a collection of facts made up of text, numbers
and dates:
• Information - the meaning given to data in the way it
is interpreted:
IT Center System Deparment 02/19/2021
Basic Database Concepts
Table
– A set of related records Name: Barry Harris
College: Medicine
Tel: 392-5555
Record
– A collection of data Name: Barry Harris
about an individual item College: Medicine
Tel: 392-5555
Field
– A single item of data Name: Barry Harris
common to all records
IT Center System Deparment 02/19/2021
Example of a Table
Fields
Records Name GatorLink Phone College
Smith rsmith 392-3900 Pharmacy
Thomas bthomas 392-5555 Medicine
Van Winkle sleepyguy 846-5656 PHHP
IT Center System Deparment 02/19/2021
Why Use Access?
• Familiar look and feel of Windows
• Easy to start building simple
databases
• Can build sophisticated systems
• It’s already on your computer
• True relational database
IT Center System Deparment 02/19/2021
What is a Relational Database?
• A relational database is a collection of
tables from which data can be accessed in
many different ways without having to
reorganize the database tables.
– That is, once relationships are created, tables
can “talk” to each other. We can link (relate)
the tables to find:
• Which doctors have seen a patient
• Which students are in a class
• Which item is selling the most on Friday’s
IT Center System Deparment 02/19/2021
Basic Design Rules
Organizing Data
Once you’ve chosen your fields, you need to decide if they
belong in different tables. Data should be kept in separate tables
if you have an indeterminate number of entries. One employee
can have a number of evaluations.
EMPLOYEE TABLE
Emp ID First Last Eval 1 Eval 2
Name Name
123-456 Sallye Shapiro 1/15/2010 1/14/2011
125-985 Samuel Smith 1/12/2011 EVALUATION TABLE
248-890 Sidney Samueson Emp ID Eval Date
123-456 1/15/2010
123-456 1/14/2011
123-985 1/12/2011
IT Center System Deparment 02/19/2021
Basic Design Rules
No Derived Fields
If a field you are not using as a link exists in another table, it
should not be repeated in the current table. Listing it in both
places leads to data entry errors. Since we have the Emp ID in
both tables, there is no need to include the Employee’s Last
Name in the Evaluation table.
EMPLOYEE TABLE
EVALUATION TABLE
Emp ID First Name Last Name
Emp ID Last Name Eval Date
123-456 Sallye Shapiro
123-456 Shapiro 1/15/2010
125-985 Samuel Smith
123-456 Shapiro 1/14/2011
248-890 Sidney Samueson
123-985 Smith 1/12/2011
You can use a query to pull values from both tables into one datasheet.
IT Center System Deparment 02/19/2021
Basic Design Rules
Data is broken down into Smallest Logical Parts
Each segment of data you want to sort or filter should be kept in
its own field. For example, what if I needed to sort by City or
Zip Code? Pulling fields together is fairly simple, pulling them
apart can difficult.
ID Home Address
987 123 West Main Street,
Gainesville, FL 32601
654 456 South 3rd Road, Apt 12,
Newberry, FL 32684
ID Addr1 Addr2 City State Zip
987 123 West Main Street Gainesville FL 32601
654 456 South 3rd Road Apt 12 Newberry FL 32684
You can join fields together in queries, forms and reports.
IT Center System Deparment 02/19/2021
Basic Design Rules
Descriptive Field Names
Be careful of using too many abbreviations in your field
names. You have up to 64 characters, but long field names
can be difficult to use in expressions. Be Clear, Be Concise
and Be Consistent.
EMPLOYEE TABLE
ID FN LN DOB DOH SSN CMT
1234 Sallye Shapiro 6/17/1970 7/02/2001 123-450 N/A
EMPLOYEE TABLE
Emp Emp First Emp Last Emp Birth Emp Hire Emp System Emp
ID Name Name Date Date Signal # Comments
1234 Sallye Shapiro 6/17/1970 7/02/2001 123-450 N/A
IT Center System Deparment 02/19/2021
Basic Design Rules
Unique Field Names
Often we will have the same type of data in multiple tables. IDs,
Comments, First Names, Last Names could all refer to different
datasets.
DOCTOR TABLE
PATIENT TABLE First Name Last Name
First Name Last Name Sallye Shapiro
Annie Adams Samuel Smith
April Appleton Sidney Samueson
Arnold Arlington
When these two Last Name fields are pulled
Bobbie Brown
into the same query they will appear with the
Butch Bruce
table name in front of the field name:
Patient Table.Last Name
Doctor Table.Last Name
IT Center System Deparment 02/19/2021
Basic Design Rules
No Calculated Fields
In Microsoft Excel we enter the data and create our formulas all
at once. In Access you are creating a “Data” table, a table of the
raw data. If you want Access to do the calculations, you can
create an expression elsewhere in the database.
Emp ID Hourly Hours Pay
Rate worked
123 $10.00 40 $390.00
Pt Med Height Weight BMI
Rec (m) (kg)
456-456 2 91 23
You can create calculated expressions in queries, forms and reports.
IT Center System Deparment 02/19/2021
Basic Design Rules
Unique Records
If you don’t
have unique LastName GatorLink Phone College
records, your Smith rsmith 3-5051 Pharmacy
database Smith rsmith 273-5051 COP
can’t tell Smith rsmith 273-5051 Pharmacy
which record Thomas bthomas 392-5555 Medicine
you may be Van Winkle sleepyguy 846-5656 PHHP
referring to.
LastName EmergencyContact
Smith Mary Anne Smith
IT Center System Deparment 02/19/2021
Primary Keys
LastName GatorLink Phone College
Smith rsmith 273-5051 Pharmacy
Thomas bthomas 392-5555 Medicine
Van Winkle sleepyguy 846-5656 PHHP
To ensure that each record is unique in each table, we
can set one field to be a Primary Key field.
A Primary Key is a field that that will contain no
duplicates and no blank values.
Looking at the table above, what would be the best
Primary Key?
IT Center System Deparment 02/19/2021
Primary Keys
LastName GL ID Phone College
Smith rsmith 273-5051 Pharmacy
Thomas Bthomas 392-5555 Medicine
Van Winkle sleepyguy 846-5656 PHHP
While each column in this particular data set has unique data, the
field that will work best for us is GL ID (Gator Link). Many
employees will work for the same college, have the same last
name and possibly even share telephone numbers, but each
employee should have a unique Gator Link ID.
When there is not a unique field in your data set, you can use an
AutoNumber. Access can create incremented or random Auto
Numbers for your primary key.
IT Center System Deparment 02/19/2021
Basic Design Rules
Unique Records
We use the
unique primary
key as our link ID LastName GatorLink Phone College
between our 1 Smith rsmith 3-5051 Pharmacy
tables, this helps 2 Smith rsmith 273-5051 COP
ensure we 3 Smith rsmith 273-5051 Pharmacy
connect to the 4 Thomas bthomas 392-5555 Medicine
correct record. 5 Van Winkle sleepyguy 846-5656 PHHP
Emp ID EmergencyContact
2 Mary Anne Smith
IT Center System Deparment 02/19/2021
Opening a Database
To open a database when
you start Access
– Choose the database you
wish to open from the left
hand panel, or choose
More… to browse for
another database
To Create a database, click on
the Blank Database at the top
of the middle panel
You can also use the
Microsoft button to open
existing databases or create
new ones.
IT Center System Deparment 02/19/2021
The Access Database Window
IT Center System Deparment 02/19/2021
Data View/Design View
Datasheet
View
Design
View
IT Center System Deparment 02/19/2021
Navigating Fields and Records
• To move through records and fields
Tab Home/End Page Up
Shift+Tab Ctrl+Home Page Down
Enter Ctrl+End The Arrow Keys
• To move through records
Previous Record Next Record New Record
First Record Current Record Last Record
IT Center System Deparment 02/19/2021
Introducing Tables
• Database is a collection of TABLES
• Tables store the data
IT Center System Deparment 02/19/2021
Introducing Queries
• A means of asking questions (querying) of your data
• Can look across a number of Tables and other
Queries
• Can perform Calculations and Combine fields
IT Center System Deparment 02/19/2021
Introducing Forms
• A friendlier view of the database
• Used for data input, menus, display and
printing
• Can perform Calculations and Combine fields
IT Center System Deparment 02/19/2021
Introducing Reports
• Output of information in a printed report
• Allows you to group and summarize data
• Can perform Calculations and Combine fields
• Cannot Edit Data
• Can Make Labels
IT Center System Deparment 02/19/2021
Working Together
Tables Queries
Employees
Customers
Reports
Forms
Customer
Company Name
Address
City
Telephone
Contact Name
IT Center System Deparment 02/19/2021
Let’s take a break!
IT Center System Deparment 02/19/2021