0% found this document useful (0 votes)
53 views

Unit-1 Dbms

This document provides an introduction to database management systems (DBMS). It discusses the disadvantages of file-oriented data storage and outlines the key benefits of using a DBMS, including reduced data redundancy, improved data integrity and security, and concurrent access. The document defines what a database is and explains the basic concepts of a DBMS, including its role in interacting with the file system, enforcing data integrity and security, and providing backup/recovery and concurrency control.

Uploaded by

Lakshmi Pithani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Unit-1 Dbms

This document provides an introduction to database management systems (DBMS). It discusses the disadvantages of file-oriented data storage and outlines the key benefits of using a DBMS, including reduced data redundancy, improved data integrity and security, and concurrent access. The document defines what a database is and explains the basic concepts of a DBMS, including its role in interacting with the file system, enforcing data integrity and security, and providing backup/recovery and concurrency control.

Uploaded by

Lakshmi Pithani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Data Base Management System

Unit-1
Introduction

DBMS

DBMS: Basic Concepts

1. Introduction
2. Disadvantages of file oriented approach
3. Database
4. Database Vs File system
5. Database Management System(DBMS)
6. Function of DBMS
7. Advantages of DBMS and disadvantage of DBMS
8. Database Basics
9. Concepts of Schema
10. Database users and Data models
11. Database Independence
12. Database System structure
13. Centralized and client-server architecture for the database (1-tier,2-tier architecture )
14. Three tier (3-tier ) architecture

Unit-1
Page 1
Data Base Management System

1. Introduction:

In computerized information system data is the basic resource of the organization.


So, proper organization and management for data is required fro organization to run
smoothly. Database management system deals the knowledge of how data stored and
managed on a computerized information system. In any organization, it requires accurate
and reliable data for better decision making, ensuring privacy of data and controlling data
efficiently.
The examples include deposit and/or withdrawal from a bank,hotel,airline or railway
reservation, purchase items from supermarkets in all cases, a database is accessed.

What is data:

Data is the known facts or figures that have implicit meaning. It can also be defined as it
is the representation of facts ,concepts or instruction in a formal manner, which is suitable
for understanding and processing. Data can be represented in alphabets(A-Z, a-z),in
digits(0-9) and using special characters(+,-.#,$, etc)
e.g: 25, “ajit” etc.

Information:
Information is the processed data on which decisions and actions are based. Information
can be defined as the organized and classified data to provide meaningful values.
Eg: “The age of Ravi is 25”

File:
File is a collection of related data stored in secondary memory.

File manager:
File manager manages the allocation of space on disk storage and the data structure used
to represent information stored on disk.

2. File Oriented approach:


The traditional file oriented approach to information processing has for each application a
separate master file and its own set of personal file. In file oriented approach the program
dependent on the files and files become dependent on the files and files become
dependents upon the programs
Disadvantages of file oriented approach:
1) Data redundancy and inconsistency:
The same information may be written in several files. This redundancy leads to
higher storage and access cost. It may lead data inconsistency that is the various
copies of the same data may longer agree for example a changed customer address
may be reflected in single file but not else where in the system.

2) Difficulty in accessing data :


The conventional file processing system do not allow data to retrieved in a
convenient and efficient manner according to user choice.
Unit-1
Page 2
Data Base Management System

3) Data isolation :
Because data are scattered in various file and files may be in different formats
with new application programs to retrieve the appropriate data is difficult.
4) Integrity Problems:
Developers enforce data validation in the system by adding appropriate code in
the various application program. How ever when new constraints are added, it is
difficult to change the programs to enforce them.
5) Atomicity:
It is difficult to ensure atomicity in a file processing system when transaction
failure occurs due to power failure, networking problems etc.
(atomicity: either all operations of the transaction are reflected properly in the
database or non are)
6) Concurrent access:
In the file processing system it is not possible to access a same file for
transaction at same time
7) Security problems:
There is no security provided in file processing system to secure the data from
unauthorized user access.

3. Database:
A database is organized collection of related data of an organization stored in
formatted way which is shared by multiple users.
The main feature of data in a database are:

1. It must be well organized


2. it is related
3. It is accessible in a logical order without any difficulty
4. It is stored only once
for example:
consider the roll no, name, address of a student stored in a student file. It is collection of
related data with an implicit meaning.
Data in the database may be persistent, integrated and shared.
Persistent:
If data is removed from database due to some explicit request from user to remove.
Integrated:
A database can be a collection of data from different files and when any redundancy
among those files are removed from database is said to be integrated data.
Sharing Data:
The data stored in the database can be shared by multiple users simultaneously with out
affecting the correctness of data.

Why Database:
In order to overcome the limitation of a file system, a new approach was required.
Hence a database approach emerged. A database is a persistent collection of logically
related data. The initial attempts were to provide a centralized collection of data. A

Unit-1
Page 3
Data Base Management System
database has a self describing nature. It contains not only the data sharing and integration
of data of an organization in a single database.

A small database can be handled manually but for a large database and having
multiple users it is difficult to maintain it, In that case a computerized database is useful.
The advantages of database system over traditional, paper based methods of record
keeping are:
 compactness:
No need for large amount of paper files
 speed:
The machine can retrieve and modify the data more faster way then human being
 Less drudgery: Much of the maintenance of files by hand is eliminated
 Accuracy: Accurate,up-to-date information is fetched as per requirement of the
user at any time.

Database manager:
A database manager is a program module which provides the interface between
the low level data stored in the database and the application programs and queries
submitted tothe system.
The responsibilities of database manager are:
1. Interaction with file manager: The data is stored on the disk using the file
system which is provided by operating system. The database manager translate
the the different DML statements into low-level file system commands. so The
database manager is responsible for the actual storing,retrieving and updating
of data in the database.
2. Integrity enforcement:The data values stored in the database must satisfy
certain constraints(eg: the age of a person can't be less then zero).These
constraints are specified by DBA. Data manager checks the constraints and if
it satisfies then it stores the data in the database.
3. Security enforcement:Data manager checks the security measures for
database from unauthorized users.
4. Backup and recovery:Database manager detects the failures occurs due to
different causes (like disk failure, power failure,deadlock,s/w error) and
restores the database to original state of the database.
5. Concurrency control:When several users access the same database file
simultaneously, there may be possibilities of data inconsistency.

4. Database Vs File system


Database File system
1.It is easy to design 1. It is expansive to design
2. DBMS is a software for managing the database. 2. File system is a software that manages
and organizes the files in a storage medium
within a computer.
3. In DBMS there is no redundant data. 3. Redundant data can be present in a file
system.
4. It provides backup and recovery of data even if 4. It doesn’t provide backup and recovery
it is lost. of data if it is lost.
Unit-1
Page 4
Data Base Management System
5. Efficient query processing is there in DBMS. 5. There is no efficient query processing in
file system.
6. There is more data consistency because of the 6. There is less data consistency in file
process of normalization. system.
7. DBMS has more security mechanisms as 7. File systems provide less security in
compared to file system. comparison to DBMS.

Database Management System (DBMS):


A database management system consists of collection of related data and refers to a set of
programs for defining, creation, maintenance and manipulation of a database.

5. Function of DBMS:

1. Defining database schema: it must give facility for defining the database
structure also specifies access rights to authorized users.
2. Manipulation of the database: The dbms must have functions like insertion of
record into database updation of data, deletion of data, retrieval of data
3. Sharing of database: The DBMS must share data items for multiple users by
maintaining consistency of data.
4. Protection of database: It must protect the database against unauthorized users.
5. Database recovery: If for any reason the system fails DBMS must facilitate data
base recovery.

7 1 .Advantages of dbms:

Reduction of redundancies:
Centralized control of data by the DBA avoids unnecessary duplication of data and
effectively reduces the total amount of data storage required avoiding duplication in the
elimination of the inconsistencies that tend to be present in redundant data files.
Sharing of data:
A database allows the sharing of data under its control by any number of application
programs or users.
Data Integrity:
Data integrity means that the data contained in the database is both accurate and
consistent. Therefore data values being entered for storage could be checked to ensure

Unit-1
Page 5
Data Base Management System
that they fall with in a specified range and are of the correct format.

Data Security:
The DBA who has the ultimate responsibility for the data in the dbms can ensure that
proper access procedures are followed including proper authentication schemas for access
to the DBS and additional check before permitting access to sensitive data.
Conflict resolution:
DBA resolve the conflict on requirements of various user and applications. The DBA
chooses the best file structure and access method to get optional performance for the
application.
Data Independence:
Data independence is usually considered from two points of views; physically data
independence and logical data independence.
1.Physical data Independence allows changes in the physical storage devices or
organization of the files to be made without requiring changes in the conceptual view or
any of the external views and hence in the application programs using the data base.
2.Logical data independence indicates that the conceptual schema can be changed
without affecting the existing external schema or any application program.

7 2 . Disadvantage of DBMS:
1. DBMS software and hardware (networking installation) cost is high
2. The processing overhead by the dbms for implementation of security, integrity
and sharing of the data.
3. centralized database control
4. Setup of the database system requires more knowledge, money, skills, and time.
5. The complexity of the database may result in poor performance.
3. Applications

 Banking: all transactions


 Airlines: reservations, schedules Universities:
 Sales: customers, products, purchases
 Online retailers: order tracking, customized recommendations
 Manufacturing: production, inventory, orders, supply chain
8. Database Basics:

Data item:
The data item is also called as field in data processing and is the smallest unit of data
that has meaning to its users.
Eg: “e101”,”sumit”

Entities and attributes:

An entity is a thing or object in the real world that is distinguishable from all other
objects
Eg:
Bank,employee,student

Unit-1
Page 6
Data Base Management System
Attributes are properties are properties of an entity.
Eg:
Empcode,ename,rolno,name
Logical data and physical data :

Logical data are the data for the table created by user in primary memory.
Physical data refers to the data stored in the secondary memory.

9 . Data Schema and sub-schema :

A schema is a logical data base description and is drawn as a chart of


the types of data that are used. It gives the names of the entities and attributes and
specify the relationships between them.

A database schema includes such information as :

 Characteristics of data items such as entities and attributes .


 Logical structures and relationships among these data items .
 Format for storage representation.
 Integrity parameters such as physical authorization and back up policies.
A subschema is derived schema derived from existing schema as per the user
requirement. There may be more then one subschema create for a single conceptual
schema.

10. 1. Data Base users


Many persons are involved in the design, use and maintenance of any database. These persons can
be classified into 2 types as below.

a) Actors on the scene:


The people, whose jobs involve the day-to-day use of a database are called as 'Actors on the
scene', listed as below.

Database Administrators (DBA):

The DBA is responsible for authorizing access to the database, for


Coordinating and monitoring its use and for acquiring software and hardware resources as needed.
These are the people, who maintain and design the database
daily. DBA is responsible for the following issues.

a. Design of the conceptual and physical schemas:


The DBA is responsible for interacting with the users of the system to understand what
data is to be stored in the DBMS and how it is likely to be used.
The DBA creates the original schema by writing a set of definitions and is
Permanently stored in the 'Data Dictionary'.
b. Security and Authorization:
The DBA is responsible for ensuring the unauthorized data access is not permitted.
The granting of different types of authorization allows the DBA to regulate which parts of
the database various users can access.

Unit-1
Page 7
Data Base Management System

c. Storage structure and Access method definition:


The DBA creates appropriate storage structures and access
methods by writing a set of definitions, which are translated by the
DDL compiler.

d. Data Availability and Recovery from Failures:


The DBA must take steps to ensure that if the system fails, users can continue to access
as muchof the uncorrupted data as possible.
The DBA also work to restore the data to consistent state.

e. Database Tuning:
The DBA is responsible for modifying the database to ensure adequate
Performance as requirements change.

f. Integrity Constraint Specification:


The integrity constraints are kept in a special system structure that is consulted by the
DBAwhenever an update takes place in the system.

Database Designers:
Database designers are responsible for identifying the data to be stored in the database and for choosing
appropriate structures to represent and store this data.

End Users:
People who wish to store and use data in a database.
End users are the people whose jobs require access to the database for querying, updating and
generating reports, listed as below.

g. Casual End users:


These people occasionally access the database, but they may need different information
eachtime.

h. Naive or Parametric End Users:


Their job function revolves around constantly querying and updating the database
using standard types of queries and updates.

i. Sophisticated End Users:


These include Engineers, Scientists, Business analyst and others familiarize to implement
their applications to meet their complex requirements.

j. Stand alone End users:


These people maintain personal databases by using ready-made program packages that
provide easy to use menu based interfaces.

System Analyst:
These people determine the requirements of end users and develop specifications for transactions.

Application Programmers (Software Engineers):


These people can test, debug, document and maintain the specified transactions.
b. Workers behind the scene:

Unit-1
Page 8
Data Base Management System
Database Designers and Implementers:
These people who design and implement the DBMS modules and interfaces as a software package.

2. Tool Developers:
Include persons who design and implement tools consisting the packages for design, performance
monitoring, and prototyping and test data generation.

3. Operators and maintenance personnel:


These are the system administration personnel who are responsible for the actual running and maintenance
of the hardware and software environment for the database system.

10. 2. DATA MODELS

The entire structure of a database can be described using a data


model. A data model is a collection of conceptual tools for
describing
Data models can be classified into following types.
1.Object Based Logical
Models. 2.Record Based
Logical Models. 3.Physical
Models.
Explanation is as below.

1. Object Based Logical Models:


These models can be used in describing the data at the logical and view levels.
These models are having flexible structuring capabilities classified into following types.
a) The entity-relationship model.
b) The object-oriented model.
c) The semantic data model.
d) The functional data model.

2. Record Based Logical Models:


These models can also be used in describing the data at the logical and view levels.
These models can be used for both to specify the overall logical structure of the database and a higher-
leveldescription.
These models can be classified into,

1. Relational model.
2. Network model.
3. Hierarchal model.

3. Physical Models:
These models can be used in describing the data at the lowest level, i.e. physical
level. These models can be classified into
1. Unifying model
2. Frame memory model.

14.Data base Independence

Unit-1
Page 9
Data Base Management System
Data independence is usually considered from two points of views; physically data
independence and logical data independence.
Physical data Independence allows changes in the physical storage devices or
organization of the files to be made without requiring changes in the conceptual view or
any of the external views and hence in the application programs using the data base.
Logical data independence indicates that the conceptual schema can be changed without
affecting the existing external schema or any application program.

15. Three level Data abstraction of DBMS /ANSI/SPARK Model/ DBMS Architecture

External level View View View


user1 User2 User n

Conceptu
al level Mapping supplied by DBMS

Unit-1
Page 10
Data Base Management System

Conceptual view

Mapping supplied by DBMS/OS

Internal level

A database management system that provides three level of data is


said to follow three- level architecture.
They are 1. External level

2. Conceptual level

3. Physical level

External level:
The external level is at the highest level of database abstraction . At this level, there will
be many views define for different users requirement. A view will describe only a subset
of the database. Any number of user views may exist for a given global or subschema.for
example , each student has different view of the time table. the view of a student of Btech
(CSE) is different from the view of the student of Btech(ECE).Thus this level of
abstraction is concerned with different categories of users.Each external view is
described by means of a schema called schema or schema.

Conceptual level :
At this level of database abstraction all the database entities and the relationships among
them are included. One conceptual view represents the entire database. This conceptual
view is defined by the conceptual schema.

The conceptual schema hides the details of physical storage structures and concentrate on
describing entities, data types, relationships, user operations and constraints.

It describes all the records and relationships included in the conceptual view. There is
only one conceptual schema per database. It includes feature that specify the checks to
relation data consistency and integrity.

Internal level :
It is the lowest level of abstraction closest to the physical storage method used . It
Unit-1
Page 11
Data Base Management System
indicates how the data will be stored and describes the data structures and access methods
to be used by the database . The internal view is expressed by internal schema.
The following aspects are considered at this level:
1. Storage allocation e.g: B-tree,hashing
2. access paths eg. specification of primary and secondary keys,indexes etc
3. Miscellaneous eg. Data compression and encryption
techniques,optimization of the internal structures.

DBMS STRUCTURE:

Naïve user Application On line user DBA


programers

Application System calls Ddl compiler


programs

Application prog Dml precomplier Query processor Ddl compiler


obj code

Database manager

File manager

DBMS

Data file

Data dictionary

1. State advantage and disadvantage of database management system


2. What ate different types of database users
3. What is data dictionary and what are its contents
4. What are the function of DBA
5. What are the different database languages explain with example.
6. Explain the three layer architecture of DBMS.
7. Differentiate between physical data independence and logical data
independence
8. Explain the function of data base manager
9. Explain meta data

Unit-1
Page 12
Data Base Management System

Types of DBMS Architecture

There are mainly three types of DBMS architecture:

 One Tier Architecture (Single Tier Architecture)


 Two Tier Architecture
 Three Tier Architecture

1 -Tier Architecture in DBMS is the simplest architecture of Database in which the client,
server, and Database all reside on the same machine. A simple one tier architecture example
would be anytime you install a Database in your system and access it to practice SQL queries.
But such architecture is rarely used in production.

2 -Tier Architecture in DBMS is a Database architecture where the presentation layer runs on
a client (PC, Mobile, Tablet, etc.), and data is stored on a server called the second tier. Two tier
architecture provides added security to the DBMS as it is not exposed to the end-user directly.
It also provides direct and faster communication.

In the above 2 Tier client-server architecture of database management system, we can see that
one server is connected with clients 1, 2, and 3.

Two Tier Architecture Example: A Contact Management System created using MS- Access.

Unit-1
Page 13
Data Base Management System
3 -Tier Architecture in DBMS is the most popular client server architecture in DBMS in
which the development and maintenance of functional processes, logic, data access, data
storage, and user interface is done independently as separate modules. Three -Tier architecture
contains a presentation layer, an application layer, and a database server.

3-Tier database Architecture design is an extension of the 2-tier client-server architecture.

A 3-tier architecture has the following layers:

1. Presentation layer (your PC, Tablet, Mobile, etc.)


2. Application layer (server)
3. Database Server

3 Tier Architecture Diagram

The Application layer resides between the user and the DBMS, which is responsible for
communicating the user's request to the DBMS system and send the response from the DBMS
to the user. The application layer(business logic layer) also processes functional logic,
constraint, and rules before passing data to the user or down to the DBMS.

The goal of Three Tier client-server architecture is:

 To separate the user applications and physical database


 To support DBMS characteristics

Unit-1
Page 14
Data Base Management System
 Program-data independence
 Supporting multiple views of the data

Unit-1
Page 15

You might also like