PowerPoint - Doversherborn

Download Report

Transcript PowerPoint - Doversherborn

RELATIONAL DATABASE
What is a Database?
A database is an application that organizes and stores
related data.
Some examples of data that can be organized in a
database are:
Inventory for a store
Customer Information
Student Information
Alighieri: Introduction to
MS Access
1
What can a database do?



Store millions of pieces
of data
Can retrieve data
quickly
Can reorganize data for
easy presentation and
analysis
Alighieri: Introduction to
MS Access
2
Objects of an MS Access Database
TABLES
QUERIES
FORMS
REPORTS
Alighieri: Introduction to
MS Access
3
TABLES
In a relational database, data is separated into tables
that consist of records.
This table has 3 records
Alighieri: Introduction to
MS Access
4
TABLES
Some important terms.
This is a Field
This is an entry
In this example, the VendorID
field is the Primary key.
Alighieri: Introduction to
MS Access
This is a row, each row
represents 1 record.
5
Designing a Relational Database




Determine what information should be stored
Divide information into named tables
Determine the relationship among the tables
Define the fields and determine the primary key for
each table
Alighieri: Introduction to
MS Access
6
Divide Information into Named Tables


Group related information into separate tables
For example, a database for a clothing store might
have the following tables




Inventory Information
Customer Information
Sales Information
Items Returned Information
Alighieri: Introduction to
MS Access
7
Divide Information into Named Tables

A tables that contains information on inventory might
look like this.
Alighieri: Introduction to
MS Access
8
Divide Information into Named Tables

A tables that contains customer information might
look like this.
Alighieri: Introduction to
MS Access
9
Divide Information into Named Tables

A tables that contains transaction or sales information
might look like this.
We saw this same field
on the customers
table!
Alighieri: Introduction to
MS Access
We saw this same field
on the Packs table!
10
Determine the Relationship Among Tables


When 2 tables
contain the same
field, they are said to
be related
How are the
following tables
related?
Alighieri: Introduction to
MS Access
11
Determine the Relationship Among Tables
Table 1: Student Main
Fields:
StudentID
StudentFirstName
StudentLastName
StudentPhoneHome
StudentPhoneCell
StudentCity
StudentState
Alighieri: Introduction to
MS Access
Table 2: Completed Courses
Fields:
StudentID
ComplSemester
ComplCourse1Desc
ComplCourse1Grade
ComplCourse2Desc
ComplCourse2Grade
12