Sample 19608
Sample 19608
DATABASE MANAGEMENT
SYSTEM
FOR
M.C.A. : MANAGEMENT : SEMESTER - I
SUBJECT CODE : IT14
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.
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
• 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.
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
DISK STORAGE
(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. 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.
60%
OFF