DBMS Unit 1 Notes
DBMS Unit 1 Notes
DBMS Unit 1 Notes
SYSTEMS
UNIT-I
What is Database Management System- Advantage
of DBMS over File Processing System - Introduction
and applications of DBMS- Purpose of database
system- Views of data- Database system
Architecture- Data Independence- The evolution of
Data Models- Degrees of Data Abstraction- Database
Users and DBA- Database Languages
1.1 WHAT IS DATABASE MANAGEMENT
SYSTEMS?
1.2 Disadvantage of File-oriented system:
1. Data Redundancy:
It is possible that the same information may be duplicated in
different files. this leads to data redundancy results in memory
wastage.
2. Data Inconsistency:
Because of data redundancy, it is possible that data may not be
in consistent state.
3. Difficulty in Accessing Data:
Accessing data is not convenient and efficient in file processing
system.
4. Limited Data Sharing:
Data are scattered in various files.also different files may have
different formats and these files may be stored in different
folders may be of different departments.
So, due to this data isolation, it is difficult to share data among
different applications.
5. Integrity Problems:
Data integrity means that the data contained in the database in
both correct and consistent.for this purpose the data stored in
database must satisfy correct and constraints.
6. Atomicity Problems:
Any operation on database must be atomic.
this means, it must happen in its entirely or not at all.
7. Concurrent Access Anomalies:
Multiple users are allowed to access data simultaneously. this is
for the sake of better performance and faster response.
8. Security Problems:
Database should be accessible to users in limited way.
Each user should be allowed to access data concerning his
requirements only.
1.3 Database Applications:
1.4 Purpose of Database Systems
1.5 Views of Data:
❖Integrity Manager
❖Transaction Manager
❖File Manager
❖Buffer Manager
•Authorization Manager –
It ensures role-based access control, i.e,. checks whether the particular person
is privileged to perform the requested operation or not.
•Integrity Manager –
It checks the integrity constraints when the database is modified.
•Transaction Manager –
It controls concurrent access by performing the operations in a scheduled way
that it receives the transaction. Thus, it ensures that the database remains in
the consistent state before and after the execution of a transaction.
•File Manager –
It manages the file space and the data structure used to represent information
in the database.
•Buffer Manager –
It is responsible for cache memory and the transfer of data between the
secondary storage and main memory.
1.6.2 Disk Storage :
❖ It contains the following components –
❖Data Files
❖Data Dictionary
❖Indices
•Data Files –
which store the database itself.
•Data Dictionary –
It conatins meta data that is data about data. The schema of a table is an
example of meta data. A database system consults the data dictionary before
reading and modifying actual data.
•Indices –
which provides fast access to data limits that hold particular values.
1.6.3 Query Processor :
It interprets the requests (queries) received from end user via an application program
into instructions. It also executes the user request which is received from the DML
compiler.
DML Compiler –
It processes the DML statements into low level instruction (machine language), so that
they can be executed.
Select * from student;( address,aadhar no)
DDL Interpreter –
It processes the DDL statements into a set of table containing meta data (data about
data).
Query Optimizer –
It executes the instruction generated by DML Compiler.
1.6.4 Database Users and Administrators
The primary goal of DBMS - to retrieve the information from the database & store new
information into the database.
4 types of database-system users, depending upon the way they interact with system
(3)Sophisticated Users:
•Interact with the system without writing programs.
•Instead they form their request either using a database query language or using tools
such as data analysis software.
•Analysts who submit queries to explore the data in the database falls in this category.
(4)Specialized users:
• Write specialized database applications that do not fit into the traditional data
processing framework.
•Among these applications are computer-aided design systems, knowledge base and
expert systems, systems that store with complex data types ( for example, graphics
and audio data) and environment modeling systems.
1.6.4.2 Database Administrator(DBA):
The person who has central control over the system is called Database
Administrator(DBA):
• Schema definition : The DBA creates a original database schema by executing a set
of data definition statements in DDL.
• Schema and physical-organization modification: The DBA carries out the changes to
the schema.
• Granting of authorization for data access: By granting different types of
authorization, the DBA can regulate different users accessing different parts of
database.
1-Tier Architecture
•In this architecture, the database is directly available to the user. It means the user
can directly sit on the DBMS and uses it.
•Any changes done here will directly be done on the database itself. It doesn't provide
a handy tool for end users.
•The 1-Tier architecture is used for development of the local application, where
programmers can directly communicate with the database for the quick response.
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.
•The Extensible Markup Language, also known as XML, is widely used for
representing the semistructured data.
•Although XML was initially designed for including the markup information to
the text document, it gains importance because of its application in the
exchange of data.
1.8.5. Hierarchical database model
A hierarchical database model is a data model in which the data are organized into
a tree-like structure. The data are stored as records which are connected to one
another through links.
A record is a collection of fields, with each field containing only one value.
The type of a record defines which fields the record contains.
1.8.6. Network model
•This model is the generalization of the hierarchical model.
•This model can consist of multiple parent segments and these segments are grouped
as levels but there exists a logical association between the segments belonging to any
level.
• Mostly, there exists a many-to-many logical association between any of the two
segments.
•We called graphs the logical associations between the segments.
•Therefore, this model replaces the hierarchical tree with a graph-like structure, and
with that, there can more general connections among different nodes.
Commands:
Grant: used to give user access privileges to database.
Revoke: used to take back permissions from user.