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

Dbms - Unit 1

This document provides an overview of database management systems. It discusses what a database system is, including its key components like data, hardware, software, and users. It describes different types of users such as application programmers, end users, database designers, and database administrators (DBAs). The document also defines what a database is, including that it is a collection of persistent and shared data about real-world entities and their relationships. It notes that a data model is used to describe the structure and behavior of data stored in a database.

Uploaded by

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

Dbms - Unit 1

This document provides an overview of database management systems. It discusses what a database system is, including its key components like data, hardware, software, and users. It describes different types of users such as application programmers, end users, database designers, and database administrators (DBAs). The document also defines what a database is, including that it is a collection of persistent and shared data about real-world entities and their relationships. It notes that a data model is used to describe the structure and behavior of data stored in a database.

Uploaded by

Balaji Dande
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Database Management Systems UNIT-I

An overview of Database Management : Introduction – What is Database System – What is Database – Why
Database – Data Independence – Relation Systems and Others – Summary.
Database System Architecture, Introduction : The three levels of Architecture – The External level – the conceptual
level – the internal level – mapping – the Database Administrator - The Database Management Systems –
Client/Server Architecture.

What is Database System


 A database system is basically a computerized record keeping system. i.e., it is a computerized system whose
overall purpose is to store information and to allow users to retrieve and update that information on demand.
 A simplified picture of the database system is shown below.
 This system is a multi-user system in which many users can access the database at the same time.

 This system involves four major components.


1. Data,
2. hardware,
3. software and
4. users.
Data:
 The data in the database will be both integrated and shared.
 Integrated : Database is unification of several distinct files, with any redundancies among these files will be
partly or wholly removed.
 Shared : The database can be shared among different users.

Hardware:
 The hardware components of the system include disk, CPU, main memory etc.

Software:
 Between the physical database and the user is a layer of software, known as Database Management System
(DBMS)
 DBMS handles all requests for access to the database.
 Functions of DBMS:
o Shields the database users from hardware level details.
o Data Dictionary Management
o Data Storage Management
o Data Transformation and Presentation
o Security Management
o Backup and Recovery Management
o Data Integrity Management
o Transaction Management

Department of CSE, Vishnu Institute of Technology 1


Database Management Systems UNIT-I

Users:
 For small databases typically one person defines, construct, and manipulates the data. But for large
organizations, many people will be involved.
 There are various types of users based on the level of access and how much permission he has to
alter/modify/or to any other operation on the database

Different types of users are


1. Application programmers
 Application Programmers are responsible for writing application programs that use the database.
These programs could be written in General Purpose Programming languages such as Visual Basic,
Developer, C, FORTRAN, COBOL etc. to manipulate the database. These application programs operate
on the data to perform various operations such as retaining information, creating new information,
deleting or changing existing information.
2. End users
 The database primarily exists for their use.
 End users are those whose jobs require access to the database for querying, updating, and generating
reports.
 There are several categories of end users:
 Casual end users : Needs different information each time. They use a sophisticated database query
interface to specify their requests.
 Naive users : Any user who does not have any knowledge about database can be in this category.
There task is to just use the developed application and get the desired results. For example: Clerical
staff in any bank is a naïve user. They don’t have any dbms knowledge but they still use the database
and perform their given task.
 Sophisticated end users : include engineers, scientists, business analysts, and others who thoroughly
familiarize themselves with facilities of the DBMS
3. Database Designers:
 Responsible for identifying the data to be stored in the database and for choosing appropriate
structures to represent and store this data.
 Understands the requirements of the user. The design should be capable of supporting the
requirements of all user groups.
4. Database administrator (DBA)
 The function of managing and maintaining database management systems (DBMS) software
 He is the chief administrator to oversee and manage the resources.
 The primary resource is the database itself and the secondary resource is the DBMS and the related
softwares.
 Various responsibilities of DBA are
1. Policy formulation and implementation
a) Access privileges - users should access the database only in ways in which they are entitled.
b) Security - Access restrictions ensure that the database is secure. Passwords, encryption, and
views implement security. Effective password protection is important.
c) Disaster Planning – Databases can be harmed from hardware and software malfunctions, and
outside forces like floods and power outages. DBA’s must take active role in formulating
disaster recovery plans.
d) Archives – An archive is a place where corporate data is kept. Information in an archive is
removed from the database and stored in the archive for future reference. Archives are
usually kept in a mass-storage device like a disk, tape, CD, or a DVD. It is important such
archives be kept off-site to allow recovery should disaster strike

Department of CSE, Vishnu Institute of Technology 2


Database Management Systems UNIT-I

2. Data Dictionary management


i. Data Dictionary is like a catalog, it contains a wider range of information, including information
on tables, fields, indexes, and programs.
ii. The DBA manages and updates the data dictionary, which establishes naming conventions for
tables, fields etc., and data integrity rules.
3. Training
i. DBAgives training on the DBMS and how to access the database.
4. DBMS support
a) The DBA is charged with all aspects of a DBMS, including selection and management.
5. Database Design
i. DBA is responsible for tuning the design, i.e., making changes that improve system
performance
Functions of DBA in simple terms
 Authorizing access to the database
 Coordinating and monitoring its use.
 Acquiring hardware and software resources as needed.
 Accountable for problems such as security breaches and poor system response time.
 Defining external/internal/conceptual schema
 Relationship with users
 Defining security and integrity checks
 Defining Backup and recovery procedures
 Monitoring performance and changing requirements.

What is a Database?
 A database is collection of related data
 Def: A database is a collection of persistent data that is used by the application systems of some given
enterprise.
o Database is persistent because once it has been accepted by the DBMS for entry, it can subsequently
be removed from the database only by some explicit request to the DBMS.
o Enterprise can be commercial, scientific, technical or other organization. It can be a single individual or
a complete corporation.

 A real world scenario will be translated into a database. It is combination of entities, relationships and
properties.
 Entity is any real world object w.r.t our problem domain. It is an object about which we wish to record
information.
 An entity set is a set of that share common properties of entities
 A relationship is an association among two or more entities or other relationships.
 The properties/attributes are the information we want to record about entities.
 Properties can be either simple or complex.

Data and Data Model:


 A data model is a model of the persistent data of some particular enterprise.
 Data models are collection of conceptual tools used to describe data, data relationships and consistency
constraints.
 Data models are used to describe data stored in database.
 A data model is an abstract, self-contained logical definition of the objects, operators that constitute the
abstract machine with which user interacts.
 The objects allow us to model the structure of the data.
 The operators allow us to model its behaviour
 An implementation of the given model is a physical realization on a real machine.

Department of CSE, Vishnu Institute of Technology 3


Database Management Systems UNIT-I

 Model – is what users have to know about


 Implementation – is what users do not have to know about.
 There are number of data models.

The various data models are


 ER model
 Relational model
 Object based data model
 Network data model
 Hierarchical data model.

 The DBMS and database must adhere to a data model.

 Relational model proposed by Codd(Codd, 1970)


o Everything is a relation
o Query consists of algebraic composition of a few powerful operators
o Equivalent to first-order relational calculus
o Because of its simplicity, it found many supporters (specially at universities)

Why database?
 A database is a collection of data or information which is held together in an organised or logical way.
 Databases can either be paper based or computerised.

The advantages of database system over traditional paper-based methods of record keeping are
1. Compactness : There is no need for paper files which are big at volume.
2. Speed : machine retrieves and updates data faster than machine.
3. Less drudgery : mechanical works like maintaining files by hand is eliminated.
4. accurate : Accurate, up-to-date information is available on demand at anytime.
5. Protection : Database can be better protected against unintentional loss & lawful access.
6. Multi-user environment can be provided.

Computerised databases can either use a File management System or Database Management system.

File Management Systems:


 Before the advent of of DBMS, data used to be managed by File processing system. In this data is stored in
operating system files.
 This system needs number of application program to allow user to manipulate the information.
 Keeping information in a file processing system has a number of major disadvantages.

They are
1. Data redundancy and inconsistency : Redundancy means multiple copies of the same data. To access data
different programmers create files with different structures in different programming languages. It leads to
data duplication.
Eg: If the student address is stored in several files , and we change only one copy then it leads to data
inconsistency.
Data inconsistency means, multiple copies of the same data may no longer agree.
2. Difficulty in accessing the data: FPS doesn’t allow required data to be retrieved in a convenient and efficient
manner.
Eg: if a user asks a list of customers living in a particular town then they have to write a program manually,
which is a tedious job.
3. Data isolation : New application is needed to retrieve data, as data scatters in multiple files, which has
different formats. Writing new applications every time is a difficult task.

Department of CSE, Vishnu Institute of Technology 4


Database Management Systems UNIT-I

4. Integrity problems : Data stored in the system has to satisfy certain consistency constraints.
Eg: minimum balance of an account be Rs.500/-
We say that data is maintaining integrity, when all these conditions are met.
In FPS, when new constraints are added, it is difficult to change the programs to enforce them.
5. Atomicity Problems : Atomicity means either all actions of a program should be executed, or none of the
actions should be executed.

Eg: A fund transfer of Rs. 500/- from Account A to B


A B
Assume the initial balances : 1000 2000
A B
If all actions are done : 500 2500
A B
If none of them are done : 1000 2000
A B
But partial execution of operarations is not acceptable : 500 2000
It is difficult to ensure atomicity in FPS.

6. Concurrent access anomalies : When many programs are executed simultaneously, sometimes anomalies may
come. Dealing these anomalies is difficult case of FPS.
7. Security Problems : Security can be provided by keeping passwords to files. But this is not sufficient when we
have to allow users to access different subsets of the data.

These problems of FPS prompted the development of database systems. A DBMS is a piece of software designed to
make the preceding tasks easier.

Benefits of the Database Approach:


1. Data Independence : The DBMS provides an abstract view of data that hides data representation and storage
details from application programs.
2. Efficient data access : DBMS uses good techniques to store and retrieve data efficiently.
3. The data can be shared : Existing applications can share the data in the database and also new applications can be
developed to operate on the same data.
4. Redundancy can be reduced : Every application in nondatabase system has its own private files, which leads to
redundancy in stored data. This redundancy wastes the storage and causes inconsistencies. It can be eliminated in
database systems as there is centralized control of data.
5. Inconsistency can be avoided (to some extent) : Data is said to be inconsistent if the duplicate entries will not
agree. When one of the two entries is updated and other not then the database is said to be inconsistent state.
Inconsistency can be avoided by representing the fact by a single entry in databases.
6. Transaction support can be provided : A transaction is a logical unit of work, typically involving several database
operations. Atomicity can be achieved by transaction support.
7. Integrity can be maintained : DBMS can enforce integrity constraints easily. For eg: before inserting salary
information for an employee, the DBMS can check that the department budget is not exceeded.
8. Security can be enforced : Ensuring access to the database through proper channel is possible in DBMS. DBA
defines security constraints to be checked whenever access is attempted to sensitive data.
9. Concurrent access and crash recovery : A DBMS provides concurrent access to the data in such a manner that
users can think of the data as being accessed by only one user at a time.
10. Reduced Application Development Time : As DBMS supports important functions common to many applications,
developing new applications can be done in reduced time.

Department of CSE, Vishnu Institute of Technology 5


Database Management Systems UNIT-I

The three levels of the Architecture


Data Abstraction:
 Abstraction means hiding the complexity and providing only necessary details. Data Abstraction hides the
irrelevant details from the users.
 Database system comprises of complex data structures. Developers use abstraction in order to
o Make the system efficient in terms of retrieval of data
o Reduce complexity in terms of usability of users.
 This approach simplifies the database design.

 DBMS provides an abstract view of the data stored in the database i.e., the system hides certain details of how
the data are stored and maintained. To retrieve data efficiently, DBMS uses complex data structures. Since
many database users are not computer trained, developers hide the complexity from users through several
levels of abstraction.
 The Data in a DBMS is described at three levels of abstraction.
 The database description consists of a schema at each of these three levels of abstraction. They are
o Conceptual schema
o Physical schema
o External schema
 Levels of abstraction are shown in below figure.

 Conceptual schema (logical schema) describes the stored data interms of the data model of the DBMS.
 Physical schema specifies storage details
 External schema allows access to individual users or group of users.

Architecture of DBMS
The Architecture of most of commercial DBMS available today is mostly based on this ANSI-SPARC1 database
architecture.
The objectives of this three-level architecture is to separate the user's view,
 It allows independent customized user views: Each user should be able to access the same data, but have a
different customized view of the data. These should be independent: changes to one view should not affect
others.
 It hides the physical storage details from users: Users should not have to deal with physical database storage
details.
 The database administrator should be able to change the database storage structures without affecting the
users’ views.
 The internal structure of the database should be unaffected by changes to the physical aspects of the storage:
For example, a changeover to a new disk.

1
ANSI-SPARC stands for American National Standards Institute, Standards Planning And Requirements Committee, is an abstract
design standard for a Database Management System (DBMS)

Department of CSE, Vishnu Institute of Technology 6


Database Management Systems UNIT-I

ANSI SPARC architecture has three main levels:


 Internal Level
 Conceptual Level
 External Level

 These three levels provide data abstraction, that means they hide the low level complexities from end users .
 Using these three levels, it is possible to use complex structures at internal level for efficient operations and
to provide simpler convenient interface at external level.
 The detailed database architecture is shown in the below figure.

The External Level :


 It is the highest level of abstraction, and it describes only part of the entire database.
 This level is the individual user level, closest to the user. It is concerned with the way the data is seen by
individual users.
 This level exists to ease the accessibility of the database by an individual user.
 It excludes irrelevant data as well as data which the user is not authorised to access.
 Users can be an application programmer, or an end user of any degree of sophistication. The programmer may
use either a conventional or proprietary programming language like C, C++, Java, Python. Other users can use
either a query language or some special purpose language tailored to that users requirement.
 Even though the conceptual level (logical level) uses simpler structures, complexity remains, as it describes the
entire data in the database. The view level describes the portion of the data (stored in the database) relevant
to the user.
 The system provides many views for the same database.

Department of CSE, Vishnu Institute of Technology 7


Database Management Systems UNIT-I

 Any database will have only one conceptual


conceptual and physical schema, but it may have more number of external
schemas, each tailored to a particular group of users.
 External Schema is a collection of one or more views and relations from the conceptual schema. By concept a
view is a relation, but it is not stored in the DBMS.
 External Schema design is guided by end user requirement

The Conceptual Level:


 The conceptual level is a way of describing what data is stored within the whole database and how the data is
inter-related.
related. The conceptual level does not specify how the data is physically stored.
 It is a level of indirection between the other two.
 It is also referred as logical level.
 This level describes data using relatively simple structures. It describes the stored data in terms of the data
model of the DBMS.
 DBA uses logical level of abstraction.
 It gives global view of database.
 It is Independent of hardware and software
 This schema defines all the logical constraints that need to be applied on the data stored.
 It defines tables, views, integrity constraints etc.
 The process of arriving at a good conceptual schema is called conceptual database design.

The Internal Level:


 The lowest level of abstraction describes how the data is actually stored in the memory.
 This level is closest to the physical storage.
 It is also referred as storage level
 It is concerned with the way the data is stored inside the system.
 This level describes complex low-level
low data structures in detail.
 Here the data structures to store the relations are decided based on the acce access methods like
sequential/random and file organization methods like B+ trees, hashing for sorting etc.
 Decision about the physical schema is based on an understanding of how the data is typically accessed. The
process of arriving at a good physical schema
schema is called Physical Database Design.

Data Independence :
 The main benefit of DBMS is it offers data independence i.e., the application programs are insulated from
changes in the way the data is structured and stored and this is achieved through the use of the three levels of
abstraction.
 The main purpose of data abstraction is achieving data independence in order to save time and cost required
when the database is modified or altered.

 We have namely two levels of data independence arising from these levels
levels of abstraction :
1. Physical data independence
2. Logical data independence

Department of CSE, Vishnu Institute of Technology 8


Database Management Systems UNIT-I

Physical level data independence :


 Application programs are not affected by changes in physical schema is called physical data independence.
 It refers to the characteristic of being able to modify the physical schema without any alterations to the
conceptual or logical schema, done for optimisation purposes,
 e.g., Conceptual structure of the database would not be affected by any change in storage size of the database
system server. Changing from sequential to random access files is one such example.
 These alterations or modifications to the physical structure may include:
o Utilising new storage devices.
o Modifying data structures used for storage.
o Altering indexes or using alternative file organisation techniques etc.

Logical level data independence:


 It refers characteristic of being able to modify the logical schema without affecting the external schema or
application program.
 The user view of the data would not be affected by any changes to the conceptual view of the data.
 These changes may include insertion or deletion of attributes, altering table structures entities or relationships
to the logical schema etc.

Mappings:
 In addition to the levels, architecture also involves mappings.
o One conceptual / internal mapping
o Several external / conceptual mappings

The conceptual / internal mapping:


 It defines the correspondence between the conceptual view and the stored database.
 It specifies how the records and fields at conceptual level are represented in the internal level.
 This mapping has to be changed whenever the structure of database is changed.
 It is the responsibility of the DBA and the underlying DBMS.
 Physical data independence is preserved through this mapping.

An External / Conceptual Mapping:


 It defines the correspondence between a particular external view and the conceptual view.

Properties of Database
 Data sharing
 Data Integration
 Data Integrity
 Data Security
 Data Abstraction
 Data Independence

Applications of DBMS
Database is widely used. The some of the representative applications are:
1. Banking : for customer information, accounts and loans and banking transactions.
2. Universities : for student registrations and grades.
3. Online shopping : Everyone wants to shop from home. Everyday new products are added and sold only with
the help of DBMS. Purchase information, invoice bills and payment, all of these are done with the help of
DBMS.
4. Airlines : for reservations and schedule information.
5. Credit card transactions : for purchases on credit cards and generation of monthly statements.

Department of CSE, Vishnu Institute of Technology 9


Database Management Systems UNIT-I

6. Library Management System : maintain all the information relate to book issue dates, name of the book,
author and availability of the book.
7. Telecommunications : for keeping records of call made, generating monthly bills, maintaining balances on
prepaid calling cards.
8. Sales : for customer, product and purchase information.
9. Finance : for storing information about holdings, sales, and purchases of financial instruments such as stocks
and bonds.
10. Manufacturing : for management of supply chain and for tracking production of items in factories, inventories
of items and orders for items.
11. Human Resource : for information about employees, salaries, payroll taxes and benefits.

Advantages of DBMS
1. Controlling of Redundancy : Data redundancy refers to the duplication of data (i.e storing same data multiple
times). In a database system, by having a centralized database and centralized control of data by the DBA the
unnecessary duplication of data is avoided. It also eliminates the extra time for processing the large volume of
data. It results in saving the storage space.
2. Improved Data Sharing : DBMS allows a user to share the data in any number of application programs.
3. Data Integrity : Integrity means that the data in the database is accurate. Centralized control of the data helps
in permitting the administrator to define integrity constraints to the data in the database. For example: in
customer database we can enforce an integrity that it must accept the customer only from Noida and Meerut
city.
4. Security : Having complete authority over the operational data, enables the DBA in ensuring that the only
mean of access to the database is through proper channels. The DBA can define authorization checks to be
carried out whenever access to sensitive data is attempted.
5. Data Consistency : By eliminating data redundancy, we greatly reduce the opportunities for inconsistency. For
example: is a customer address is stored only once, we cannot have disagreement on the stored values. Also
updating data values is greatly simplified when each value is stored in one place only. Finally, we avoid the
wasted storage that results from redundant data storage.
6. Efficient Data Access : In a database system, the data is managed by the DBMS and all access to the data is
through the DBMS providing a key to effective data processing
7. Enforcements of Standards : With the centralized of data, DBA can establish and enforce the data standards
which may include the naming conventions, data quality standards etc.
8. Data Independence : Ina database system, the database management system provides the interface between
the application programs and the data. When changes are made to the data representation, the meta data
obtained by the DBMS is changed but the DBMS is continues to provide the data to application program in the
previously used way. The DBMs handles the task of transformation of data wherever necessary.
9. Reduced Application Development and Maintenance Time : DBMS supports many important functions that
are common to many applications, accessing data stored in the DBMS, which facilitates the quick
development of application.
Disadvantages of DBMS
1. Increased Complexity
2. Requirement of New and Specialized Manpower
3. Large Size of DBMS

May 2018
1. What is the need of data model in DBMS and give its classification
2. Who are the different database users? Explain their interfaces to database management system.
3. Describe the client server architecture for the database with necessary diagram.
November 2017
1. Define Database Management Systems.
2. What is Data Base Administrator? Discuss the functions of DBA.
3. Explain DBMS applications

Department of CSE, Vishnu Institute of Technology 10


Database Management Systems UNIT-I

4. What are the disadvantages in file system?


5. What is data independence? Discuss three tire schema architecture of data independence.
6. Explain storage manager component.
7. Explain object-oriented data model.
8. Explain briefly the languages supported by databasesystems.
9. What is Data modeling? Explain relational model.
10. List various types of database users. Explain.
11. Discuss abstract view of data with diagram.
12. Explain about Entity-Relationship model with an example.
May 2017
1. Define the two levels of data independence.
2. Explain the role of a data base administrator.
3. What are the different data models present and explain briefly?
4. Explain the merits and demerits of data base system.
November 2016
1. Differentiate between schema and instance.
2. Describe the characteristics of a database system.
3. Draw and explain three-tier schema architecture of database system.
4. Present any two database applications by describing their features.
5. What is Data independence?
6. What do you mean by environment in database systems? Explain with the help of database system structures.
7. Explain the client - server architecture of a DBMS.
8. What are the responsibilities of DBA?
9. Mention various groups of database users. Explain about their roles in detail.
10. What is a data model? Describe various data models.
11. What is Database system? Give any four features that a database system should provide to its users.
12. Distinguish between centralized and client-server architectures of a database system.
13. Differentiate between File system and Database System

May 2016
1. List out Data base applications.
2. Explain in detail about Database Management System advantages over file management system.
3. Explain the architecture of DBMS.
4. Explain the concept of Data independence.
November 2015
1. What is DBA? Mention the functionalities of DBA.
2. Draw and explain the detailed system architecture of DBMS.
3. What are the advantages of DBMS?
4. Describe the concept of client/server model.
5. Describe in detail about two-tier and three-tier client-server architectures.
6. List different types of database users.
7. Discuss the activities of different database users.
8. Discuss the main characteristics of the database approach and specify how it differs from traditional file
system.
9. Compare the database system with conventional file system.
10. Explain in detail about the three tier schema architecture of DBMS.
11. List out the characteristics of database system.
12. Briefly describe various architectures of database systems.
13. What is Data Independence? Why is it essential?

Department of CSE, Vishnu Institute of Technology 11

You might also like