Client/Server Databases and The Oracle9i Relational Database
Client/Server Databases and The Oracle9i Relational Database
A Guide to Oracle9i 1
Objectives
• Develop an understanding of the purpose of database systems
A Guide to Oracle9i 2
Before Databases
• Information was kept in files:
– Each field describes one piece of information about student
– Fields are separated by commas
– A record is a collection of related fields
– Each record is a separate line
A Guide to Oracle9i 3
Problems with Files
• Proliferation of
data management
programs to deal
with different file
formats
• Redundant data
stored in files
• Data files may
contain
inconsistent data
A Guide to Oracle9i 4
Database Approach
• Database stores all organizational data in a central location
A Guide to Oracle9i 5
Early Databases –
Hierarchical Structure
A Guide to Oracle9i 6
Relational Databases
A Guide to Oracle9i 7
Relational Database Terms
A Guide to Oracle9i 8
Primary Keys
• Primary key
– Value must be unique for each record
– Serves to identify the record
– Present in every record
– Can’t be NULL
– Should be numeric
A Guide to Oracle9i 9
Candidate Keys
• Candidate key
– Any field that could be used as the primary key
– Should be a unique, unchanging numeric field
A Guide to Oracle9i 10
Surrogate Keys
• Surrogate key: created to be the record’s primary key identifier when
no suitable primary key exists
A Guide to Oracle9i 11
Foreign Keys
• Foreign key: a field in a table that is a primary key in another table
• Foreign key creates a relationship between the two tables
• Foreign key value must exist in the table where it is a primary key
A Guide to Oracle9i 12
Composite Keys
A Guide to Oracle9i 13
Personal Database
Management Systems
• DBMS and database applications run on the same workstation and
appear to the user as a single integrated application
A Guide to Oracle9i 14
Client/Server Database
Management Systems
• Client/server database
– Takes advantage of distributed processing and networked
computers by distributing processing across multiple computers
– DBMS server process runs on one workstation, and the database
applications run on separate client workstations across the network
– Preferred for database applications that retrieve and manipulate
small amounts of data from databases containing large numbers of
records because they minimize network traffic and improve
response times
• Organizations generally use a client/server database if the
database will have more than 10 simultaneous users and if the
database is mission critical
A Guide to Oracle9i 15
Client/Server Database Architecture
A Guide to Oracle9i 16
The Oracle9i Client/Server Database
• Oracle9i is the latest release of Oracle Corporation’s relational
database
• All Oracle server- and client-side programs use Oracle Net, a
utility that enables the network communication between the
client and the server
A Guide to Oracle9i 17
Client-Side Utilities
• SQL*Plus
– for creating and testing command-line SQL queries and executing
PL/SQL procedural programs
• Oracle9i Developer Suite
– for developing database applications including the following Developer
tools:
• Forms Builder
– for creating custom user applications
• Reports Builder
– for creating reports for displaying, printing, and distributing summary
data
• Enterprise Manager
– for performing database administration tasks such as creating new user
accounts and configuring how the DBMS stores and manages data
A Guide to Oracle9i 18
Design Principles
• To avoid creating tables that contain redundant data, group
related items that describe a single entity together in a common
table
• Recall that primary key fields should use a number data type to
avoid typographical, punctuation, and case variation errors
A Guide to Oracle9i 19
The Clearwater Traders
Sales Order Database
Clearwater Traders
• Markets a line of clothing and sporting goods via mail-order
catalogs
• Accepts customer orders via telephone, mail, and fax
• Wants to begin accepting orders using its Web site
• Has decided to offer 24-hour customer order service
• Existing microcomputer-based database system cannot handle
current transaction volume
• Managers concerned that the current database does not have
the failure-handling and recovery capabilities needed for an
ordering system that cannot tolerate failures or downtime
A Guide to Oracle9i 20
Clearwater Traders Data
Requirements
• Customer name, address, daytime and evening telephone numbers,
user names, and passwords
A Guide to Oracle9i 21
Clearwater Traders
Table Relationships
A Guide to Oracle9i 22
The Northwoods University
Student Registration Database
Northwoods University
• Decided to replace its aging mainframe-based
student registration system with a more modern
client/server database system
A Guide to Oracle9i 23
The Northwoods University
Student Registration Database (cont)
• Faculty members must be able to retrieve student
course lists, drop and add students, and record
course grades
A Guide to Oracle9i 24
Northwoods University
Data Requirements
• Student name, address, telephone number, class (freshman,
sophomore, junior, or senior), date of birth, PIN (personal
identification number), and advisor ID
A Guide to Oracle9i 25
Northwoods University
Table Relationships
A Guide to Oracle9i 26
The Software Experts Project
Management Database
Software Experts
• Consulting firm that creates custom software applications
• Managers determine the number and the skill sets of the consultants
that a given project requires
A Guide to Oracle9i 27
Software Experts Requirements
A Guide to Oracle9i 28
Software Experts Requirements
• Project information, including the project name, the client
associated with the project, associated subprojects, the
project manager, and required skill sets
A Guide to Oracle9i 29
Software Experts Table
Relationships
A Guide to Oracle9i 30
Summary
• A database stores all organizational data in a central location
• Database management system (DBMS) provides a central set
of common functions for managing a database, including
– Inserting
– Updating
– Retrieving
– Deleting data values
• Most modern databases are relational databases
– Store data in a tabular format
– Columns represent different data fields
– Rows contain individual data records
A Guide to Oracle9i 31
Summary
• In a relational database
– Data about different entities is stored in separate tables
– You create relationships that link related data using key
fields
• A database system consists of
– DBMS: manages the physical data storage
– Database applications: provide the user interface to the
database
• Many database systems use a client/server architecture
– DBMS runs as a server process
– Database applications run as client processes
A Guide to Oracle9i 32