Chapter 3 Slides
Chapter 3 Slides
Chapter 3
Types of Files
File 1
Fact A Sales
Fact B Program
Fact C
File 2
Fact B Shipping
Fact D Program
Fact E
File 3
Fact A Billing
Fact G Program
Fact E
Databases
The database approach views data as an
organizational resource that should be used
by, and managed for, the entire organization,
not just the originating department or
function.
Its focus is data integration and data sharing.
Integration is achieved by combining master
files into larger pools of data that can be
accessed by many application programs.
Databases
Database management system (DBMS)
is the program that manages and
controls access to the database.
Database system is the combination of
the database, the DBMS, and the
application program that uses the
database.
Database administrator (DBA) is the
person responsible for the database.
Database Approach
Fact A
Database
Fact B Shipping
management
Program
Fact C system
Fact D
Fact E Billing
Program
Relational Databases
Database
Operating
DBMS system
Logical and Physical
Views of Data
Program-data independence is
the separation of the logical and
physical views of data.
Schemas
Cash receipt
Schemas
Cash receipt
Mapping conceptual level facts to internal level descriptions
Inventory Record
Item number – integer (5), non-null, index = item x
Description – character (15)
The Data Dictionary
Operation and
Planning
maintenance
Data
modelin Requirements
g occurs Implementation
analysis
here
Design Coding
The REA Data Model
Economic
Duality
GIVE
Resource B Outflow Participant Internal Agent
Resource B
Sample REA diagram
Participant
Economic
Customer
Duality
Participant
Cash
Cash Stock-flow Participant Cashier
Receipts
REA Diagram, Step 1:
Identify Economic Exchange Events
Customer
Inventory- (1,N) (1,1) Participant (0,N) Customer
Orders
Orders
(0,N) (1,1)
(0,1) Participant
(0,N)
Inventory- Leads to
Inventory (0,N) Salesperson
Sales (0,N)
(0,1)
(1,N)
Participant
(1,1)
Sales
(0, N)
Sales Made to Customer
Continued…
(1,1) (0, N)
Sales Made to Customer
Continued…
(0, N)
Sales Made to Customer
Continued…
(1,1) (0, N)
Sales Made to Customer
Continued…
Cash
Sales (0,1) (1,1)
Receipts
Different types of relationships
Cash
Sales (0,N) (1,1)
Receipts
Different types of relationships
Cash
Sales (0,1) (1,N)
Receipts
Different types of relationships
Cash
Sales (0,N) (1,N)
Receipts
Entity-Relationship Diagram
An Entity-Relationship (E-R) diagram is one
method for portraying a database schema.
It is called an E-R diagram because it shows
the various entities being modeled and the
important relationships among them.
In an E-R diagram, entities appear as
rectangles, and relationships between entities
are represented as diamonds.
Sample E-R Diagrams
Managed
Employers By
Supervisors
Part of
Manages
Departments
(0,N) (1,1)
Participant
(0,N)
Purchases-
Cash Vendor
Disbursements
Participant (0,N)
(1,N) (1,1)
Cash
Cash (0,N) Stockflow (1,1) (1,1) Participant (0,N) Cashier
Disbursement
Implementing an REA Diagram in a Relational
Database
(0,N) (1,1)
Participant
(0,N)
Purchases-
Cash Vendor
Disbursements
Participant (0,N)
(1,N) (1,1)
Cash
Cash (0,N) Stockflow (1,1) (1,1) Participant (0,N) Cashier
Disbursement
Create Tables
From the previously discussed REA diagram, nine
tables would be created: one for each of the seven
entities and one for each of the many-to-many
relationships.
1. Inventory 6. Cash
disbursements
2. Purchases
7. Cash
3. Employees
8. Purchases-
4. Vendors inventory
5. Cashier 9. Purchases-cash
disbursements
Assign Attributes for Each Table
Cash Sales-
(1, N) Cash Receipts (0, N) Sales
Receipts
Documentation of Business Practices
Cash Sales-
(1, N) Cash Receipts (0, N) Sales
Receipts
Extracting Information From the AIS