Unit I (Notes) Class Notes
Unit I (Notes) Class Notes
T.E. Computer
Database Management Systems
Unit-I
By
Prof. Dr. K.P. Adhiya
SSBT’s COET, Bambhori-Jalgaon
Acknowledgment
1. Abraham Silberschatz, Henry F. Korth, S. Sudarshan, “Database System
Concepts”, 6th Edition, McGraw-Hill Hill Education.
2. Abraham Silberschatz, Henry F. Korth, S. Sudarshan, “Database System
Concepts”, 4th Edition, McGraw-Hill Hill Education.
3. Ramez Elmasri and Shamkant B. Navathe “Fundamentals of Database Systems”,
5th Edition, Pearson.
4. Express Learning, “Database Management Systems”, ITL Education Solutions
Limited.
5. Archana Verma, “Database Management Systems”, GenNext Publication.
6. Dr. Rajiv Chopra, “Database Management Systems (DBMS) – A Practical
Approach”, 5th Edition, S. Chand Technical
7. Tanmay Kasbe, “Database Management System Concepts – A Practical
Approach”, First Edition, Educreation Publishing.
8. Mahesh Mali, “Database Management Systems”, Edition 2019, TechKnowledge
Publications.
9. Rajendra Prasad Mahapatra, Govind Verma, “Database Management System”,
Khanna Publishing.
10. Malay K. Pakhira, “Database Management System”, Eastern Economy Edition,
PHI.
11. Sarika Gupta, Gaurav Gupta, “Database Management System”, Khanna Book
Publishing Edition.
12. Riktesh Srivastava, Rajita Srivastava, “Relational Database Management
System”, New Age International Publishers.
13. Peter Rob, Carlos Coronel, “Database System Concepts’, Cenage Learning, India
Edition
14. Bipin C. Desai, “An Introduction to Database Systems”, Galgotia Publications.
15. G.K. Gupta, “Database Management Systems”, McGraw Hill Education.
16. Shio Kumar Singh, “Database Systems – Concepts, Design and Applications”, 2 nd
Edition, PEARSON.
17. S.D.Joshi, “Database Management System”, Tech-Max Publication.
18. R. Ramkrishnan , J. Gehrke, "Database Management Systems", 3rd Edition,
McGraw-Hill
19. C. J. Date, “Introduction to Database Management Systems”, 8th Edition, Pearson
20. Atul Kahate, “Introduction to Database Management System”, 3rd Edition,
Pearson.
21. Bharat Lohiya, “Database Systems”, Tenth Edition, Aditya Publication, Amravati.
22. Vijay Krishna Pallaw, “Database Management System”, 2nd, Asian Books Pvt.
Ltd.
23. Database Management Systems, Database Management Systems.
24. Mrs. Jyoti G. Mante (Khurpade), Mrs. Smita M. Dandge, “Database Mangement
System”, Nirali Prakashan.
25. Step by Step Database Systems (DBMS), Shiv Krupa Publications, Akola
26. Mrs. Sheetal Gujar –Takale, Mr. Sahil K. Shah, “Database Management System”,
Nirali Prakashan.
27. Mrs. Jyoti G. Mante (Khurpade), U.S. Shirshetti, M.V. Salvi, K.S. Sakure,
“Relational Database Management System”, Nirali Prakashan.
28. Seema Kedar, Rakesh Shirsath, “Database Management Systems”, Technical
Publications.
29. Pankaj B. Brahmankar, “Database Management Systems”, Tec h-Max
Publications, Pune.
30. Imran Saeed, Tasleem Mustafa, Tariq Mahmood, Ahsan Raza Sattar, “A
Fundamental Study of Database Management Systems”, 3 rd Edition, IT Series
Publication.
31. Database Management Systems Lecture Notes, Malla Reddy College of
Engineering and Technology, Secunderabad.
32. Dr. Satinder Bal Gupta, Aditya Mittal, “Introduction to Database Management
System, University Science Press.
33. E-Notes BCS 41/ BCA 41 on “Database Management System”, Thiruvalluvar
University.
34. Bighnaraj Naik, Digital Notes on “Relational Database Management System”,
VSSUT, Burla.
35. Viren Sir, Relational database Management System”, Adarsh Institute of
Technolgoyt (Poly), VITA.
36. Sitansu S. Mitra, “Principles of Relational Database Systems”, Prentice Hall.
37. Neeraj Sharma, Liviu Perniu, Raul F. Chong, Abhishek Iyer, Chaitali Nandan,
Adi-Cristina Mitea, Mallarswami Nonvinkere, Mirela Danubianu, “Database
Fundamentals”, First Edition, DB2 On Campus Book Series.
38. Database Management System, Vidyavahini First Grade College, Tumkur.
39. Bhavna Sangamnerkar, Revised by: Shiv Kishor Sharma, “Database Management
System”, Think Tanks Biyani Group of Colleges.
40. Tibor Radvanyi, “Database Management Systems”.
41. Ramon A. Mata- Toledo, Pauline K. Cushman, “Fundamentals of Relational
Databases”, Schaum’s Outlies.
Web Resources
1. https://beginnersbook.com/2015/04/dbms-tutorial/
2. https://tutorialspoint.com/dbms/
3. https://www.improgrammer.net/top-10-databases-should-learn-2015/
4. https://www.softwaretestinghelp.com/database-management-software/
5. www.BtechTutorial.com
Unit-I
Data and Information
Data are raw facts (or figures) from which the required information is
produced. The word raw means that, the facts have not yet been
processed to get the exact meaning.
Data can be something simple and useless unless until it is organized.
Data is an individual unit that contains raw material which does not
carry any specific meaning.
Data is plural of datum.
Data may consist of numbers, symbols, characters, documents,
images, video segments etc.
Information can be defined as the organized and classified data to
provide meaningful values.
Information is nothing but redefined data. We can say - when we
arrange data in a proper format then it can be called as information.
According to Burch and Grudnitski – “Information is data that have
been put into a meaningful and useful context and communicated to
recipient who uses it to make decisions”.
E.g. – if we say 70, 75, 80, 85 are the numbers then it may become
data. But if we say 70, 75, 80, 85 are the marks of four different
subjects awarded to the student XYZ, then it can be called as
information.
Data and information are closely related and are often used
interchangeably.
Overview of DBMS
Database can be defined as a organized collection of related data.
Database is nothing but a set of data having some relation between
them.
Examples of database – College database which stores information
about students, teachers, subjects, laboratories, classes etc. Other
Advantages of DBMS
The advantages of Database system over file-processing systems are:
Controls redundancy and inconsistency.
Maintains data integrity
Disadvantages of DBMS
DBMS implementation cost is high compared to the file system
Complexity: Database systems are complex to understand
Performance: Database systems are generic, making them
suitable for various applications. However this feature affects
their performance for some applications.
More chances of failure
In some applications, a DBMS may run less efficiently than
file-processing system
View of Data
A major purpose of a database system is to provide users with an
abstract view of the data. i.e. the system hides certain details of
how the data are stored and maintained.
In the three level architecture of DBMS, the top level is “view
level”. The view level provides the “view of data” to the users and
hides the irrelevant details such as data relationship, database
schema, constraints, security etc from the user.
To understand the view of data, we must have a basic knowledge
of data abstraction and instance & schema
Data Abstraction: - To ease the user interaction with database,
the developers hide internal complex details from end users. This
process of hiding complex/irrelevant details from user is called data
abstraction.
COURSE
COURSE_CODE COURSE_NAME MARKS BRANCH SEMESTER
COURSE
COURSE_CODE COURSE_NAME MARKS BRANCH SEMESTER
COMP-100 DBMS 60 Computer Fifth
COMP-101 COA 60 Computer Fourth
ETC-100 AE 60 ETC Third
Data Models
o The model helps the user to understand the complexities of real
world environment.
o Data models are collection of conceptual tools for describing
data, data relationships, data semantics, and consistency
constraints.
Database Languages
o There are four types of database languages, in general.
Transaction Management
A database transaction is a sequence of actions that are treated as a
single unit of work. These actions should either complete entirely or
take no effect at all. Transaction management is an important part of
RDBMS-oriented enterprise application to ensure data integrity and
consistency. The concept of transactions can be described with the
following four key properties described as ACID −
Atomicity − A transaction should be treated as a single unit of
operation, which means either the entire sequence of operations is
successful or unsuccessful.
Consistency − This represents the consistency of the referential
integrity of the database, unique primary keys in tables, etc.
Isolation − There may be many transaction processing with the
same data set at the same time. Each transaction should be
isolated from others to prevent data corruption.
Durability − Once a transaction has completed, the results of this
transaction have to be made permanent and cannot be erased from
the database due to system failure.
Database Architecture
Also Refer topic “Three Level Architecture of DBMS”, page no 11.
The architecture of a database system is greatly influenced by the
underlying computer system on which the database system runs.
can fill in appropriate fields of the form. Naive users may also
simply read reports generated from the database.
Application programmers:- They are computer professionals
who write application programs. Application programmers can
choose from many tools to develop user interfaces. Rapid
application development (RAD) tools are tools that enable an
application programmer to construct forms and reports with
minimal programming effort.
Sophisticated users: - They interact with the system without
writing programs. Instead, they form their requests either using
a database query language or by using tools such as data
analysis software. Analysts who submit queries to explore data
in the database fall in this category.
Specialized users: - They are sophisticated users who write
specialized database applications that do not fit into the
traditional data-processing framework. Among these
applications are computer-aided design systems,
knowledgebase and expert systems, systems that store data with
complex data types (for example, graphics data and audio data),
and environment-modeling systems.
Database Administrator (DBA)
One of the main reasons for using DBMSs is to have central
control of both the data and the programs that access those data. A
person who has such central control over the system is called a
Database Administrator (DBA). The functions of a DBA include:
Schema definition. The DBA creates the original database
schema by executing a set of data definition statements in the DDL.
Choosing a DBMS – The DBA chooses particular database
management system.
Storage structure and access-method definition.
Schema and physical-organization modification - The DBA
carries out changes to the schema and physical organization to
reflect the changing needs of the organization, or to alter the
physical organization to improve performance.
Unit-I
(Database Design and E-R Model)
Overview of the Design Process
In a broad sense, the term database development describes the process
of database design and implementation.
The primary objective in database design is to create complete,
normalized, non-redundant (to the extent possible), and conceptual,
logical, and physical database models.
The implementation phase includes creating the database storage
structure, loading data into the database, and providing the data
management.
The task of creating a database application is a complex one,
involving design of the database schema, design of the programs (that
access and update the data), and design of a security scheme to control
access to data.
Design Phase:-
For a small application, it may be possible for a database designer,
to design almost complete database design.
But for a real-world application it will not be possible, because
generally no one person understands the complete data needs of an
application.
The database designer must interact with users to understand the
needs of his application, represent them in a high-level fashion that
can be understood by the users, and then translate the requirements
into lower levels of the design.
The initial phase of database design is to characterize fully the data
needs of the prospective database users. The database designer
needs to interact extensively with users to carry out this task. The
outcome of this phase is a specification of user requirements.
Entity Sets
In many literatures, just entity word is used instead of entity set.
An entity is a “thing” or “object” in the real world that is
distinguishable from all other objects.
An entity can be a person, place, thing or event also.
E.g. Professor, Department, Student, City, Book, Bank Loan, Bank
Account, Purchase, Flight Reservation etc. all can be the examples
of entity.
It is represented as – (Rectangle)
Attribute
Strong entity and Weak entity – an entity which has its own key
attribute is called as strong entity or regular entity. While an
entity which depends on other entity for its existence and
doesn't have any key attribute of its own is a weak entity.
(Note – Some SQL may not support the name of attribute as S-ID, so
use S_ID).
Instructor Student
Relationship Sets
A relation is an association is an association among two or
more entities.
A relationship is any association, linkage, or connection
between the entities of interest.
1004 Kamal
1005 Mohan
Attributes
Each entity has a set of attributes which are characteristics or
properties, which describe that entity.
Each attribute can accept a value from a set of permitted values
which is called the Domain or the Value set. E.g. ID attribute
of Instructor entity can be a set of positive integers (e.g. 100,
101, etc).
Types of attributes :- There are different type of attributes-
o Simple and Composite attribute- Simple attribute
means which cannot be divided into subparts (i.e. atomic
attribute). E.g. Salary, instructor ID can’t be divided into
subparts. The composite attribute can be divided into
subparts. E.g. an attribute Name can be structured as
composite attribute consisting of first-name, middle-
name and last-name.
first-name
ID Name
middle-name
Instructor last-name
ID Name
Phone-number
Date-of-birth
Instructor
Constraints
The constraints on the relationship are of two types – Mapping
cardinalities and Participation constraint.
Mapping Cardinalities ( or Cardinality Ratios)
Cardinality defines the number of entities in one entity set (i.e.
number of instances from one entity) which can be associated
with the number of entities of other entity set via relationship
set. There are four types of mapping cardinalities (i.e. mapping
constraints) –
1. One-to-one
2. One-to-many
3. Many-to-one
4. Many-to-many
1 1 1 M
M 1 M N
Participation Constraints
If every entity in entity set E participates in at least one
relationship of a relationship set R, then the participation is said to
be total. On the other hand, if only some of the entities in entity set
participate in the relationship, then the participation is said to be
partial. In figure 1(a), the participation of B in the relationship set
is total, while the participation of A in the relationship set is
partial. In figure 1(b), the participation of both A and B in the
relationship set are total.
1 Heads 1
Professor Department
Keys
There must have a way to specify how entities within a given
entity set (in other words – different instances of an entity) are
distinguished.
This distinguishing can be expressed in terms of their attributes.
Therefore, the values of the attribute values of an entity must be
such that they can uniquely identify the entity. In other words, no
two entities in an entity set are allowed to have exactly the same
value for all attributes.
The notion of a key for a relation schema (explained in Unit-III –
Introduction to relational model) applies directly to entity sets.
Normally there are following types of keys –
Primary key
Super key
Candidate key
Foreign key
The primary key of an entity set allows us to distinguish among
the various entities of the set. In terms of relational model, a
primary key is a key in a relational database that is unique for each
record. E.g. S-ID attribute can be a primary key (indicated by
underline) for Student entity.
S-ID
Entity-Relationship Diagrams
E-R diagram generally can express the overall logical structure of a
database graphically.
E-R diagrams are simple and clear.
Generally, two types of models are used for E-R modeling – Chen
Model and other is Crow’s Foot Model. Here mostly we are dealing
with Chen Model, which is originated by Dr. Peter Chen.
Basic Structure
An E-R diagram consists of following major components –
Date
Mapping Cardinality
Refer the topic - Mapping Cardinalities ( or Cardinality Ratios),
from page number 40, and Sample E-R diagram-2, page
number 46.
One-to-one relationship: - One employee is assigned only one
chair and also one chair accommodates only one employee at a
time.
Employee
1 Assigned 1
Chair
with
Roles
Sample E-R diagram :- With Roles
o Entity sets of a relationship need not be distinct
o The labels “manager” and “worker” are called roles; they
specify how employee entities interact via the works_for
relationship set.
o Roles are indicated in E-R diagrams by labeling the lines
that connect diamonds to rectangles.
o Role labels are optional, and are used to clarify semantics of
the relationship.
1 M
BOOK HAS EDITION
EDITION
S
Employee
Generalization: -
o The opposite of Specialization is Generalization. That is to
make a superclass from a number of subclass is known as the
process of Generalization.
o For example, consider the entity
types CAR and TRUCK shown in figure (a). Because they have
several common attributes, they can be generalized into the
entity type VEHICLE, as shown in figure (b).
Attribute Inheritance: -
o A crucial property of the higher- and lower-level entities
created by specialization and generalization is attribute
Constraints on Generalizations: -
The constraints that can be placed on generalization and specialization
are as follows:-
o Condition-defined:- In condition-defined, the membership of
entities is determined by placing a condition on the value of
some attribute of the superclass. The subclasses formed on the
basis of the specified condition are called condition-defined (or
predicate-defined) subclasses.
For example – if the EMPLOYEE entity has an attribute
Job-type, as shown in the following figure, then we can specify
the condition of membership in the PERMANENT subclass by
Job-type
EMPLOYEE
Job-type
d
CELEBRITY Name
Home-state
PLAYER LEADER
Sport Party
Aggregation: -
One limitation of the E-R model is that it cannot express
relationships among relationships.
Consider the ternary relationship works-on, between an employee,
branch, and job.
Bibliography
1. Abraham Silberschatz, Henry F. Korth, S. Sudarshan, “Database System
Concepts”, 6th Edition, McGraw-Hill Hill Education.
2. Abraham Silberschatz, Henry F. Korth, S. Sudarshan, “Database System
Concepts”, 4th Edition, McGraw-Hill Hill Education.
3. Ramez Elmasri and Shamkant B. Navathe “Fundamentals of Database Systems”,
5th Edition, Pearson.
4. Express Learning, “Database Management Systems”, ITL Education Solutions
Limited.
5. Archana Verma, “Database Management Systems”, GenNext Publication.
6. Dr. Rajiv Chopra, “Database Management Systems (DBMS) – A Practical
Approach”, 5th Edition, S. Chand Technical
7. Tanmay Kasbe, “Database Management System Concepts – A Practical
Approach”, First Edition, Educreation Publishing.
8. Mahesh Mali, “Database Management Systems”, Edition 2019, TechKnowledge
Publications.
9. Rajendra Prasad Mahapatra, Govind Verma, “Database Management System”,
Khanna Publishing.
10. Malay K. Pakhira, “Database Management System”, Eastern Economy Edition,
PHI.
11. Sarika Gupta, Gaurav Gupta, “Database Management System”, Khanna Book
Publishing Edition.
12. Riktesh Srivastava, Rajita Srivastava, “Relational Database Management
System”, New Age International Publishers.
13. Peter Rob, Carlos Coronel, “Database System Concepts’, Cenage Learning, India
Edition
14. Bipin C. Desai, “An Introduction to Database Systems”, Galgotia Publications.
15. G.K. Gupta, “Database Management Systems”, McGraw Hill Education.
16. Shio Kumar Singh, “Database Systems – Concepts, Design and Applications”, 2nd
Edition, PEARSON.
17. S.D.Joshi, “Database Management System”, Tech-Max Publication.
18. R. Ramkrishnan , J. Gehrke, "Database Management Systems", 3rd Edition,
McGraw-Hill
19. C. J. Date, “Introduction to Database Management Systems”, 8th Edition, Pea rson
20. Atul Kahate, “Introduction to Database Management System”, 3rd Edition,
Pearson.
21. Bharat Lohiya, “Database Systems”, Tenth Edition, Aditya Publication, Amravati.
22. Vijay Krishna Pallaw, “Database Management System”, 2nd, Asian Books Pvt.
Ltd.
23. Database Management Systems, Database Management Systems.
24. Mrs. Jyoti G. Mante (Khurpade), Mrs. Smita M. Dandge, “Database Mangement
System”, Nirali Prakashan.
25. Step by Step Database Systems (DBMS), Shiv Krupa Publications, Akola
26. Mrs. Sheetal Gujar –Takale, Mr. Sahil K. Shah, “Database Management System”,
Nirali Prakashan.
27. Mrs. Jyoti G. Mante (Khurpade), U.S. Shirshetti, M.V. Salvi, K.S. Sakure,
“Relational Database Management System”, Nirali Prakashan.
28. Seema Kedar, Rakesh Shirsath, “Database Management Systems”, Technical
Publications.
29. Pankaj B. Brahmankar, “Database Management Systems”, Tech-Max
Publications, Pune.
30. Imran Saeed, Tasleem Mustafa, Tariq Mahmood, Ahsan Raza Sattar, “A
Fundamental Study of Database Management Systems”, 3 rd Edition, IT Series
Publication.
31. Database Management Systems Lecture Notes, Malla Reddy College of
Engineering and Technology, Secunderabad.
32. Dr. Satinder Bal Gupta, Aditya Mittal, “Introduction to Database Management
System, University Science Press.
33. E-Notes BCS 41/ BCA 41 on “Database Management System”, Thiruvalluvar
University.
34. Bighnaraj Naik, Digital Notes on “Relational Database Management System”,
VSSUT, Burla.
35. Viren Sir, Relational database Management System”, Adarsh Institute of
Technolgoyt (Poly), VITA.
36. Sitansu S. Mitra, “Principles of Relational Database Systems”, Prentice Hall.
37. Neeraj Sharma, Liviu Perniu, Raul F. Chong, Abhishek Iyer, Chaitali Nandan,
Adi-Cristina Mitea, Mallarswami Nonvinkere, Mirela Danubianu, “Database
Fundamentals”, First Edition, DB2 On Campus Book Series.
38. Database Management System, Vidyavahini First Grade College, Tumkur.
39. Bhavna Sangamnerkar, Revised by: Shiv Kishor Sharma, “Database Management
System”, Think Tanks Biyani Group of Colleges.
40. Tibor Radvanyi, “Database Management Systems”.
41. Ramon A. Mata- Toledo, Pauline K. Cushman, “Fundamentals of Relational
Databases”, Schaum’s Outlies.
Web Resources
1. https://beginnersbook.com/2015/04/dbms-tutorial/
2. https://tutorialspoint.com/dbms/
3. https://www.improgrammer.net/top-10-databases-should-learn-2015/
4. https://www.softwaretestinghelp.com/database-management-software/
5. www.BtechTutorial.com