This document provides an overview of key concepts in database management systems including:
- The main components of a DBMS including the query processor, storage manager, and disk storage.
- The three schema architecture separating the conceptual, internal, and external schemas.
- Database languages like DDL, DML, DCL, and TCL and their purposes.
- Entity-relationship modeling including entities, attributes, relationships, and extensions.
- Different types of database users such as administrators, designers, programmers, and end users.
2. SYLLABUS
Introduction: Concept & Overview of Database management system(DBMS)
Comparison of DBMS with file processing system
Data Models-Entity –Relationship
Network, Relational and object oriented Data Models
Database Languages
Database Users
Three Schema architecture of DBMS
Overall structure of DBMS
Entity-Relationship Diagram
4. Concept & Overview of Database
management system(DBMS)
The database is a collection of inter-related data which is used to retrieve,
insert and delete the data efficiently. It is also used to organize the data in
the form of a table, schema, views, and reports, etc.
For example: The college Database organizes the data about the admin,
staff, students and faculty etc.
Using the database, you can easily retrieve, insert, and delete the
information.
5. Characteristics of DBMS
It uses a digital repository established on a server to store and manage the
information.
It can provide a clear and logical view of the process that manipulates data.
DBMS contains automatic backup and recovery procedures.
It contains ACID properties which maintain data in a healthy state in case of
failure.
It can reduce the complex relationship between data.
It is used to support manipulation and processing of data.
It is used to provide security of data.
It can view the database from different viewpoints according to the
requirements of the user.
6. Advantages of DBMS
Controls database redundancy: It can control data redundancy because it stores
all the data in one single database file and that recorded data is placed in the
database.
Data sharing: In DBMS, the authorized users of an organization can share the data
among multiple users.
Easily Maintenance: It can be easily maintainable due to the centralized nature of
the database system.
Reduce time: It reduces development time and maintenance need.
Backup: It provides backup and recovery subsystems which create automatic
backup of data from hardware and software failures and restores the data if
required.
multiple user interface: It provides different types of user interfaces like
graphical user interfaces, application program interfaces
7. Disadvantages of DBMS
Cost of Hardware and Software: It requires a high speed of data processor
and large memory size to run DBMS software.
Size: It occupies a large space of disks and large memory to run them
efficiently.
Complexity: Database system creates additional complexity and
requirements.
Higher impact of failure: Failure is highly impacted the database because in
most of the organization, all the data stored in a single database and if the
database is damaged due to electric failure or database corruption then the
data may be lost forever.
11. Data Models-Entity –Relationship
ER model stands for an Entity-Relationship model. It is a high-level data
model. This model is used to define the data elements and relationship for a
specified system.
It develops a conceptual design for the database. It also develops a very
simple and easy to design view of data.
In ER modeling, the database structure is portrayed as a diagram called an
entity-relationship diagram.
For example, Suppose we design a school database. In this database, the
student will be an entity with attributes like address, name, id, age, etc. The
address can be another entity with attributes like city, street name, pin code,
etc and there will be a relationship between them.
12.
13. 1. Entity:
An entity may be any object, class, person or place. In the ER diagram, an
entity can be represented as rectangles.
Consider an organization as an example- manager, product, employee,
department etc. can be taken as an entity.
14. Weak Entity
An entity that depends on another entity called a weak entity. The weak
entity doesn't contain any key attribute of its own. The weak entity is
represented by a double rectangle.
15. 2. Attribute
The attribute is used to describe the property of an entity. Eclipse is used to
represent an attribute.
For example, id, age, contact number, name, etc. can be attributes of a
student.
16. a. Key Attribute
The key attribute is used to represent the main characteristics of an entity. It
represents a primary key. The key attribute is represented by an ellipse with
the text underlined.
17. b. Composite Attribute
An attribute that composed of many other attributes is known as a composite
attribute.
The composite attribute is represented by an ellipse, and those ellipses are
connected with an ellipse.
18. c. Multivalued Attribute
An attribute can have more than one value. These attributes are known as a
multivalued attribute. The double oval is used to represent multivalued
attribute.
For example, a student can have more than one phone number.
19. d. Derived Attribute
An attribute that can be derived from other attribute is known as a derived
attribute. It can be represented by a dashed ellipse.
For example, A person's age changes over time and can be derived from
another attribute like Date of birth.
20. 3. Relationship
A relationship is used to describe the relation between entities. Diamond or
rhombus is used to represent the relationship.
21.
22. Network, Relational and object oriented Data
Models
1. Network Data Model:
It is advance version of hierarchical data model. To organize data it uses
directed graphs instead of tree-structure. In this child can have more
than one parent. It uses concept of two data structures i.e., Records and
Sets.
23. Cont….
In the above figure, Project is root node which has two children i.e. Project 1
and Project 2.
Project 1 has 3 children and Project 2 has 2 children.
Total there are 5 children i.e Department A, Department B and Department C,
they are network related children as we said that this model can have more than
one parent.
So, for Department B and Department C have two parents i.e. Project 1 and
Project 2.
24. Relational Data Model:
The relational data model was developed by E.F. Codd in 1970. There are no
physical links as they are in hierarchical data model. Following are properties of
relational data model :
•Data is represented in form of table only.
•It deals only with data not with physical structure.
•It provides information regarding metadata.
•At the intersection of row and column there will be only
one value for tuple.
•It provides a way to handle queries with ease.
26. object oriented Data Models
In Object Oriented Data Model, data and their relationships are contained in a single
structure which is referred as object in this data model.
In this, real world problems are represented as objects with different attributes.
All objects have multiple relationships between them.
Basically, it is combination of Object Oriented programming and Relational Database
Model as it is clear from the following figure :
Object Oriented Data Model
= Combination of Object Oriented Programming + Relational database model
27.
28. Advantages of Object Oriented Data
Model :
Codes can be reused due to inheritance.
Easily understandable.
Cost of maintenance can reduced due to reusability of attributes and
functions because of inheritance.
Disadvantages of Object Oriented Data Model :
It is not properly developed so not accepted by users easily.
29. Database Languages
A DBMS has appropriate languages and interfaces to express database queries
and updates.
Database languages can be used to read, store and update the data in the
database.
30. 1. Data Definition Language (DDL)
DDL stands for Data Definition Language. It is used to define database
structure or pattern.
It is used to create schema, tables, indexes, constraints, etc. in the database.
Using the DDL statements, you can create the skeleton of the database.
Data definition language is used to store the information of metadata like the
number of tables and schemas, their names, indexes, columns in each table,
constraints, etc.
31. Here are some tasks that come under
DDL:
Create: It is used to create objects in the database.
Alter: It is used to alter the structure of the database.
Drop: It is used to delete objects from the database.
Truncate: It is used to remove all records from a table.
Rename: It is used to rename an object.
Comment: It is used to comment on the data dictionary.
32. 2. Data Manipulation Language (DML)
DML stands for Data Manipulation Language. It is used for accessing and
manipulating data in a database. It handles user requests.
Here are some tasks that come under DML:
Select: It is used to retrieve data from a database.
Insert: It is used to insert data into a table.
Update: It is used to update existing data within a table.
Delete: It is used to delete all records from a table.
Merge: It performs UPSERT operation, i.e., insert or update operations.
Call: It is used to call a structured query language or a Java subprogram.
Explain Plan: It has the parameter of explaining data.
Lock Table: It controls concurrency.
33. Data Control Language (DCL)
DCL stands for Data Control Language. It is used to retrieve the stored or
saved data.
The DCL execution is transactional. It also has rollback parameters.
(But in Oracle database, the execution of data control language does not have
the feature of rolling back.)
Here are some tasks that come under DCL:
Grant: It is used to give user access privileges to a database.
Revoke: It is used to take back permissions from the user.
34. Transaction Control Language (TCL)
TCL is used to run the changes made by the DML statement. TCL can be
grouped into a logical transaction.
Here are some tasks that come under TCL:
Commit: It is used to save the transaction on the database.
Rollback: It is used to restore the database to original since the last Commit.
35. Database Users
Database users are categorized based up on their interaction with the database.
These are seven types of database users in DBMS.
Database Administrator (DBA) : Database Administrator (DBA) is a person/team
who defines the schema and also controls the 3 levels of database. The DBA will
then create a new account id and password for the user if he/she need to access
the database. DBA is also responsible for providing security to the database and he
allows only the authorized users to access/modify the data base. DBA is
responsible for the problems such as security breaches and poor system response
time.
DBA also monitors the recovery and backup and provide technical support.
The DBA has a DBA account in the DBMS which called a system or superuser account.
DBA repairs damage caused due to hardware and/or software failures.
DBA is the one having privileges to perform DCL (Data Control Language) operations such
as GRANT and REVOKE, to allow/restrict a particular user from accessing the database.
36. Cont….
Naive / Parametric End Users : Parametric End Users are the unsophisticated who don’t have
any DBMS knowledge but they frequently use the database applications in their daily life to
get the desired results. For examples, Railway’s ticket booking users are naive users. Clerks
in any bank is a naive user because they don’t have any DBMS knowledge but they still use
the database and perform their given task.
System Analyst :System Analyst is a user who analyzes the requirements of parametric end
users. They check whether all the requirements of end users are satisfied.
Sophisticated Users : Sophisticated users can be engineers, scientists, business analyst, who
are familiar with the database. They can develop their own database applications according
to their requirement. They don’t write the program code but they interact the database by
writing SQL queries directly through the query processor.
Database Designers : Data Base Designers are the users who design the structure of database
which includes tables, indexes, views, triggers, stored procedures and constraints which are
usually enforced before the database is created or populated with data. He/she controls
what data must be stored and how the data items to be related. It is responsibility of
Database Designers to understand the requirements of different user groups and then create
a design which satisfies the need of all the user groups.
37. Cont…..
Application Programmers : Application Programmers also referred as System
Analysts or simply Software Engineers, are the back-end programmers who writes
the code for the application programs. They are the computer professionals. These
programs could be written in Programming languages such as Visual Basic,
Developer, C, FORTRAN, COBOL etc. Application programmers design, debug, test,
and maintain set of programs called “canned transactions” for the Naive
(parametric) users in order to interact with database.
Casual Users / Temporary Users : Casual Users are the users who occasionally
use/access the database but each time when they access the database they
require the new information, for example, Middle or higher level manager.
Specialized users : Specialized users are sophisticated users who write
specialized database application that does not fit into the traditional data-
processing framework. Among these applications are computer aided-design
systems, knowledge-base and expert systems etc.
38. Three Schema architecture of DBMS
Three schema Architecture
The three schema architecture is also called ANSI/SPARC architecture or
three-level architecture.
This framework is used to describe the structure of a specific database
system.
The three schema architecture is also used to separate the user applications
and physical database.
The three schema architecture contains three-levels. It breaks the database
down into three different categories.
41. The database system is divided into three
components: Query Processor, Storage
Manager, and Disk Storage.
These are explained as following below.
1. Query Processor: It interprets the requests (queries) received from end
user via an application program into instructions. It also executes the user
request which is received from the DML compiler.
Query Processor contains the following components –
DML Compiler: It processes the DML statements into low level instruction
(machine language), so that they can be executed.
DDL Interpreter: It processes the DDL statements into a set of table
containing meta data (data about data).
Embedded DML Pre-compiler: It processes DML statements embedded in an
application program into procedural calls.
Query Optimizer: It executes the instruction generated by DML Compiler.
42. Cont….
2. Storage Manager: Storage Manager is a program that provides an interface
between the data stored in the database and the queries received. It is also known
as Database Control System. It maintains the consistency and integrity of the
database by applying the constraints and executing the DCL statements. It is
responsible for updating, storing, deleting, and retrieving data in the database.
It contains the following components –
Authorization Manager: It ensures role-based access control, i.e,. checks whether
the particular person is privileged to perform the requested operation or not.
Integrity Manager: It checks the integrity constraints when the database is
modified.
Transaction Manager: It controls concurrent access by performing the operations
in a scheduled way that it receives the transaction. Thus, it ensures that the
database remains in the consistent state before and after the execution of a
transaction.
43. Cont….
File Manager: It manages the file space and the data structure used to represent
information in the database.
Buffer Manager: It is responsible for cache memory and the transfer of data
between the secondary storage and main memory.
3. Disk Storage: It contains the following components –
Data Files: It stores the data.
Data Dictionary: It contains the information about the structure of any database
object. It is the repository of information that governs the metadata.
Indices: It provides faster retrieval of data item.
44. Weak Entity Sets
Weak entity is depend on strong entity to ensure the existence of weak
entity. Like strong entity, weak entity does not have any primary key, It has
partial discriminator key. Weak entity is represented by double rectangle. The
relation between one strong and one weak entity is represented by double
diamond.
45. Extended E-R features
Extended ER is a high-level data model that incorporates the extensions to
the original ER model. Enhanced ER models are high level models that
represent the requirements and complexities of complex databases.
The extended Entity Relationship (ER) models are three types as given below
−
Aggregation
Specialization
Generalization
46. Specialization
The process of designing sub groupings within an entity set is called
specialization. It is a top-down process. If an entity set is given with all the
attributes in which the instances of the entity set are differentiated
according to the given attribute value, then that sub-classes or the sub-entity
sets can be formed from the given attribute.
Example
Specialization of a person allows us to distinguish a person according to
whether they are employees or customers. Specialization of account creates
two entity sets: savings account and current account.
In the E-R diagram specialization is represented by triangle components
labeled ISA. The ISA relationship is referred as superclass- subclass
relationship as shown below −
47.
48. Generalization
It is the reverse process of specialization. It is a bottom-up approach.
It converts subclasses to superclasses.
This process combines a number of entity sets that share the same features
into higher-level entity sets.
If the sub-class information is given for the given entity set then, ISA
relationship type will be used to represent the connectivity between the
subclass and superclass as shown below −
49.
50. Aggregation
It is an abstraction in which relationship sets are treated as higher level entity
sets and can participate in relationships.
Aggregation allows us to indicate that a relationship set participates in
another relationship set.
Aggregation is used to simplify the details of a given database where ternary
relationships will be changed into binary relationships.
Ternary relation is only one type of relationship which is working between
three entities.
Aggregation is shown in the image below −