Professional Documents
Culture Documents
Banks
Travel Agents
Application
Data DBMS
Programs
4
Introducing the Database
• Importance of DBMS
– It helps make data management more
efficient and effective.
– It provides end users better access to
more and better-managed data.
– It promotes an integrated view of
organization’s operations -- “big
picture.”
– It reduces the probability of inconsistent
data. 5
The DBMS Manages the Interaction
Between the End User and the Database
6
Introducing the Database
8
Common Data Elements
(concept of fields, records, and
files)
10
A Simple File System
11
File System
Critique
• File System Data Management
– File systems require extensive
programming in a third-generation
language (3GL).
– As the number of files expands,
system administration becomes
difficult.
– Making changes in existing file
structures is important and
difficult.
– Security features to safeguard
data are difficult to program and
12
usually omitted.
File System
Critique
• Structural and Data Dependence
– Structural Dependence
A change in any file’s structure
requires the modification of all
programs using that file.
– Data Dependence
A change in any file’s data
characteristics requires changes in all
data access programs.
– Significance of data dependence is the
difference between the data logical
format and the data physical format. 13
File System
Critique
• Field Definitions and Naming Conventions
– A good (flexible) record definition
anticipates reporting requirements by
breaking up fields into their components.
• Example:
14
File System
Critique
• Field Definitions and Naming
Conventions
– Selecting proper field names is very
important.
• Names must be as descriptive as
possible within restrictions.
• Naming must reflect designer’s
documentation needs and user’s
reporting and processing
requirements.
15
File System
Critique
FIELD CONTENTS
CUS_LNAME Customer last name
CUS_FNAME Customer first name
CUS_INITIAL Customer initial
CUS_AREACODE Customer area code
CUS_PHONE Customer phone
CUS_ADDRESS Customer street address or box number
CUS_CITY Customer city
CUS_STATE Customer state
16
File System
Critique
• Data Redundancy:
Uncontrolled data redundancy sets the
stage for
– Data Inconsistency (lack of data integrity)
– Data anomalies
• Modification anomalies
• Insertion anomalies
• Deletion anomalies
17
Database
Systems
• The Database System Components
– Hardware
• Computer
• Peripherals
– Software
• Operating systems software
• DBMS software
utilities software
18
Database
Systems
• The Database System Components
– People
• Systems administrators (SA)
(Dbo)
• Database designers
• End users
– Procedures (sp)
• Instructions and rules that govern the design
• Workgroup
• Enterprise
21
Database
Systems
• The types of Database Systems
– Location
• Centralized Database
• Distributed Database
– Use
• Transactional (Production)
• Decision support
• Data warehouse
22
Database
Systems
• DBMS Functions
1.Data Dictionary Management
2.Data Storage Management
3.Data Transformation and Presentation
4.Security Management
5.Multi-User Access Control
6.Backup and Recovery Management
7.Data Integrity Management
8.Database Access Languages (DDL and DML)
and Application Programming Interfaces
9.Database Communication Interfaces
23
Database Models
• A database model is a collection of logical
constructs used to represent the data
structure and the data relationships found
within the database.
26
Hierarchical Database
Models
• Hierarchical Database Model
– Basic Structure
• Collection of records logically
organized to conform to the upside-
down tree (hierarchical) structure.
• The top layer is perceived as the parent
of the segment directly beneath it.
• The segments below other segments
are the children of the segment above
them.
• A tree structure is represented as a 27
hierarchical path on the computer’s
Types of Database Data Models -
Hierarchical
The first database systems developed were
hierarchical
• Databases using the hierarchical model
• use physical pointers to link records
Pointer Based
Linkages Between
Entities
Location Prof# Name Office# 1st Student Pointers give the
physical location of a
P10 J13 Jones SB312 P203
related set of data, the
P11 M7 Morgen BA218 P200 location values
P12 D23 Davis SB 106 P201 (P10, P201, etc.) in our
example are meant to
represent this type of
Class Next physical location. Real
Location Stud# S_name Standing Prof_Stud pointers usually
P200 1234 Smith Fr P202 indicate a displacement
P201 4678 Davis So P204
P202 2943 Evans Fr P206
in a file. Instead of the
P203 1874 Allen Jr P205 P203 value in the first
P204 4017 Lloyd Fr * professor record
P205 2318 Marx Sr P207 we would see an
P206 6021 Keen So * indicator that the
P207 5503 Watts Jr * related data begins at
the 4028th byte of the 29
file that stores student
Pointer Based Linkages
Between Entities
Class
Standin Next
Location Stud# S_name g Prof_Stud
P200 1234 Smith Fr P202
P201 4678 Davis So P204
P202 2943 Evans Fr P206
P203 1874 Allen Jr P205
P204 4017 Lloyd Fr *
P205 2318 Marx Sr P207
P206 6021 Keen So *
P207 5503 Watts Jr * 30
Types of Database Data Models -
Hierarchical
The first database systems developed were
hierarchical
• Databases using the hierarchical model
• use physical pointers to link records
• allow only hierarchical relationships
Hierarchical
• A hierarchical
relationship is one
where each entity at a
lower level of the A
hierarchy is related to
only one type of entity
at a higher level of the
hierarchy (a higher B C
level entity can be
linked to two or more
lower level “child”
entities)
32
Types of Database Data
Models - Hierarchical
The first database systems developed were
hierarchical
• Databases using the hierarchical model
• use physical pointers to link records
• allow only hierarchical relationships
+Hierarchical databases provide very
efficient “high-speed” retrieval
– They are difficult to modify as an
organization’s data needs change
– It is difficult to use them to
represent non-hierarchical
relationships
(essentially you must create
multiple linked hierarchical
Types of Database Data
Models - Network
The next type of data model developed was the
network model
• Databases using the Network model
• use physical pointers to link records - like
the hierarchical model
• do support network as well as hierarchical
relationships
+Network databases provide very efficient
“high-speed” retrieval
+Can represent network, as well as,
hierarchical relationships easily
– Are difficult to modify as an organization’s
data needs change
– Have complex pointer structures which can
be difficult to manipulate and hard for end-
34
users to understand.
Network Relationships
38
Relational Database
Model
- Advantages
• Structural independence
• Improved conceptual simplicity
• Easier database design, implementation,
management, and use
• Ad hoc query capability (SQL)
• Powerful database management system
– Disadvantages
• Substantial hardware and system software
overhead
• Possibility of poor design and implementation
• Potential “islands of information” problems
39
A Relational Schema
40
Entity-Relationship Data
Model
• Entity-Relationship Data Model
– It is one of the most widely
accepted graphical data modeling
tools.
– It graphically represents data as
entities and their relationships in
a database structure.
– It complements the relational data
model concepts. 41
Entity-Relationship Data
Model
• Entity Relationship Data Model
– Basic Structure
• E-R models are normally
represented in an entity
relationship diagram (ERD).
• An entity is represented by a
rectangle.
• Each entity is described by a set
of attributes. An attribute
describes a particular
characteristics of the entity.
• A relationship is represented by
a diamond connected to the
42
related entities.
The ER Diagram
43
Entity-Relationship Data
Model
• Entity-Relationship Data Model
– Advantages
• Exceptional conceptual simplicity
• Visual representation
• Effective communication tool
• Integrated with the relational database model
– Disadvantages
• Limited constraint representation
• Limited relationship representation
• No data manipulation language
• Loss of information content
44
Types of Database Data
Models - Object Oriented
• Object-Oriented Database Model
– Basic Structure
• Objects are abstractions of real-world
entities or events.
• Attributes describe the properties of an
object.
• Objects that share similar characteristics
are grouped in classes.
• A class is a collection of similar objects with
shared structure (attributes) and behavior
(methods).
• Classes are organized in a class hierarchy. 45
•
Types of Database Data
•
Models - Object Oriented
Object-Oriented Database Model
– Characteristics
• An object is described by its factual
content.
• An object includes information about
relationships between the facts within
the object, as well as with other
objects.
• An object is a self-contained building
block for autonomous structures.
46
Types of Database Data
•
Models - Object Oriented
Object-Oriented Database Model
– Advantages
• Add semantic content
• Visual presentation includes semantic content
• Database integrity
• Both structural and data independence
– Disadvantages
• Lack of OODM standards
• Complex navigational data access
• Steep learning curve
• High system overhead slows transactions
47
A Comparison: The OO Data Model and
the ER Model
48
Centralized Versus Decentralized
Database Systems
Terminal Terminal
Only I/O Only I/O
Central DB done here
done here
Computer
All processing
related to DB
Terminal System done
Terminal
here
Only I/O
Only I/O
done here
done here
Centralized Versus Decentralized
Database Systems
53