2-Module 1 - Data Independence and Three Schema Architecture-18!12!2024
2-Module 1 - Data Independence and Three Schema Architecture-18!12!2024
and Architecture
Introduction and motivation, Data independence, Three schema architecture, Centralized and
Client/Server architectures, Database components, Database users, Entity Types, Entity Sets,
Attributes, Entity Type (Strong and Weak), Relationship Types, Relationship Sets, Roles, Structural
Constraints, ER diagram construction. Dr.Selva Kumar S (SCOPE)
Data Models, Schemas, and Instances
Data Models
• Data models refer to how the logical structure of a database is made.
• The data model acts as a conceptual tool that describes the data relationship, data
semantics, and data constraints.
• The database uses a tier architecture so we need to design the database at physical,
logical, and view level
• Semistructured
Dr.Selva Kumar S Data
(SCOPE) Model
Data Models, Schemas, and Instances
Schema
• It is used to logically represent the structure of a database along with the relationship and organization
between them.
Types of Schema
Conceptual schemas
• It is used to gather the initial requirements of projects by offering a detailed view of the system.
Logical database schemas
• It implies the rules that govern the database and define schema with tables, view, relationship, and
integrity constraints.
Physical database schemas
• Data gets stored within disk storage i.e. this schema refers to the actual storage of data.
Dr.Selva Kumar S (SCOPE)
Data Models, Schemas, and Instances
Schema Example
• The main purpose of the three levels of data abstraction is to achieve data
independence. As the database changes and expands over time, the changes
in one level mustn’t affect the data at other levels of the database. This
would save time and cost required while changing the database.
1.Using a new storage device like SSD, magnetic tape, hard disk, etc.
3.Using a different data access method or using an alternative file organization technique.
• If we make any changes in the logical level then the user view of the data remains
unaffected. The changes in the logical level are required whenever there is a
change in the logical structure of the database.
The changes in the logical level may include:
• Adding, deleting, or updating any new attribute, entity or relationship in the database.
Examples: Students(sid: string, name: string, login: string, age: integer, gpa: real)
Faculty(fid: string, fname: string, sal: real)Dr.Selva Kumar S (SCOPE)
Centralized and Client-Server DBMS Architectures
Centralized DBMSs Architecture
• It is maintained and modified from that location only and usually accessed
using an internet connection such as a LAN or WAN. The centralized
database is used by organizations such as colleges, companies, banks etc.
Disadvantages:
• The data traffic in the case of a centralized
database is more.
• The client/server architecture is based on the hardware and software components that interact
to form a system.
• The system includes three main components: Clients, Servers and Communication Middleware
Two main types of basic DBMS architectures were created on this underlying client/server
framework:
two-tier and three-tier
Dr.Selva Kumar S (SCOPE)
Centralized and Client-Server DBMS Architectures
Physical two-tier client/server architecture.
• In a Two-tier Architecture, the server manages the database functionality. It makes it possible
for the clients to use the Database through APIs (Application Programming Interfaces) over a
direct internet connection.
ODBC (Open Database Connectivity) and JDBC( Java Database Connectivity).
Dr.Selva Kumar S (SCOPE)
Centralized and Client-Server DBMS Architectures
Three-Tier and n-Tier Architectures for Web Applications.
• Storage Manager
Query Processor
• The query Processor components in DBMS accepts SQL commands generated from a variety of user
interfaces, produce query evaluation plans, and execute these.
DML compiler: This translates DML statements in a query language to low-level instructions that the query
evaluation engine understands.
Embedded DML compiler: SQL commands can be embedded in host-language application programs, ex:
JAVA or COBOL programs.
DDL interpreter: which interprets DDL statements and records them in a set of tables containing metadata.
Query Evaluation Engine: which executes low-level instructions generated by the DML compiler.
Application programs object code: which is the low-level instructions of the programs written by naïve users,
which the query evaluation engine understands and executes.
Dr.Selva Kumar S (SCOPE)
DBMS Component Modules
Storage Manager
• The storage manager components in DBMS provide the interface between the physical level
stored data in the database and the programs/queries requesting the stored data from the
database.
Authorization and integrity manager: which tests for the satisfaction of integrity constraints and checks
the user’s to access data.
Transaction manager: This ensures that the data remains in a consistent state despite of the system
failures, and the concurrent transaction executions proceed without conflict.
File manager: which manages the allocation of space on disk storage and the data structures used to
represent the stored information on disk.
Buffer manager: which is responsible for fetching data from disk storage into main memory,
and deciding what data to cache in memory.
Lock manager: which keeps track of requests for locks and grants locks on the data in the
database.
Recovery manager: this is responsible for maintaining a log and restoring the system to
consistent state after a crash.
• Data Dictionary: which stores metadata about the structure of the database.
• Indices: which provide fast access to data items that hold particular values.
• Statistical Data: which stores statistical information about the data in the database.
Dr.Selva Kumar S (SCOPE)