18CS53 - Database Management System
18CS53 - Database Management System
• Database system contains not only the database itself but also a complete definition or
description of the database structure and constraints
• This definition is stored in the DBMS catalog, which contains information such as the structure
of each file, the type and storage format of each data item, and various constraints on the data.
The information stored in the catalog is called meta-data, and it describes the structure of the
primary database
5
• In the file processing, the structure of data files is embedded in the application programs, so any
changes to file structure may require changing the application program that access those files.
• Whereas DBMS access programs do not require such changes in most cases.
• The structure of data files is stored in the DBMS catalog separately from the access programs.
We call this property as program-data independence.
• The characteristic that allows program-data independence and program-operation independence
is called data abstraction.
• A DBMS provides users with a conceptual representation of data that does not include many of
the details of how the data is stored or how the operations are implemented.
6
Controlling Redundancy
• Storing same data multiple times can be avoided
• Second, storage space is wasted when the same data is stored repeatedly, and this problem may be
serious for large databases
• Third, files that represent the same data may become inconsistent.
• In the database approach, the views of different user groups are integrated during database design
Restricting Unauthorized Access
• When multiple users share a large database, it is likely that most users will not be authorized to
access all information in the database.
• For example, financial data such as salaries and bonuses is often considered confidential, and only
authorized persons are allowed to access such data.
• A DBMS should provide a security and authorization subsystem, which the DBA uses to create
• accounts and to specify account restrictions. 07/14/2022
9
Providing Storage Structures and Search Techniques for Efficient Query Processing
• Database systems must provide capabilities for efficiently executing queries and updates. Because
the database is typically stored on disk, the DBMS must provide specialized data structures and
search techniques to speed up disk search for the desired records.
• The query processing and optimization module of the DBMS is responsible for choosing an
efficient query execution plan for each query based on the existing storage structures.
10
07/14/2022
11
07/14/2022
13
07/14/2022
15
Database System Concepts and Architecture
Data abstraction generally refers to the suppression of details of data organization and storage, and the
highlighting of the essential features for an improved understanding of data One of the main characteristics
of the database approach is to support data abstraction so that different users can perceive data at their
preferred level of detail
A data model—a collection of concepts that can be used to describe the structure of a database By structure
of a database we mean the data types, relationships, and constraints that apply to the data. Most data models
also include a set of basic operations for specifying retrievals and updates on the database.
Include concepts in the data model to specify the dynamic aspect or behavior of a database application
16
Conceptual data models use concepts such as entities, attributes, and relationships. An entity represents a real-
world object or concept.
An attribute represents some property of interest that further describes an entity, such as the employee’s
name or salary.
Entity–relationship model—a popular high-level conceptual data model. A relationship among two or
more entities represents an association among the entities.
Student
Name Student_Number Class Major
Course
Course_Name Course_Number Credit_Hours Department
Prerequisite
Course_Number Prerequisite_Number
18
Three-Schema Architecture and Data Independence
07/14/2022
19
The conceptual level has a conceptual schema, which describes the structure of the whole database
for a community of users. The conceptual schema hides the details of physical storage structures and
concentrates on describing entities, data types, relationships, user operations, and constraints.
The external or view level includes a number of external schemas or user views. Each external
schema describes the part of the database that a particular user group is interested in and hides the
rest of the database from that user group.
07/14/2022
20
Data Independence
Logical data independence is the capacity to change the conceptual schema without having to change
external schemas or application programs. We may change the conceptual schema to expand the
database (by adding a record type or data item), to change constraints, or to reduce the database.
Physical data independence is the capacity to change the internal schema without having to change
the conceptual schema. Hence, the external schemas need not be changed as well.
07/14/2022
21
Database Languages and Interfaces
DDL – Data Definition Languages – used by DBA and by database designers to schemas
DML – Data Manipulation Language – Manipulations include retrieval, insertion, deletion, and modification of the data
DBMS Interfaces • Menu-based Interfaces for Web Clients or Browsing Apps for Mobile Devices
• Forms-based Interfaces
• Graphical User Interfaces
• Natural Language Interfaces
• Keyword-based Database Search
• Speech Input and Output
• Interfaces for Parametric Users
• Interfaces for the DBA 07/14/2022
22
The Database System Environment
07/14/2022
23
Loading – Loading utility is used to load existing data files—such as text files or sequential files—into the
database
Backup – Backup utility creates a backup copy of the database, usually by dumping the entire database onto tape
or other mass storage medium.
Database storage reorganization – This utility can be used to reorganize a set of database files into different file
organizations and create new access paths to improve performance.
Performance monitoring – Such a utility monitors database usage and provides statistics to the DBA.
07/14/2022
24
• Data dictionary
• Information Repository
• Application Development Environment
• Communication Software
07/14/2022
25
Data Modeling Using the Entity–Relationship (ER) Model
COMPANY - Database
We list the data requirements for the database here, and then create its conceptual schema step-by-step as we
introduce the modeling concepts of the ER model.
The COMPANY database keeps track of a company’s employees, departments, and projects.
• The company is organized into departments. Each department has a unique name, a unique number, and a
particular employee who manages the department. We keep track of the start date when that employee
began managing the department. A department may have several locations.
• A department controls a number of projects, each of which has a unique name, a unique number, and a
single location.
• The database will store each employee’s name, Social Security number, address, salary, gender, and birth
date. An employee is assigned to one department, but may work on several projects, which are not
necessarily controlled by the same department.
• The database will keep track of the dependents of each employee for insurance purposes, including each
07/14/2022
dependent’s first name, gender, birth date, and relationship to the employee.
27
Entity Types and Entity Sets - A database usually contains groups of entities that are similar.
An entity type describes the schema or intension for a set of entities that share the same structure (Employee
Entities). The collection of entities of a particular entity type is grouped into an entity set, which is also called
the extension of the entity type.
An important constraint on the entities of an entity type is the key or uniqueness constraint on attributes.
key attribute - An entity type usually has one or more attributes whose values are distinct for each individual
entity in the entity set
07/14/2022
28
• Composite attributes can be divided into smaller subparts, which represent more basic attributes
with independent meanings.
• Attributes that are not divisible are called simple or atomic attributes
• Single-Valued versus Multivalued Attributes - attributes have a single value for a particular
entity & a attribute having multiple value is multivalued attributes.
• Stored versus Derived Attributes – Date of Birth & Age
• NULL Values
07/14/2022
29
07/14/2022
30
ER – Diagram
07/14/2022
31
Components of a ER Diagram
ER Model
key One-to-One
Composite One-to-Many
Multivalued Many-to-One
Weak Entity
NAME
MANAGER
DEPARTMENT
LOCATIO
LOCATIONS
MANGER_ST
NS ART_DATE
Number
Name Controlling_
department LOCATIONS NAME NUMBER Controlling Departments
PROJECT
LOCAT
Location
IONS 07/14/2022
33
LName
Minit
Salary
FName
Name Aadhar
Gender
Department
Employee
Birth_Date
07/14/2022
34
The Company Organized into departments. Each dept. has a unique name,
number, and who manages the dept.(employee), and date he manages the
dept.
Department controls ‘n’ number of projects. Each dept. has unique name,
number, and single location.
Employee – name, Aadhar, address, salary, gender, and DOB
An employee may associate with dept. but may work on several projects
07/14/2022
35
07/14/2022
36
• A relationship type R among n entity types E1, E2, . . . , En defines a set of associations— or a
relationship set—among entities from these entity types.
• Similar to the case of entity types and entity sets, a relationship type and its corresponding relationship
set are customarily referred to by the same name, R.
07/14/2022
37
1 1
Person has Phone
07/14/2022
39
1 M
Customer Placed Order
07/14/2022
40
M 1
Students Study College
07/14/2022
41
07/14/2022
42
S_addr
S_Name Col_id Col_name
USN Student
Study
College
IN
07/14/2022
43
07/14/2022
45
Generalization is a process in which the common attributes of more than one entities
form a new entity. This newly formed entity is called generalized entity
07/14/2022
46
Student Teacher
07/14/2022
47
07/14/2022
48
07/14/2022
49
07/14/2022
50
Text books and Reference books
Text Books
Fundamentals of Database Systems, Ramez ElmasriandShamkantB.Navathe,7 thEdition,2017,Pearson. ISBN: 978-0-13-397077-7
1.
Reference Books
Silberschatz Korth and Sudharshan, Database System Concepts, 6 th Edition,Mc-GrawHill,2013. ISBN-10: 9332901384
1.
Coronel, Morris, and Rob, Database Principles Fundamentals of Design, Implementation and Management, Cengage
2. Learning2012. ISBN 9781285196145
51
Some useful links
https://www.cs.uregina.ca/Links/class-info/215/erd/#:~:text=Data%20modeling%20is%20a%20technique,data%20
requirements%20for%20a%20database
https://www.geeksforgeeks.org/generalization-specialization-and-aggregation-in-er-model/
https://www.guru99.com/relational-data-model-dbms.html
https://www.tutorialspoint.com/dbms/relational_algebra.htm
52
Thank You