Unit 1 - Part 1
Unit 1 - Part 1
Unit 1 - Part 1
INFORMATION:
Data becomes information when it is processed, turning it into
something meaningful.
Database:
• Atomicity of updates
• Failures may leave database in an inconsistent state with partial updates
carried out
• Example: Transfer of funds from one account to another should either
complete or not happen at all
• Concurrent access by multiple users
• Concurrent access needed for performance
• Uncontrolled concurrent accesses can lead to inconsistencies
• Example: Two people reading a balance (say 100) and updating it by withdrawing
money (say 50 each) at the same time
• Security problems
• Hard to provide user access to some, but not all, data
2-Tier Architecture
•The 2-Tier architecture is same as basic client-server. In the two-tier
architecture, applications on the client end can directly communicate
with the database at the server side. For this interaction, API's like:
ODBC, JDBC are used.
•The user interfaces and application programs are run on the client-
side. The server side is responsible to provide the functionalities like:
query processing and transaction management.
•To communicate with the DBMS, client-side application establishes a
connection with the server side.
3-Tier Architecture
Rows
Entity-Relationship Model
Truncate and
Drop
ALTER-is used to alter the structure of the database, Earlier the
table Person_info have attributes such as ( PersonID int, LastName
varchar(255), FirstName varchar(255), Address varchar(255), City
varchar(255) ) but at line 2 and 3 we have added a new attribute
named phone_number.
Truncate will remove the data but table will still be there e.g here data
inside table Person_info will be deleted although table will still be there.
Drop table will drop the whole table (along
with Data)
DML(Data Manipulation Language)
1. Query Processor :
(a) DML Compiler
(b) Embedded DML pre-compiler
(c) DDL Interpreter
(d) Query Evaluation Engine
OVERALL DBMS STRUCTURE
2. Storage Manager :
(a) Authorization and Integrity Manager
(b) Transaction Manager
(c) File Manager
(d) Buffer Manager
3. Data Structure :
(a) Data Files
(b) Data Dictionary
(c) Indices
(d) Statistical Data
Query Processor Components
• DML compiler: It translates DML statements in a query language
into low level instructions that query evaluation engine
understands.
• Embedded DML Pre-compiler: It converts DML statements
embedded in an application program to normal procedure calls in
the host language. The Pre-compiler must interact with the DML
compiler to generate the appropriate code.
• DDL Interpreter: It interprets the DDL statements and records
them in a set of tables containing meta data or data dictionary.
• Query Evaluation Engine: It executes low-level instructions
generated by the DML compiler.
Storage Manager Components
They provide the interface between the low-level data stored in the database and
application programs and queries submitted to the system.
• Authorization and Integrity Manager: It tests for the satisfaction of integrity
constraints checks the authority of users to access data.
• Transaction Manager : It ensures that the database remains in a consistent
state despite the system failures and that concurrent transaction execution
proceeds without conflicting.
• File Manager : It manages the allocation of space on disk storage and the
data structures used to represent information stored on disk.
• Buffer Manager : It is responsible for fetching data from disk storage into
main memory and deciding what data to cache in memory.
Data Structures
Following data structures are required as a part of the physical system
implementation.
Databas
e
Database System Internals