Dbms - Unit 1
Dbms - Unit 1
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.
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
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
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.
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.
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.
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.
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.
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)
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.
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
Mappings:
In addition to the levels, architecture also involves mappings.
o One conceptual / internal mapping
o Several external / conceptual mappings
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.
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
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?