Data Modeling and Database Design
Chapter 1: Database Systems: Architecture
and Components
Chapter 1 – Database Systems: Architecture and Components 2
Terminology
• Data• Information• Metadata
Chapter 1 – Database Systems: Architecture and Components 3
Data Management
1. Creation of data
2. Retrieval of data
3. Update or modification of data
4. Deletion of data
For that, data must be accessed and, for the ease of access, data must be organized.
Chapter 1 – Database Systems: Architecture and Components 4
Exercise
Assume you want to organize your DVD collection. The only tool available is an Excel sheet. What would your columns and rows in Excel look like?
Chapter 1 – Database Systems: Architecture and Components 5
Exercise (continued)
Maybe like this?
Chapter 1 – Database Systems: Architecture and Components 6
Data Management
Only two approaches for accessing data exist:• Sequential access• Direct access
Important:
A DBMS facilitates access of data without burdening the user with details of how the data is physically organized.
Chapter 1 – Database Systems: Architecture and Components 7
History of Data Management
1950 1960 1970 1980 1990 2000
File systems
Hierarchical DBMS
Network DBMS
Relational DBMS
Object-oriented DBMS
Chapter 1 – Database Systems: Architecture and Components 8
Limitations of File-Processing Systems
• Lack of Data IntegrityData integrity (data values are correct, consistent, complete, and current) is often violated in isolated environments.
• Lack of StandardsOrganizations find it hard to enforce standards for naming data items as well as for accessing, updating, and protecting data.
• Lack of Flexibility/MaintainabilityFile-processing systems are not amenable to structural changes in data and are therefore dependent upon a programmer who can either write or modify program code.
Chapter 1 – Database Systems: Architecture and Components 9
Limitations of File-Processing Systems (continued)
The limitations to file-processing systems are due to:• Lack of Data Integration
Data are separated and isolated in a file-processing environment.
• Lack of Program-Data IndependenceThe structure of each file is embedded in the application programs.
Chapter 1 – Database Systems: Architecture and Components 10
Limitations of File-Processing Systems (continued)
Student ProcessingApplications
Faculty and StaffProcessingApplications
AlumniProcessingApplications
STUDENTFiles
ALUMNIFiles
FACULTY and STAFF Files
Users
Users
Users
Figure 1.1 An example of a fi le processing environment
Chapter 1 – Database Systems: Architecture and Components 11
So, What Is Desirable?
• Integrated data – Not data in isolation to be integrated by the application
program/programmer
• Data Independence– Application program(s) immune to changes in storage
structure and access strategy
– Independent user views of data
Chapter 1 – Database Systems: Architecture and Components 12
History of Data Management
In the 1970s, the Standards Planning and Requirements Committee (SPARC) of the American National Standards Institute (ANSI) proposed what came to be known as the ANSI/SPARC three-schema architecture: conceptual, internal and external schema.
Chapter 1 – Database Systems: Architecture and Components 13
EXTERNALSCHEMA
CONCEPTUAL SCHEMA
EXTERNALSCHEMA
INTERNAL SCHEMA
STORED DATABASE
. . . . . . . .Individual User Views
Global View
Storage View
Figure 1.2 The ANSI / SPARC three-schema Architecture
Three Perspectives of Metadata in a Database
Chapter 1 – Database Systems: Architecture and Components 14
Conceptual Schema
• Core of the architecture• Represents the global view of the structure of the
entire database for a community of users• Captures data specification (metadata)• Describes all data items and relationships between
data together with integrity constraints• Separates data from the program (or views from the
physical storage structure)• Technology independent
Chapter 1 – Database Systems: Architecture and Components 15
Internal Schema
• Describes the physical structure of the stored data (e.g., how the data is actually laid out on storage devices)
• Describes the mechanism used to implement access strategies (e.g., indexes, hashed addresses, etc.)
• Technology dependent• Concerned with the efficiency of data storage and
access mechanisms
Chapter 1 – Database Systems: Architecture and Components 16
External Schema
• Represents different user views, each describing portions of the database
• Technology independent• Views are generated exclusively by logical references
Chapter 1 – Database Systems: Architecture and Components 17
Physical and Logical Data Independence
• Physical Data Independence
Definition: External views unaffected by changes to the internal structure
How?: Introduction of conceptual schema between the external views and the internal (physical) schema
Physical and Logical Data Independence (continued)
• Logical Data Independence
Definition: External views unaffected by design changes (growth or restructuring) in conceptual schema
How?: External views generated exclusively through logical reference to elements in the conceptual schema
Consequence: External views unaffected by changes to other external views
Chapter 1 – Database Systems: Architecture and Components 18
Chapter 1 – Database Systems: Architecture and Components 19
What is a Database System?
• A self-describing collection of integrated records
Self-describing
The structure of the database (metadata) is recorded within the database system – not in the application programs.
Integrated
The responsibility for 'integrating' data items as needed is assumed by the DBMS instead of the programmer.
Chapter 1 – Database Systems: Architecture and Components 20
Characteristics of a Database System
Database
A single, integrated set of files
Database Management System (DBMS)
A collection of general-purpose software that facilitates the process of defining, constructing, and manipulating a database for various applications
Chapter 1 – Database Systems: Architecture and Components 21
ApplicationProgram 4
ApplicationProgram 3
Application Program 2
ApplicationProgram 1
ApplicationProgram 5
User-friendly Database Interrogation
Data Items(Minimal/Controlled Redundancy)
Management
A
C
DB HF
E IG
Users
Users
Figure 1.4 An early view of a database system*
*Adapted From Richard L. Nolan, "Computer Data Bases: The Future is Now," Harvard Business Review, (September-October, 1973)
An Early View of a Database System
Chapter 1 – Database Systems: Architecture and Components 22
What is a Database?
A database is a self-describing collection of interrelated files.
• Data consists of recorded facts that have implicit meaning.
• Viewed through the lens of metadata, the meaning of recorded data becomes explicit.
• A database is self-describing in that the metadata is recorded within the database – not in applications programs.
Chapter 1 – Database Systems: Architecture and Components 23
What is a Database Management System (DBMS)?
A DBMS is a collection of general-purpose software that facilitates the processes of defining, constructing, and manipulating a database.
Chapter 1 – Database Systems: Architecture and Components 24
Components of a DBMS
The major components of a DBMS include one or more query languages; tools for generating reports; facilities for providing security, integrity, backup and recovery; a data manipulation language for accessing the database; and a data definition language used to define the structure of data.
Chapter 1 – Database Systems: Architecture and Components 25
Query Language[SQL]
Data Manipulation Language[DML/SQL]
Security & Recovery[DCL/SQL]
Report Generator
Access RoutinesData Definition Language
[DDL/SQL]
Database Management System [DBMS]Software component
Figure 1.5 Components of a database system
Database{Contains Data}
Computer-aidedSof tware Engineering
Tools[CASE Tools]
Data Repository{Data Models
Metadata}
Data Dictionary{DBMS Metadata}
Components of a Database System
Chapter 1 – Database Systems: Architecture and Components 26
Student ProcessingApplications
Faculty and StaffProcessingApplications
AlumniProcessingApplications
DatabaseManagement
System
Users
Users
Users
Database
Figure 1.6 An example of a database system
An Example of a Database System
Chapter 1 – Database Systems: Architecture and Components 27
Types of Database Systems
• Number of usersSingle-user
Desktop database systemMulti-user
Workgroup database systemEnterprise database system
• ScopeDesktop database systemWorkgroup database systemEnterprise database system
Chapter 1 – Database Systems: Architecture and Components 28
Some Commercial DBMS
• IBM & DB2: www-306.ibm.com/software/data/db2/
• Oracle: www.oracle.com/database/index.html
• Microsoft & SQL Server: www.microsoft.com/sql/default.mspx
Chapter 1 – Database Systems: Architecture and Components 29
Important Terms
• Data Integrity (correct, consistent, complete and current)
• Data Redundancy
Chapter 1 – Database Systems: Architecture and Components 30
Data Models
• A model is an expression of “observed or unobservable” reality.
• Example: chair versus department• A database represents some aspect of the real world
that is called the Universe of Interest.• The initial step in the design process is the
requirements specification activity (i.e., business rules).
Chapter 1 – Database Systems: Architecture and Components 31
Steps in Database Design
• Conceptual design ---> Conceptual schema capturing user-specified business rules– Tool: e.g., ER modeling, NIAM modeling– Presentation Layer ER Model
ER diagram and semantic integrity constraints– Design-Specific ER Model
Coarse and fine level of granularity
Steps in Database Design (continued)
• Logical Design ---> Logical schema – Tool: normalization– Architecture: hierarchical, network, or relational
• Physical Design– Specifying internal storage structure and access
strategies
Chapter 1 – Database Systems: Architecture and Components 32
Chapter 1 – Database Systems: Architecture and Components 33
Steps in Database Design (continued)