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:
❑ MySql
❑ Oracle
❑ SQL Server
❑ IBM DB2
❑ Amazon SimpleDB (cloud based) etc.
LECTURE-2
File System vs Database management System
• File System :
File system is basically a way of arranging the files in a storage medium
like hard disk. File system organizes the files and helps in retrieval of files
when they are required. File systems consists of different files which are
grouped into directories. The directories further contain other folders and
files. File system performs basic operations like management, file naming,
giving access rules etc.
• DBMS(Database Management System) :
Database Management System is basically a software that manages the
collection of related data. It is used for storing data and retrieving the
data effectively when it is needed. It also provides proper security
measures for protecting the data from unauthorized access. In Database
Management System the data can be fetched by SQL queries and
relational algebra. It also provides mechanisms for data recovery and data
backup.
Disadvantage of using file systems
• Data redundancy and inconsistency
• Multiple file formats, duplication of information in different files
• Difficulty in accessing data
• Need to write a new program to carry out each new task
• Data isolation
• Multiple files and formats
• Integrity problems
• Integrity constraints (e.g., account balance > 0) become “buried” in program code
rather than being stated explicitly
• Hard to add new constraints or change existing ones
Disadvantage of using file systems
• 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
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.
Database
Database System Internals