Database System
Concepts and
Architecture
database system
data
Application DBMS data
catalog metadata
Slide 2-5
**
Client/Server Database System
Slide 2-7
*
Data Model and Schema
used database
data in the Database
model creation Schema
data
of DBMS catalog
data
p 26-27
Slide 2-9
2.1 Data Models
Basically, a data model is:
It is an aid to thinking.
Slide 2-10
*
Data Models at Design Time
Slide 2-11
Data Model is a Conceptual Framework
Slide 2-12
*
2.1 Data Models
relational
...
What are the categories? What category does relational fit into?
What other kinds of data models are there? p 26-27
Slide 2-13
**
Data Models
Data Model: A set of concepts to describe the
database structure and constraints.
data model categories
data model types high-level implementation physical
• UML is a
• Entity-Relationship
• Network
• Hierarchical
• Relational
• Object Oriented
• Object Relational
Slide 2-14
*
Categories of Data Models
p 26-27
Slide 2-15
*
Notes
data model
Slide 2-16
*
2.2 Schema Architecture
Database Schema: The description of a database.
Includes descriptions of the database structure and
the constraints that should hold on the database.
p 26-27
Slide 2-17
FIGURE 2.2 The three-schema architecture. **
Slide 2-18
*
2.2 Schema Architecture
Where
are
we
headed?
This is the way the schema looks when we use the relational data model
Slide 2-20
*
Figure 2.8 The schema of Figure 2.1 in network
model notation.
This is the way the schema looks when we use the network data model
Slide 2-21
*
FIGURE 2.1 Schema diagram for the database
in Figure 1.2.
Schema
This is the way the schema looks when we use the network data model
Slide 2-22
*
Another Schema diagram
Schema
This is the way the schema looks when we use the hierarchical data model
Slide 2-23
FIGURE 2.2 The three-schema architecture. **
Slide 2-24
*
Categories of Schema
External schema describes part of a database that
a particular user or users are interested in.
Using the relational model, these are views
data
catalog
Slide 2-26
Let's see. STUDENTS take
COURSES which have
PREREQUISITES and SECTIONS.
But does GRADE_REPORT belong
with STUDENTS or COURSES?
Slide 2-27
*
FIGURE 2.1 Schema diagram for the database
in Figure 1.2.
"schema
construct"
Schema
Slide 2-28
*
Notes
database schema
internal schema
conceptual schema
external schema
Slide 2-29
Who is the User of Schema?
Database Schema: The description of a database.
Includes descriptions of the database structure and
the constraints that should hold on the database.
Slide 2-30
Other Topics: Database Instances
• Database Instance: The actual data stored in a
database at a particular moment in time. Also
called database state (or occurrence).
data
Slide 2-31
Database Schema Vs. Database State
Slide 2-33
FIGURE 2.2 The three-schema architecture. **
Slide 2-34
Three-Schema Architecture
Slide 2-35
Don't forget - that's External,
Conceptual, then Internal.
And have a nice day, or else.
Slide 2-36
Conceptual Schema
Slide 2-37
Example of a Conceptual Schema **
Java java.exe
Application javac.exe
Java
Java Virtual
.java Compiler .class
Machine
Java Java JDBC
Source byte-code Driver
contains PostgreSQL
conceptual data
DBMS catalog
schema
This schema is installed in the PostgreSQL DBMS catalog.
Slide 2-39
Notes
Slide 2-40
Three-Schema Architecture
Schemas
Programs refer to an external schema,
and are mapped by the DBMS to the External
internal schema for execution.
Conceptual
Mappings among schema levels are
needed to transform requests and Internal
data.
Slide 2-41
2.2.2 Data Independence
Schemas
• Logical Data Independence: The
capacity to change the conceptual schema External
without having to change the external
schemas and their application programs.
Conceptual
• Physical Data Independence: The
capacity to change the internal schema Internal
without having to change the conceptual
schema.
Slide 2-42
Reference
Data Independence
Slide 2-43
Notes
Slide 2-44
2.3 DBMS Languages
Internal
In our StudentRecords project, the DDL
statements were the SQL statements:
CREATE TABLE, and DROP TABLE.
Slide 2-45
DBMS Languages
Slide 2-46
Notes
Slide 2-47
DBMS Languages
Slide 2-49
Figure 2.3 Component modules of a DBMS and their
interactions.
create database create table
create users update table
p. 35
Slide 2-50
You must be joking.
Right? Right?
Slide 2-51
*
2.4 Database System Utilities
Slide 2-52
Slide 2-53
Will this class never end?
Slide 2-54
Notes
Slide 2-55
2.5
and
Slide 2-56
Figure 2.4 A physical centralized architecture for
DBMS.
Slide 2-57
Centralized Architecture for DBMS
• Centralized DBMS:
(as shown on previous slide)
combines everything into single system
including-
DBMS software,
hardware,
application programs, and
user interface processing software.
Slide 2-58
2.5.2 Basic Client-Server Architecture
Slide 2-59
Basic Client-Server Architecture *
Clients:
Slide 2-61
Basic Client-Server Architecture
DBMS Server
Slide 2-62
Two-Tier Client-Server Architecture
Slide 2-63
Basic Client-Server Architecture
Our Programming Assignment Environment
etowah.cs.unca.edu
Java
Source
database
Java
Compiler csci343
DBMS various tables
server
Java
Virtual postgresql
Machine
Slide 2-64
Notes
Slide 2-65
If you thought two-tier was great, Mr. Anderson,
wait 'till you see three-tier.
Slide 2-66
Three-Tier Client-Server Architecture **
Slide 2-67
2.5.4 Three Tier Client-Server Architecture
Slide 2-69
*
Notes
Slide 2-70
Notes
Slide 2-71
2.6 Classification of DBMSs
• Relational DBMS
• Network DBMS
• Hierarchical DBMS
• Object-oriented DBMS
• Object-relational DBMS
Slide 2-72
2.6 Classification of DBMSs
Slide 2-73
2.6 Classification of DBMSs
Slide 2-74
2.6 Classification of DBMSs
single multi-
user user
• Relational DBMS ss ss ms
• Network DBMS
• Hierarchical DBMS
• Object-oriented DBMS
• Object-relational DBMS
our programming
ss = single site assignment environment
ms = multi-site
Slide 2-75
Variations of multi-site (Distributed)
Environments:
• Homogeneous DDBMS
The same DBMS software at all sites
• Heterogeneous DDBMS
Different DBMS software at sites
Slide 2-76
Federated
Slide 2-77
Recall
Slide 2-78
Illustration of Federated Architecture
Slide 2-79
**
Ch 02 Review Questions
Slide 2-80
Notes
Slide 2-81
Appendix
Slide 2-82
History of Data Models
"Those who cannot learn from history are doomed to repeat it."
George Santayana (1863-1952).
Slide 2-83
History of Data Models (1/4)
Slide 2-84
History of Data Models (2/4)
Slide 2-85
Hierarchical Data Model (3/4)
• ADVANTAGES:
• Hierarchical Model is simple to construct and operate on
• Corresponds to a number of natural hierarchically organized
domains - e.g., assemblies in manufacturing, personnel
organization in companies
• Language is simple; uses constructs like GET, GET
UNIQUE, GET NEXT, GET NEXT WITHIN PARENT etc.
• DISADVANTAGES:
• Navigational and procedural nature of processing
• Database is visualized as a linear arrangement of records
• Little scope for "query optimization"
Slide 2-86
Network Data Model (4/4)
• ADVANTAGES:
• Network Model is able to model complex relationships and
represents semantics of add/delete on the relationships.
• Can handle most situations for modeling using record types
and relationship types.
• Language is navigational; uses constructs like FIND, FIND
member, FIND owner, FIND NEXT within set, GET etc.
Programmers can do optimal navigation through the database.
• DISADVANTAGES:
• Navigational and procedural nature of processing
• Database contains a complex array of pointers that thread
through a set of records.
Little scope for automated "query optimization”
Slide 2-87
History of Data Models
end
Slide 2-88
Notes
Slide 2-89
2.3.2 DBMS Interfaces
Slide 2-90
Other DBMS Interfaces
Slide 2-91
Two-Tier Client-Server Architecture
Slide 2-92
Two-Tier Client-Server Architecture
Slide 2-93
out
Slide 2-94
2.1 Data Models
Slide 2-95
Categories of Data Models
types
Schema external conceptual internal
uses uses uses
concepts
Data Model Categories: high-level implementation physical
(conceptual)
Specific Data Model
Relational Relational
Example:
Slide 2-97
Other Topics: Schema Construct
• Schema Construct: A component of the schema
or an object within the schema, e.g., STUDENT,
COURSE.
Slide 2-98
DDL
Slide 2-99
2.3 DBMS Languages
Slide 2-101