Participates Has
Has Game
Games
Statistics
???
6-3. Database Design Data Structure
Each attribute in a database needs to be of a
certain data type.
Data types indicate the type of data that a field
or column can hold.
In MS Access, data types include text, number,
date/time, currency and hyperlink.
Data types impose consistency on the data
values in a column or field.
Some data types come with built-in restrictions
and validation. For example, if the field DOB has
the date/time data type, the database system
will automatically check that all DOB data are
valid dates.
7. Database Management System
Now that you have identified the entities and
data required for a database, you will need a
Database Management System (DBMS) to
help you manage and use the data.
A DBMS is a specific type of software for
creating, storing, organizing and accessing
data from a database.
MS Access is a DBMS for desktop systems
and youll be using this application in your
course.
8. Operations of a DBMS
Suppose we wanted to find out which event
did ticket holders 23 or 45 attend?
We would need information from two tables:
TICKET and EVENT.
To obtain useful sets of data, such as the
information required to answer the question
above, the DBMS uses three basic
operations: select, join and project.
8. Operations of a DBMS
Select:
The select operation creates a subset consisting of all
records (rows) in the table that meet stated criteria.
In our example we want to select records from the
TICKET table where the TicketNum equals 23 or 45.
Join:
The join operation combines tables to provide you with
more information than is available in individual tables.
In our example we want to join the now-shortened
TICKET table (only tickets 23 or 45 will be presented)
and the EVENT table into a single new table.
8. Operations of a DBMS
Join Types:
Inner Join (default) on the basis of the data in the joined
fields, rows from one of the joined tables correspond to rows in
the other table.
Use an inner join if you want to return only those records from both
tables in the join that match on the joining field.
Left Outer Join left outer joins include all of the records from
the first (left) of two tables, even if there are no matching values
for records in the second (right) table.
For example, you could use LEFT JOIN with the Departments (left)
and Employees (right) tables to select all departments, including those
that have no employees assigned to them.
Right Outer Join right outer joins include all of the records
from the second (right) of two tables, even if there are no
matching values for records in the first (left) table.
For example, you could use RIGHT JOIN with the Departments (left)
and Employees (right) tables to select all employees, including those
that are not assigned to a department.
8. Operations of a DBMS
Project
The project operation creates a subset consisting
of columns in a table, permitting you to create
new tables that contain only information required.
In our example we want to extract from the new
table only the following columns: TicketNum,
TicketDesc, EventType and EventDate.
8. Operations of a DBMS
TICKET
Ribbon
Group
s
Table
Object
Name
s
Well
focus on
these
objects
in the
course
12. Create Table MS Access
On the left of the Table Tools-Datasheet
Tab/Ribbon youll see a View button. Click
the View button.
When you click the View button the
image on the left will appear. Since we
want to create or design a new Table,
well click the Design View selection.
Click
Datasheet
View
13. Data Sheet View (Table) MS Access
The data sheet allows you to enter data into the DB
next
first record record new
last
previous record record record
14. Additional Resources
For a better understanding of the major
database activities to be covered in this
module of the course, students are required
to complete the DB tutorial.
15. Database Skills
Creating and relating tables
Enforcing referential integrity
Entering and modifying data
Creating forms
Creating queries: single/multi table,
stored/calculated fields
Creating reports: with/without summaries
(aggregates)