D BMS STUDY MATERIAL
D BMS STUDY MATERIAL
D BMS STUDY MATERIAL
(60012301-1)
2
Data Models
Data Model:
A set of concepts to describe the structure of a
database, the operations for manipulating these
structures, and certain constraints that the database
should obey.
Database Structure:
By data structure, we mean the data types,
relationships, and constraints that should hold on the
data.
3
Data Models (continued)
Data Model Operations:
Operations are used for specifying retrievals and updates
on the database by referring to the concepts of the data
model.
4
Categories of Data Models
1. Conceptual (high-level, semantic) data models:
Provide concepts that are close to the way many users
perceive data. Also called entity-based or object-based data
models.
Schema Diagram:
A diagrammatic display of (some aspects of) a database schema.
Changes applied to schema as application requirements change.
Database State:
The actual data stored in a database at a particular moment in
time. Also called database instance or occurrence.
Every update operation changes the database from one state to
another
6
Example of a Database Schema
7
Example of a Database State
8
Three-Schema Architecture
Defines DBMS schemas at three levels:
Internal schema at the internal level to describe physical
storage structures and access paths.
Typically uses a physical data model.
9
Three-Schema Architecture (continued)
10
Three-Schema Architecture (continued)
Proposed to support DBMS characteristics of:
Program-data independence.
Support of multiple views of the data.
Objectives of Three-Schema Architecture:
1. All users should be able to access same data.
2. A user’s view is immune to changes made in other views.
3. Users should not need to know physical database storage
details.
4. Database administrator (DBA) should be able to change
database storage structures without affecting the users’ views.
5. Internal structure of database should be unaffected by changes
to physical aspects of storage.
6. DBA should be able to change conceptual structure of
database without affecting all users. 11
Three-Schema Architecture (continued)
12
Data Independence
Data Independence refers to the capacity to change the
schema at one level of a database system without having
to change the schema at the next higher level.
13
Data Independence (continued)
When a schema at a lower level is changed, only the
mappings between this schema and higher-level schemas
need to be changed in a DBMS that fully supports data
independence.
14
Data Independence (continued)
15
DBMS Languages
Data Definition Language (DDL):
Used by the DBA and database designers to specify the
conceptual schema of a database.
Examples: Create, alter, and drop schema.
In many DBMSs, the DDL is also used to define internal and
external schemas (views).
In some DBMSs, separate storage definition language
(SDL) and view definition language (VDL) are used to
define internal and external schemas.
16
DBMS Languages
Data Manipulation Language (DML):
A language that is used to manipulate (retrieve, insert, delete,
and modify) data.
Examples : DELETE, INSERT, SELECT, UPDATE
17
DBMS Interfaces
Stand-alone query language interfaces.
Programmer interfaces for embedding DML in
programming languages:
Pre-compiler Approach
Procedure (Subroutine) Call Approach
User-friendly interfaces:
Menu-based, popular for browsing on the web
Forms-based, designed for naïve users
Graphics-based (Point and Click, Drag and Drop etc.)
Natural language: requests in written English
Combinations of the above
18
The Database System Environment
DBMS component modules:
Buffer management
Stored data manager
DDL compiler
Interactive query interface
Query compiler
Query optimizer
Precompiler
Runtime database processor
System catalog
Concurrency control system
Backup and recovery system
19
Typical DBMS Component Module
20
Database System Utilities
Loading
Load existing data files
Backup
Creates a backup copy of the database
Database storage reorganization
Reorganize a set of database files into different file organizations
Performance monitoring
Monitors database usage and provides statistics to the DBA
Other Utilities
Sorting files
Handling data compression
Monitoring access by users 21
Tools, Application Environments, and
Communications Facilities
CASE tools
Used in the design phase
Expanded Data Dictionary(information repository)
Stores catalog information about schemas and constraints
Stores other information such as design decisions, usage
standards, application program descriptions, and user information
Application Development Environments
Provide an environment for developing database applications
Include facilities for database design, GUI development,
querying and updating, and application program development
Communications software
Allow users to access database from remote location 22
Centralized DBMS Architectures
All DBMS functionality, application program execution, and user
interface processing carried out on one machine
23
Basic Client-Server Architectures
Servers with specific functionalities
File server: Maintains the files of the client machines.
Printer server: Connected to various printers; all print
requests by the clients are forwarded to this machine
Web servers or e-mail servers
Client machines
Provide user with:
Appropriate interfaces to utilize these servers
Local processing power to run local applications
24
Basic Client-Server Architectures
(continued)
Clients
Provide appropriate interfaces through a client software
module to access and utilize the various server resources.
Clients may be diskless machines or PCs or Workstations with
disks with only the client software installed.
Connected to the servers via some form of a network.
(LAN: local area network, wireless network, etc.)
DBMS Server
Provides database query and transaction services to the clients
Relational DBMS servers are often called SQL servers, query
servers, or transaction servers
25
Two-Tire Client-Server Architectures
• Client handles
• User Interface Programs and Application Programs run on the
client side.
• Server handles
Query and transaction functionality related to SQL processing.
26
Three-Tier Client-Server Architectures
Common for Web applications.
28
Classification of DBMSs
Based on the data model used:
Traditional: Relational, Network, Hierarchical.
Emerging: Object-oriented, Object-relational.
Other classifications:
Number of users: Single-user (typically used with micro-
computers) or multi-user (most DBMSs).
Number of sites: Centralized (uses a single computer with one
database) or distributed (uses multiple computers, multiple
databases)
Cost: Open source or different types of licensing
Purpose: General or Special-purpose
Slide 1-29