Database Chapter 01
Database Chapter 01
Learning Objectives
2
Introduction
3
Competitive advantage
Customer support
Introduction ..cont.
4
Program
SQL
Design
Program
SQL
Design
Tools:
Database Design
SQL (queries)
Programming
Best:
Spend your time
on design and SQL.
Worst:
Compensate for poor design
and limited SQL with programming.
Database:
Data:
Information:
Metadata:
Example of Data
7
Program-Data Dependence
Duplication of Data
Inconsistent data
Program-data Dependency
12
13
Duplicate
Data
14
15
Programs
Payroll
Data Definition
File 1
File 2
Benefits
Data Definition
File A
File 2
File C
Files
Pay History
Benefits
Employee
Employee
Choices
COBOL
File Division
01 Employees
02 ID
02 Name
02 Address
02 Cell Phone
01 Department
02 ID
02 . . .
Employee File
112 Davy Jones 999 Elm Street . . .
113 Peter Smith 101 Oak St . . .
More programs
File Division
01 Employees
...
18
Central database
DBMS
Contains employee,
order, inventory,
pricing, and
customer data
DBMS
19
DBMS
20
21
Elements of Database
Approach
Relational Databases
Database Applications
One-to-many relationship
Client/server
system
architecture
29
30
Two-Tier Client-Server
31
Two-Tier Client-Server
32
35
An Example of Personal
Database
An Example of Workgroup
Database
36
Program-data independence
Enforcement of standards
Components of Database
Environment
40
Components of Database
Environment
41
Hardware
PC, Mainframe, Network
computer
Software
Programming Language
Data
Procedures
Instructions and rules
People
Data and Database
Administrator, System
Developer, End-user
42
Database Management
Approach
Data is most important
All Data
DBMS
Program1
Data independence
Queries
Program2
Reports
Field Name
Data Type
Description
EmployeeID
TaxpayerID
LastName
FirstName
...
Phone
...
Number
Text
Text
Text
Autonumber..
Federal ID
CellPhone
Text
Text
Cellular . . .
DBMS Features/Components
44
Database engine
Storage,
retrieval,
update
Enforce business
rules
Performance and
ability to handle
large problems
Data dictionary
Query Processor
Utilities
Security
Report writer
Forms generator
(input screens)
Application
generator
Communications
3GL Interface
DBMS Components
45
All Data
Communication
Network
Database Engine
Data Dictionary
Security
3GL
Connector
Query Processor
Form
Report
Builder
Writer
Application
Generator
Program
Product
ItemID Description
Order
887
Dog food
OrderID ODate
Customer
946
Cat food
9874
3-3-97
CustomerID Name
9888
3-9-97
1195
Jones
2355
Rojas
Data
Tables
Product
Customer
ItemID
Integer, Unique
CustomerID
Description Integer,
Text, 100
Unique
char
Name
Text, 50 char
User Identification
Security
Access Rights
Backup and
Recovery
Utilities
Database
Engine
Data
Dictionary
Concurrency and
Lock Manager
Administration
All Data
Database Engine
Data Dictionary
Query Processor
All Data
Database Engine
Data Dictionary
Query Processor
Report Writer
Report
Format
and Query
All Data
Database Engine
Data Dictionary
Query Processor
Form Builder
Input
Form
Design
Oracle
Ingres
Informix (Unix)
DB2, SQL/DS (IBM)
Access (Microsoft)
SQL Server (Microsoft +)
Many older (Focus, IMS, ...)
Many limited PC (dBASE, Paradox, )
Hierarchical Database
54
Customers
Customer
Order
Items Ordered
Orders
Items
Item Description
998 Dog Food
764 Cat Food
Quantity
12
11
Network Database
55
Entry point
Customer
Order
Items
Ordered
Items
Entry point
Relational Database
56
Customer(CustomerID, Name,
Order(OrderID, CustomerID, OrderDate,
ItemsOrdered(OrderID, ItemID, Quantity,
Items(ItemID, Description, Price,
Object-Oriented Database
57
Order
OrderID
CustomerID
NewOrder
DeleteOrder
OrderItem
OrderID
ItemID
OrderItem
DropOrderItem
Customer
CustomerID
Name
Add Customer
Drop Customer
Change Address
Item
ItemID
Description
New Item
Sell Item
Buy Item
Government
Customer
Commercial
ContactName
Customer
ContactPhone
ContactName
Discount,
ContactPhone
NewContact
NewContact
Object 3 component
- name
- a set of properties or attributes
- a set of methods or functions
Reference:
58
Summary
59
Data,
Describe
approach
Describe components of database environment
Briefly describe the evolution of database
systems.