0% found this document useful (0 votes)
191 views16 pages

Sample 19608

This textbook covers the essential topics in database management systems for MCA students. The book is divided into 6 chapters that cover fundamental database concepts, different data models, the relational model and SQL, relational database design including normalization, transaction management and concurrency control, and crash recovery and backup techniques. The goal is to help students develop a strong foundational understanding of database management systems and how they are designed and used in practice.

Uploaded by

Mahesh Mutnale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
191 views16 pages

Sample 19608

This textbook covers the essential topics in database management systems for MCA students. The book is divided into 6 chapters that cover fundamental database concepts, different data models, the relational model and SQL, relational database design including normalization, transaction management and concurrency control, and crash recovery and backup techniques. The goal is to help students develop a strong foundational understanding of database management systems and how they are designed and used in practice.

Uploaded by

Mahesh Mutnale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

A Text Book of

DATABASE MANAGEMENT
SYSTEM
FOR
M.C.A. : MANAGEMENT : SEMESTER - I
SUBJECT CODE : IT14

AS PER NEW REVISED SYLLABUS


FOR
M.C.A. (PART I) FROM ACADEMIC YEAR 2015

GAUTAM BAPAT
M.C.A. PGDBM (Marketing)
Asst. Professor, Computer Science & Applications
MITSOM College,
Pune

Price ` 190.00

N1198
Database Management System (M.C.A. - I) ISBN 978-93-82448-68-6
Second Edition : November 2015
© : Authors
The text of this publication, or any part thereof, should not be reproduced or transmitted in any form or stored in any computer
storage system or device for distribution including photocopy, recording, taping or information retrieval system or reproduced on any disc,
tape, perforated media or other information storage device etc., without the written permission of Authors with whom the rights are
reserved. Breach of this condition is liable for legal action.
Every effort has been made to avoid errors or omissions in this publication. In spite of this, errors may have crept in. Any mistake, error
or discrepancy so noted and shall be brought to our notice shall be taken care of in the next edition. It is notified that neither the publisher
nor the authors or seller shall be responsible for any damage or loss of action to any one, of any kind, in any manner, therefrom.
Published By : Printed By :
NIRALI PRAKASHAN RACHANA OFFSETS
Abhyudaya Pragati, 1312, Shivaji Nagar, S. No. 15, Arihant Marg
Off J.M. Road, PUNE – 411005 Sukhsagar Nagar, Katraj
Tel - (020) 25512336/37/39, Fax - (020) 25511379 PUNE - 411 046
Email : [email protected] Tel - (020) 26963220

☞ DISTRIBUTION CENTRES
PUNE
Nirali Prakashan : 119, Budhwar Peth, Jogeshwari Mandir Lane, Pune 411002, Maharashtra
Tel : (020) 2445 2044, 66022708, Fax : (020) 2445 1538
Email : [email protected], [email protected]
Nirali Prakashan : S. No. 28/27, Dhyari, Near Pari Company, Pune 411041
Tel : (020) 24690204 Fax : (020) 24690316
Email : [email protected], [email protected]
MUMBAI
Nirali Prakashan : 385, S.V.P. Road, Rasdhara Co-op. Hsg. Society Ltd.,
Girgaum, Mumbai 400004, Maharashtra
Tel : (022) 2385 6339 / 2386 9976, Fax : (022) 2386 9976
Email : [email protected]
☞ DISTRIBUTION BRANCHES
JALGAON
Nirali Prakashan : 34, V. V. Golani Market, Navi Peth, Jalgaon 425001,
Maharashtra, Tel : (0257) 222 0395, Mob : 94234 91860
KOLHAPUR
Nirali Prakashan : New Mahadvar Road, Kedar Plaza, 1st Floor Opp. IDBI Bank
Kolhapur 416 012, Maharashtra. Mob : 9850046155
NAGPUR
Pratibha Book Distributors : Above Maratha Mandir, Shop No. 3, First Floor,
Rani Jhanshi Square, Sitabuldi, Nagpur 440012, Maharashtra
Tel : (0712) 254 7129
DELHI
Nirali Prakashan : 4593/21, Basement, Aggarwal Lane 15, Ansari Road, Daryaganj
Near Times of India Building, New Delhi 110002
Mob : 08505972553
BENGALURU
Pragati Book House : House No. 1, Sanjeevappa Lane, Avenue Road Cross,
Opp. Rice Church, Bengaluru – 560002.
Tel : (080) 64513344, 64513355,Mob : 9880582331, 9845021552
Email:[email protected]
CHENNAI
Pragati Books : 9/1, Montieth Road, Behind Taas Mahal, Egmore,
Chennai 600008 Tamil Nadu, Tel : (044) 6518 3535,
Mob : 94440 01782 / 98450 21552 / 98805 82331,
Email : [email protected]
[email protected] | www.pragationline.com
Also find us on www.facebook.com/niralibooks
PREFACE

There has been significant development in recent years in the field of Computer Science. The
book is a perfect blend of technology which has been a field of dramatic revolution; this
subject focuses on different technologies of it.

It gives me great pleasure in presenting this book “Database Management System”


designed to serve as a textbook for students of the First Semester of Master of Computer
Application (M.C.A.), the book is organized in such a way that it mirrors the revised syllabus of
University of Pune. The book will be found useful by a wide section of readers, teachers and
students of Business, Technology and Computer Management courses in Indian Universities.
The entire book is freshly written as per the revised syllabus.

The book has its own unique features. It brings out the subject in a very simple and lucid
manner for easy and comprehensive understanding of the basic concepts, its intricacies,
procedures and practices. This book will help the readers to have a broader view on
Database Management System. The language used in this book is easy and will help students
to improve their vocabulary of Technical terms and understand the matter in a better and
happier way.

Particular attention has been paid to making this book stimulating and highly readable. The
result is a text which is clear, focused and designed to capture student interest. This text is
equally suitable for courses directed at undergraduates and postgraduates.

I have given my best inputs for this book. Any suggestions towards the improvement of this
book and sincere comments are most welcome on [email protected].

Author
ACKNOWLEDGEMENT

I sincerely thank Shri. Dineshbhai Furia and Shri. Jignesh Furia, the publishers, for the
confidence reposed in me and giving me this opportunity to reach out to the students of
management studies.

I thank Mr. Amar Salunkhe for his important inputs time to time. Mrs. Prachi Sawant
painstakingly attended to all the details to make this book appear good.

I also thank Mr. Mahesh Swami, Mr. Ravindra Walodare, Mr. Sachin Shinde, Nikunj Joshi,
Nilesh Deshmukh, Ashok Bodke, Moshin Sayyed and Nitin Thorat.

I am also grateful to all the staff members of Nirali Prakashan, who were involved in the
publication of this book.

Author
SYLLABUS

1. Basic Concepts
1.1 Database and Need for DBMS
1.2 Characteristics of DBMS
1.3 Database Users
1.4 3-Tier architecture of DBMS (its advantages over 2-tier)
1.5 Views of data-schemas and instances
1.6 Data Independence
2. Data Models
2.1 Introduction to various data models
2.2 Record based & Object based
2.3 Cardinality Ratio & Relationships
2.4 Representation of entities, attributes, relationship attributes, relationship set
2.5 Generalization, aggregation
2.6 Structure of relational Database and different types of keys
2.7 Structure of No-SQL database
3. Relational Model
3.1 Codd’s rules
3.2 Relational data model & relational algebra
Relational model concept
Relational model constraints
Relational Algebra
3.3 Relational database language
3.4 Data definition in SQL, Views and
3.5 Queries in SQL, Specifying constraints and Indexes in SQL, Specifying constraints
management systems, Postgre SQL/MySQL
4. Relational Database Design
4.1 Database Design – ER to Relational
4.2 Functional dependencies
4.3 Normalization
Normal forms based on primary keys
(1 NF, 2 NF, 3 NF, BCNF, 4 NF, 5 NF)
4.4 Loss less joins and dependency preserving decomposition
5. Transaction And Concurrency Control
5.1 Concept of transaction, ACID properties
5.2 Serializibility
5.3 States of transaction,
5.4 Concurrency control
5.5 Locking techniques
5.6 Time stamp based protocols
5.7 Granularity of data items
5.8 Deadlock
6. Crash Recovery and Backup
6.1 Failure classifications
6.2 Storage structure
6.3 Recovery & Atomicity
6.4 Log base recovery
6.5 Recovery with concurrent transactions
6.6 Failure with loss of Non-Volatile storage
6.7 Database backup & recovery from catastrophic failure
6.8 Remote Backup System
7. Security and Privacy
7.1 Database security issues
7.2 Discretionary access control based on grant & revoking privilege
7.3 Mandatory access control and role based access control for multilevel security
7.4 Encryption & public key infrastructures
8. No-SQL Database
- Introduction, Types of No-SQL, Need of No-SQL database, Use cases.


CONTENTS

1. Basic Concepts 1.1 – 1.20

2. Data Models 2.1 – 2.40

3. Relational Model 3.1 – 3.64

4. Relational Database Design 4.1 – 4.38

5. Transaction and Concurrency Control 5.1 – 5.40

6. Crash Recovery and Backup 6.1 – 6.24

7. Security and Privacy 7.1 – 7.17

8. No-SQL Database 8.1 – 8.3

* Solved Question Paper (Oct. 2014) P.1 – P.2


Chapter 1…
BASIC CONCEPTS
Contents…
1.1 Introduction to Database and DBMS
1.1.1 Definition of DBMS
1.1.2 Components of DBMS and Overall Structure of DBMS
1.1.3 Functions of DBMS
1.1.4 Data Models
1.1.5 Data Abstraction
1.1.6 Database Languages
1.1.7 Advantages of DBMS
1.1.8 Disadvantages of DBMS
1.1.9 Applications of DBMS
1.2 Database and Need for DBMS
1.3 Characteristics of DBMS
1.4 Database Users
1.5 Three-tier Architecture for DBMS
1.6 Data Instances and Data Schemas
1.7 Data Independence
• Practice Questions

1.1 Introduction to Database and DBMS


• Database is a collection of data.
• Database contains information about one particular enterprise. Examples of enterprise
and its database are, a manufacturing company which stores product data.
1. Bank which stores customers banking data,
2. Hospital which stores patient data, and
3. University which stores student data so on.
• A database is a collection of data elements or components such as tables (entities),
columns (fields or attributes), rows (records).
• A database turns disparate pieces or parts of data into information based on needs
collect essential information etc.
(1.1)
Database Management System (MCA-I) 1.2 Basic Concepts

• We can define database as "the collection of data is known as database".


OR
• A database is a collection of interrelated data of an organization/enterprise.
• Database contains information or data relevant to an enterprise.
• Database Management System (DBMS) is collection of interrelated data and a set of
programs to access the data.
• The objective of DBMS is to provide convenient and effective method of defining,
storing and retrieving the information contained in the database.
• In addition the DBMS must provide for the safety of the information stored. It should
protect the data from system crash or attempt at unauthorized access. If the data are to
be shared among several users, the system must avoid possible anomalous results.
• Examples of DBMS
1. Oracle,
2. Microsoft Access, and
3. Foxpro etc.
• DBMS manages a permanent self descriptive repository (database) of data.

1.1.1 Definition of DBMS


• A database management system is a computer based system or program to record and
maintain information or data.
• In any organization, data is the basic resource needed to run the organization. This data
is required by decision makers for processing and retrieving information.
• A data is collection of information or real fact which can be recorded and have implicit
meaning. Customer_name, item price, balance etc. can be consider as data.
• The database is used to store information useful to an organization.
• A database is a shared collection of inter-related data, which is designed to fulfill the
information needs.
For example: Consider the names, telephone numbers and addresses of the people you
know. This data is recorded in an indexed address book or stored on a diskette or using
a personal computer. This is a collection of related data with an implicit meaning and
hence is a database.
• A database use the following implicit properties.
1. A database represents some aspect of the real world, sometimes called the
miniworld. Changes to the miniworld are reflected in the database.
2. A database is a logically collection of data with some meaning. A random assortment
of data cannot correctly be referred to as a database.
3. A database is designed, built and populated with data for a specific purpose. It has
an intended group of users.
Database Management System (MCA-I) 1.3 Basic Concepts

• So, finally we can say that a database has some source from which data are derived,
some degree of interaction with events in the real world and an audience that is actively
interested in the contents of the database.
• A Database Management System (DBMS) is a software system that allows user to
define, manipulate and process the data in a database, in order to produce
meaningful information.
• The basic functions of DBMS are:
1. To store data in a database.
2. To organize the data.
3. To control access of data.
4. To protect data i.e. provide security.
• The DBMS is hence a general purpose software system that facilitates the processes of
defining, constructing and manipulating databases for various applications.
• Defining a database involves specifying the data types, structures and constraints for
the data to be stored in the database.
• Constructing the database is the process of storing the data itself on some storage
medium that is controlled by the DBMS.
• Manipulating a database includes such functions as querying the database to retrieve
specific data, updating the database to reflect changes in the miniworld and generating
reports from the data. So in general, user can write programs or queries; DBMS use the
database stored on storage devices and gives meaningful information.

1.1.2 Components of DBMS and Overall Structure of DBMS


• Components of DBMS are broadly classified as follows:
1. Query Processor:
(i) DML Pre-compiler,
(ii) Embedded DML Pre-compiler,
(iii) DDL Interpreter, and
(iv) Query Evaluation Engine.
2. Storage Manager:
(i) Authorization and Integrity Manager,
(ii) Transaction Manager,
(iii) File Manager, and
(iv) Buffer Manager.
3. Data Structure:
(i) Data Files,
(ii) Data Dictionary,
Database Management System (MCA-I) 1.4 Basic Concepts

(iii) Indices, and


(iv) Statistical Data.

Naive Application Sophisticated Database


users programs users administrator

Application Application Query Database


interfact programs scheme

Application Embedded
programs DML DML DDL
object code precompiler compiler interpreter

Query QUERY
evaluation PROCESSOR
engines

STORAGE
Transaction Buffer MANAGER
manager manager

File
manager

Stastical
Indices data

Data files Stastical

DISK STORAGE

Fig. 1.1: DBMS system structure

1. Query Processor Components:


(i) DML Pre-compiler: It translates DML statements in a query language into low level
instructions that query evaluation engine understands. It also attempts to transform
user's request into an equivalent but more efficient form.
(ii) 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.
Database Management System (MCA-I) 1.5 Basic Concepts

(iii) DDL Interpreter: It interprets the DDL statements and records them in a set of
tables containing meta data or data dictionary.
(iv) Query Evaluation Engine: It executes low-level instructions generated by the DML
compiler.

2. 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.
(i) Authorization and Integrity Manager: It tests for the satisfaction of integrity
constraints checks the authority of users to access data.
(ii) Transaction Manager: It ensures that the database remains in a consistent state
despite the system failures and that concurrent transaction execution proceeds
without conflicting.
(iii) File Manager: It manages the allocation of space on disk storage and the data
structures used to represent information stored on disk.
(iv) Buffer Manager: It is responsible for fetching data from disk storage into main
memory and deciding what data to cache in memory.

3. Data Structures: Following data structures are required as a part of the physical system
implementation.
(i) Data Files: It stores the database.
(ii) Data Dictionary: It stores meta data (data about data) about the structure of the
database.
(iii) Indices: Provide fast access to data items that hold particular values.
(iv) Statistical Data: It stores statistical information about the data in the database. This
information is used by query processor to select efficient ways to execute query.

1.1.3 Functions of DBMS


• DBMS performs following functions:
1. Data Security and Data Integrity: This is the most important function of database
which handles the security and integrity scheme of database application.
2. Data Definition: Data definition defines the structure of database. It is also defines
field size, record structure.
3. Data Manipulation: It contains manipulation of data, i.e inserting, modifying,
deleting function.
4. Data Recovery: After system failure to recover data in the database.
5. Concurrency: To handle concurrent access of multiple users.
Database Management System (MCA-I) 1.6 Basic Concepts

1.1.4 Data Models


• Data model is the collection of conceptual tools for describing:
1. Data,
2. Data Schema, and
3. Consistency Constraints.
• Data models are classified into following three categories:
1. Object Based Logical Data Model,
2. Record Based Logical Data Model, and
3. Physical Data Model.

1. Object-Based Logical Model: Object-based logical models are used in describing data
at:
(i) Logical Level, and
(ii) View Level.
Following are the object based logical models:
1. Entity Relationship Model,
2. Object Oriented Model,
3. Semantic Data Model, and
4. Functional Data Model.
Entity Relationship (E-R) Model consist of a collection of basic objects, called entities
and relationships among these objects.
An Entity is an object that is distinguishable from other objects by a specific set of
attributes. A Relationship is an association among several entities.
An object may contain in addition to relations and entities ER model also represents
certain constraints to which the contents of a database must conform. One important
constraint is Mapping Cardinality, which express the number of entities to which
another entity can be associated via a relationship set.
Object Oriented Model is based on a collection of objects. An Object contains values
stored in instance variables within the object and bodies of code that operate on the
object. These bodies of code are called ‘Methods’.
Objects that contain the same type of values and the same methods are grouped
together into classes. A Class may be viewed as a type definition for objects. The only
way in which one object can access the data of the another object is by invoking a
method of that other object. This is called Sending Messages to the object.
Database Management System (MCA-I) 1.7 Basic Concepts

2. Record-Based Logical Model: Record based logical model are used in describing data
at:
(i) Logical Level, and
(ii) View Level.
In record-based models, database is structured in fixed format records of several types.
Each type defines a fixed number of fields or attributes and each field is usually of fixed
length.
• Following are the record based data models:
(i) Relational Model: It uses a collection of tables to represent both data and
relationship among those data. Each table has multiple columns and each column
has a unique name.
(ii) Network Model: In Network Model, data is represented as collection of records and
relationship among data are represented by links, which can be viewed as pointers.
The records in databases are organized as collection of arbitrary graphs.
(iii) Hierarchical Model: It is similar to Network Model, in the sense that data and
relationship among data are represented by records and links respectively. But in this
model the records in databases are organized as collections of trees rather than
arbitrary graphs.

3. Physical Data Model: It is used to describe data at the lowest level. Following are the
physical models.
(i) Unifying model, and
(ii) Frame memory model.

1.1.5 Data Abstraction


• A major purpose of DBMS is to provide users with an abstract view of the data. Many
database system users are not computer-trained, hence the complexity is hidden from
them through several levels of abstraction.
• Data abstraction means to hide certain details of how the data is stored and
maintained.
• Fig. 1.2 shows the three levels of abstractions.
1. Physical Level: It is the lowest level of abstraction. It describes how the data is actually
stored and describes the data structures and access methods to be used by the
database. At the physical level, complex low-level data structures are described in detail.
The internal view is expressed by the internal schema which contains the definition of
stored record, the method of representing the data fields and the access aids used.
Database Management System

60%
OFF

Publisher : Nirali Prakashan ISBN : 9789382448686 Author : Gautam Bapat

Type the URL : http://www.kopykitab.com/product/19608

Get this eBook

You might also like