Chapter 1 - Emunix Emich

Download Report

Transcript Chapter 1 - Emunix Emich

CHAPTER 1:
Introduction
to Client/Server
Databases
1
A GUIDE
TO
ORACLE8
1
File-Based Approach to Data
Processing
Checking
Account
Data
Files
Checking
Account
Programs
Figure 1-1
Auto
Loan
Data
Files
1
Savings
Account
Data
Files
Auto
Loan
Programs
Savings
Account
Programs
2
Problems with Data File
Approach
Redundant programs
Duplicate data
Inconsistent data
1
3
Database Approach to Data
Processing
Checking
Account
Programs
Organizational
Database
Database
Management
System
Auto
Loan
Programs
Figure 1-2
Savings
Account
Programsh
1
4
Personal Databases
Single user’s desktop computer
DBMS and Client Database
applications are stored on user’s
workstation
All files are transmitted across
network
1
5
Personal Database Structure
File Server
1. “Listens” for file requests.
2. Sends and receives files.
Figure 1-3
Network
File Requests
Updated Files
1
Requested
Files
File Requests
Updated Files
Requested Files
User 1 Client Workstation
(DBMS Application &
Client DB Applications)
User 2 Client Workstation
(DBMS Application &
Client DB Applications)
1. Send file requests.
2. Receives files.
3. Filter data from files
and/or
4. Add new data to files.
1. Send file requests.
2. Receives files.
3. Filter data from files
and/or
4. Add new data to files.
6
Client/Server Databases
DBMS process runs on server
Client applications run on user’s
workstation
Data requests are transmitted to
DBMS
DBMS only returns filtered data
1
7
Client/Server Database
Structure
Database Server (DBMS Process)
1. “Listens” for data requests, new data, and updates.
2. Filters requested data from the
database and sends it to client.
Figure 1-4
Network
Data Request.
Data input/update
1
Filtered Data
Filtered Data
Data Request.
Data Input/Update.
User 1 Client Workstation
(Client DB Application)
User 2 Client Workstation
(Client DB Application)
1. Send data request.
2. Receive filtered data.
or
3. Send data input or update.
1. Send data request.
2. Receive filtered data.
or
3. Send data input or update.
8
Other Advantages of
Client/Server Databases
Handling server and client failures
Processing transactions
Handling high data volumes
Providing security
Servicing multiple simultaneous
users
1
9
The Oracle8 Environment
SQL*Plus
PL/SQL
Developer
1
Procedure Builder
Query Builder
Form Builder
Report Builder
Graphics Builder
Project Builder
Oracle Application Server (Web pages)
10
Overview of Databases
Hierarchical
Parent-to-child relationships
Relationships maintained using pointers
Relational
Data stored in tables
Relationships created through shared
key fields
1
11
Hierarchical Database
1
Figure 1-5
12
Relational Database Terms
Table: Matrix with columns and
rows
Column: Data category
Also called fields
Row: Contains actual data values
Also called records
1
13
Relational Database With Two
Tables
1
Figure 1-6
14
Relational Database Terms
Primary key: Field whose value must
be unique for each record
Candidate key: Field that could be
used for primary key
Foreign key
1
Value must be a primary key in another
table
Used to create a relationship
15
Creating a Relationship With a
Foreign Key
1
Figure 1-7
16
Relational Database Terms
Composite key: Primary key created
using multiple fields
Surrogate key: Numerical value
generated by the database for use as a
primary key
1
17
Example of a Composite
Primary Key
Figure 1-8
1
18
Case Study Databases
Clearwater Traders
Mail-order clothing and sporting goods
retailer
Northwoods University
University registration system
1
19
Clearwater Traders Tables
CUSTOMER
CUST_ORDER
ITEM
INVENTORY
SHIPPING
1
BACKORDER
ORDERLINE
COLOR
ORDERSOURCE
20
Lookup Tables
Lookup table: List of legal values for a field
COLOR
ORDERSOURCE
1
21
Northwoods University Tables
STUDENT
FACULTY
LOCATION
TERM
COURSE
1
COURSE_SECTION
ENROLLMENT
22