DBMS Notes
DBMS Notes
DBMS Notes
2
Chapter 1
Databases and Database Users
3
Overview
Chapter-1: Databases and Databases Users
1. Introduction : Types of databases and functionalities
1.2 An Example (University Database)
1.3 Characteristics of the Database Approach
1.3.1 Self-Describing Nature of a Database System
1.3.2 Insulation between Programs and Data, and Data Abstraction
1.3.3 Support of Multiple Views of the Data
1.3.4 Sharing of Data and Multiuser Transaction Processing
1.4 Actors on the Scene
1.4.1 Database Administrators
1.4.2 Database Designers
1.4.3 End Users
1.4.4 System Analysts and Application Programmers (Software Engineers)
1.5 Workers behind the Scene
1.6 Advantages of Using the DBMS Approach 4
Types of Databases and Database
Applications
Traditional Applications:
Numeric and Textual Databases
More Recent Applications:
Multimedia Databases
Geographic Information Systems (GIS)
Data Warehouses
Real-time and Active Databases
Many other applications
We will focus on traditional applications of
database to solve mini-world problems.
5
Basic Definitions
Database:
A collection of related data.
Data:
Known facts that can be recorded and have an implicit
meaning.
Mini-world or the Universe of discourse (UoD) :
Represents some aspects /parts of the real world about which
7
Typical DBMS Functionality (continued)
Application program: accesses the database by sending queries
or requests for data to the DBMS.
A query typically causes some data to be retrieved; a transaction
may cause some data to be read and some data to be written into
the database.
Protection includes system protection against hardware or software
malfunction (or crashes), unauthorized or malicious access.
DBMS must be able to maintain the database system by allowing
the system to evolve as requirements change over time.
Database system: To complete our initial definitions, we will call the
database and DBMS software together a database system.
Figure I.I illustrates some of the concepts we have discussed so far.
8
Simplified database system environment
9
Example of a Database
(with a Conceptual Data Model)
Mini-world for the example:
Part of a UNIVERSITY environment.
Some mini-world entities:
STUDENTs
COURSEs
SECTIONs (of COURSEs)
(academic) DEPARTMENTs
INSTRUCTORs
Example of a Database
(with a Conceptual Data Model)
Some mini-world relationships:
SECTIONs are of specific COURSEs
STUDENTs take SECTIONs
COURSEs have prerequisite COURSEs
INSTRUCTORs teach SECTIONs
COURSEs are offered by DEPARTMENTs
STUDENTs major in DEPARTMENTs
query processing
Providing backup and recovery services.
25
Overview
Chapter-2 : Database System Concepts and Architecture
2. Introduction
2.1 Data models, Schemas and Instances
2.1.1 Categories of Data Models
2.1.2 Schemas, Instances, and Database State
2.2 Three schema architecture and data independence
2.2.1 The Three-Schema Architecture
2.2.2 Data Independence
2.3 Database languages and interfaces
2.3.1 DBMS Languages
2.3.2 DBMS Interfaces
2.4 DBMS system environment
2.4.1 DBMS Component Modules
2.4.2 Database System Utilities
2.4.3 Tools, Application Environments
In-Class Exercise & Assignment 26
Data Model & Data Abstraction
Data Model:
A data model is a collection of concepts that can
be used to describe the structure of a database-
provides the necessary means to achieve this
abstraction. By structure of a database we mean
the data types, relationships, and constraints
that apply to the data.
Data abstraction:
It generally refers to the hiding of details of data
organization and storage, and the highlighting of
the essential features for an improved
understanding of data.
27
Categories of Data Models
High-level or conceptual data models: provide concepts
that are close to the way many users perceive data.
Low-level or physical data models: provide concepts that
describe the details of how data is stored on the computer’s disk.
An access path is a structure that makes the search for particular
database records efficient.
An index is an example of an access path that allows direct access
to data using an index term or a keyword.
Between these two extremes we have,
Representational or implementation data models provide
concepts that may be easily understood by end users but that are
not too far removed from the way data is organized in computer
storage (hard disks).
Copyright © 2015 Ramez Elmasri and Shamkant B. Navathe
Categories of Data Models (Continued)
Conceptual data models use concepts such as
entities, attributes, and
relationships.
Entity represents a real-world object or concept, such as
an
Attribute represents some property of interest that further
employee or a project from the mini-world.
describes an entity, such as the employee's name or salary.
Relationship among two or more entities represents
association
an among the entities,
Example, a works-on relationship between an employee and a
project. (See chapter-3 : Entity-Relationship model).
Project
Employee works-
on
Schemas, Instances, and Database State
Schemas: The description of a database is called the database
schema.
Schema diagram: A displayed schema is called a
schema
diagram. (See Figure 2.1)
Schemas, Instances, and Database State
Schema construct: Each object in the schema - such as
STUDENT or COURSE- is a schema construct.
Database state or Snapshot: The data in the database at a
particular moment in time is called a database state or
snapshot . It is also called the current set of occurrences or
instances.
The distinction between database schema and database
state is very important.
When we define a new database, we specify its database
schema only to the DBMS. At this point, the corresponding
database state is the empty state with no data. We get
the initial state of the database when the database is first
populated or loaded with the initial data.
Copyright © 2015 Ramez Elmasri and Shamkant B. Navathe
Three-Schema Architecture and
Data Independence
Three of the four important characteristics of the database
approach:
(1) Use of a catalog to store the database description (schema) so as
to make it self-describing,
(2) Insulation of programs and data (program-data and program-
operation independence), and
(3) Support of multiple user views.
The Three-Schema Architecture
The Three-Schema Architecture
1. Internal schema (Internal level) at the internal level to
describe physical storage structures and access paths.
Typically uses a physical data model.
and users/DBA.
Passive data dictionary is accessed by users/DBA
only.
Application Development Environments and CASE
(computer-aided software engineering) tools:
Examples – Power builder (Sybase), Builder (Borland)
41
Copyright © 2015 Ramez Elmasri and Shamkant B. Navathe
Review questions
1. Define the following terms: data model, database schema, database state,
internal schema, conceptual schema, external schema, data independence,
access path, DDL, DML, SDL, VDL, query language, host language, data
sublanguage, database utility etc.
2. List down the main categories of data models.
3. What is the difference between a database schema and a database state?
4. What is the difference between logical data independence and physical data
independence?
5. Draw the diagram of three-schema architecture.
6. What is the difference between procedural and nonprocedural DMLs?
7. List down the different types of user-friendly interfaces.
8. With what other computer system software does a DBMS interact?
9. Discuss the main categories of data models.
10. Explain the three-schema architecture with the help of its diagram.
11. Discuss the different types of user-friendly interfaces and the types of users who
typically use each.
12. Discuss some types of database utilities and tools and their functions. 42