AD22302-DBMS -UNIT 1
AD22302-DBMS -UNIT 1
AD22302-DBMS -UNIT 1
Prepared By
C. Jasphin,
AP/AI&DS,
SXCCE.
COLLEGE VISION AND MISSION
Vision
To be an institution of eminence of optimal human development, excellent
engineering education and pioneering research towards developing a technically-
empowered humane society.
Mission
To transform the (rural) youth into top class professionals and technocrats willing to
serve local and global society with ethical integrity, by providing vibrant academic
experience of learning, research and innovation and stimulating opportunities to
develop personal maturity and professional skills, with inspiring and high caliber
faculty in a quality and serene infrastructural environment.
DEPARTMENT VISION AND
MISSION
Vision
intelligence and data science to serve the changing needs of industry and society.
Mission
• To bring out career oriented graduates who are industry ready by adopting best practices of
teaching-learning process.
• To cultivate professional approach, strong ethical values and research spirit along with
leadership qualities.
2 Problem analysis: Identify, formulate, review research literature, and analyze complex engineering
problems reaching substantiated conclusions using first principles of mathematics, natural sciences,
and engineering sciences.
3 Design/development of solutions: Design solutions for complex engineering problems and design
system components or processes that meet the specified needs with appropriate consideration for the
public health and safety, and the cultural, societal, and environmental considerations.
12 Lifelong learning: Recognize the need for, and have the preparation and
ability to engage in independent and life-long learning in the broadest context of
technological change.
PROGRAMME SPECIFIC OUTCOMES (PSOs)
CO1: Explain the database development life cycle and apply conceptual modeling.
CO2: Apply SQL queries to create, manipulate and query the database.
PO’s PSO’s
CO’s 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
1 2 2 3 3 - - - - 3 1 2 1 2 3 3
2 2 3 1 3 1 - - - 1 2 2 1 3 3 3
3 2 2 2 1 1 - - - 2 3 1 2 1 1 2
4 2 2 3 1 - - - - 1 2 1 2 2 2 2
5 3 1 3 2 1 - - - 1 3 1 1 2 1 1
AVG 2 2 2 2 1 - - - 2 2 1 1 2 2 2
OBJECTIVE OF DBMS
Data Information
Raw facts Processed data
Un organized organized
Eg.marks Eg.average marks
In earlier days data was stored in the form of files. In
the file system adding, deleting and updating of data is
very difficult for the user.
Disadvantages of Traditional File Processing System
The traditional file system has following disadvantages:
1) data redundancy: data redundancy means repetition of the same data in
multiple places. It can lead to inconsistencies, increased storage requirements,
and impacting data integrity
2) data inconsistency: data inconsistency occurs when various copies of same data
may no longer get matched. For example changed address of an employee may
be reflected in one department and may not be available (or old address present)
for other department.
3) difficulty in accessing data: the conventional file system does not allow to
retrieve the desired data in efficient and convenient manner.
Disadvantages of Traditional File Processing System- Cont…
4) data isolation: data stored in a file system is not easily integrated with
other data. Files can be stored in various formats (like text, binary), and on
disparate systems, which can make it challenging to combine data from
different sources.
5) integrity problems: It refers to the maintenance and assurance that the
data in a file are correct and consistent.
6) atomicity problems: Atomicity refers an operation (like updating a file)
either completely succeeds or completely fails, with no partial success. it is
difficult to ensure atomicity in file processing system.
7) concurrent access anomalies: For efficient execution, multiple users
update data simultaneously, in such a case data need to be synchronized. as
in traditional file systems, data is distributed over multiple files, one cannot
To overcome these drawbacks database system is proposed.
Database
◦ A database is a stored, systematic collection of data. it can contain any type of data,
including words, numbers, images, videos, and files.
◦ Database represents some aspect of the real world, sometimes called the miniworld or
the universe of discourse (UoD).
◦ DBMS is a computerized system that enables users to create and maintain a database.
◦ It organize data into tables.
◦ Database Management System (DBMS) is used to store, retrieve, and edit data.
◦ The collection of information stored in the database at a particular moment is called
an instance of the database. The overall design of the database is called the
database schema.
Applications of DBMS
S.No. File System DBMS
1 It is a traditional method to store data files in It is the modem way to create and manage
the computer. database.
2 File system help to store the data in the It help to easily create, insert, delete and update
computer's hard disk. the data from the database.
3 Difficult to manipulate and store the data Insertion, deletion and modification is done
because it is done manually. using SQL.
4 There is a data redundancy There is no data redundancy
• Data models specify how data is linked to one another, as well as how it is
handled and stored within the system.
Categories of Data Models
The data models are categorized according to the types of concepts
• high-level or conceptual data models provide concepts that describe the details how
the users perceive the data. It is also called entity based or object based data models
• low-level or physical data models provide concepts that describe the details of how
data is stored on the computer storage media, typically magnetic disks.
• representational (or implementation) data models provide concepts that may be
easily understood by end users.
Types of Data Models
Hierarchical Model
Network Model
Entity-Relationship Model
Relational Model
Hierarchical Model
Hierarchical Model was the first DBMS model. This model organizes the data in the hierarchical
tree structure.
The hierarchy starts from the root which has root data and then it expands in the form of a tree by
adding child node to the parent node.
Example:
Features of a Hierarchical Model
◦ One-to-many relationship: The data here is organized in a tree-like structure. Have only one
path from parent to any node.
◦ Example: In the above example, if we want to go to the node sneakers we only have one path
to reach there i.e through men's shoes node.
◦ Parent-Child Relationship: Each child node has a parent node but a parent node can have
more than one child node. Multiple parents are not allowed.
◦ Pointers: Pointers are used to link the parent node with the child node and are used to navigate
between the stored data.
Advantages of Hierarchical Model
1. It is very simple and fast to traverse through a tree-like structure.
2. Any change in the parent node is automatically reflected in the child node so,
the integrity of data is maintained.
Disadvantages of Hierarchical Model
1. Many-to-many relationships are not supported.
2. If a parent node is deleted then the child node is automatically deleted.
Network Model
• This model is an extension of the hierarchical model.
• This model is the same as the hierarchical model, the only difference is can have more
than one parent.
• Data is organized into tree structure with many-to-many relationships
• Example: The node student has two parents i.e. CSE Department and Library.
Features of a Network Model
Ability to Merge more Relationships:
◦This model has the ability to manage one-to-one relationships as well as many-
to-many relationships.
Many paths:
◦As there are more relationships there can be more than one path to the same
record.
Advantages of Network Model
◦Easy navigation
◦Easy and fast to retrieve data
Disadvantages of Network Model
◦Difficult to define the relationship between entities
◦Updation, deletion and insertion is very complex.
ER Model
1. Simple
2. Effective Communication Tool
3. Easy Conversion to any Model
Disadvantages of ER Model
1. Loss of information
2. Limited relationship
• A row contains all the information about any instance of the object.
Attribute or field:
Three levels
Internal level
Conceptual level
External level
Internal Level
It covers the data structures and file organizations used to store data on
storage devices.
It uses a physical data model and describes the complete details of data
storage and access paths for the database.
Conceptual Level
This level describes what data is stored in the database and the relationships
among the data
The conceptual schema hides the details of physical storage structures and
concentrates on describing entities, data types, relationships, user operations,
and constraints.
External Level
• The external or view level includes a number of external schemas or user views.
• This level is the users’ view of the database. It describes that part of the database
that is relevant to each user.
• hides the rest of the database from that user group.
• The external view includes only those entities, attributes, and relationships in the
“real world” that the user is interested in.
Data Independence
• Data independence refers characteristic of being able to modify the schema at one
level of the database system without altering the schema at the next higher level.
Types
• Logical data independence defined the capacity to change the conceptual schema without having to change
the external schema.
• Logical data independence is used to separate the external level from the conceptual view.
• Changes in the conceptual view of the data would not be affect the user view of the data.
• Physical data independence defined the capacity to change the internal schema without having to change
the conceptual schema.
• Physical data independence is used to separate conceptual levels from the internal levels.
• changes in the storage size of the database system server, will not affect the Conceptual structure of the
III- DATABASE ENVIRONMENT
1.DBMS Component Modules
The figure is divided into two parts.
The top part - various users of the database environment and their interfaces.
The lower part - internal modules of the DBMS responsible for storage of data and processing of
transactions.
1. DBA staff, casual users who work with interactive interfaces to formulate queries
2. Application programmers who create programs using some host programming languages
3. Parametric users who do data entry work by supplying parameters to predefined transactions
DDL compiler processes schema definitions, specified in the DDL, and stores descriptions of the schemas
Catalog includes information such as the names and sizes of files, names and data types of data items, storage
- elimination of redundancies
information about the stored data and generates executable code that performs the
necessary operations for the query and makes calls on the runtime processor.
programming language
These commands are sent to the DML compiler for compilation into object code for
database access.
Runtime database processor executes
• It works with the system catalog and may update it with statistics.
• It also works with the stored data manager to carry out the low-level input/output
(read/write) operations between the disk and main memory.
• Concurrency control and backup and recovery systems - integrated with the working of
runtime database processor for purposes of transaction management.
2.Database System Utilities
Loading. A loading utility is used to load existing data files such as text files or sequential files into
the database
Backup. A backup utility creates a backup copy of the database, usually by dumping the entire
database onto tape or other mass storage medium. The backup copy can be used to restore the
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 monitors database usage and provides statistics to the DBA.
IV- DATABASE SYSTEM DEVELOPMENT LIFECYCLE
◦The stages of the database system development lifecycle are not strictly
feedback loops.
◦ It plan how the stages of the lifecycle can be realized most efficiently and effectively.
◦ First step in database planning is to clearly define the mission statement for the
database system.
◦ Once the mission statement is defined, the next activity involves identifying the
mission objectives.
◦ Database planning should also include the development of standards
how data will be collected,
how the format should be specified,
what documentation will be needed, and
how design and implementation should proceed.
System Definition
It describes the scope and boundaries of the database system
and the major user views
User Views
Defines the requirement in a database system from the perspective of a
particular job role (such as Manager or Supervisor) or enterprise application area
(such as marketing, personnel, or stock control). The requirements of a user view
may be distinct to that view or overlap with other views.
Requirements Collection and Analysis
database design.
database system.
The information collected at this stage may be poorly structured and include some informal requests, which
must be converted into a more structured statement of requirements. This is achieved using requirements
specification techniques.
Database design
The process of creating a design that will support the mission statement and mission objectives for the
required database system
◦ Database design is made up of three main phases: conceptual, logical, and physical design.
Conceptual database design
◦ The data model is built using the information documented in the users requirements specification.
Logical database design
◦ The process of constructing a model of the data based on a specific data model
Physical database design
◦ The process of producing a description of the implementation of the database on secondary storage to
achieve efficient access to the data
DBMS selection
◦ Evaluate products
Application Design
The two aspects of application design are transaction design and user interface design.
Prototyping
◦ Monitoring the performance of the system. If the performance falls below an acceptable
◦ Maintaining and upgrading the database system (when required). New requirements are
incorporated into the database system through the preceding stages of the lifecycle.
V-ENTITY-RELATIONSHIP MODEL
ER model stands for Entity-Relationship Model. It describes the structure of
database with the help of ER diagram
Entity:
◦ An entity is referred to as a real-world object. It can be a name, place, object, class,
etc.
◦ It is represented by a rectangle in an ER Diagram.
Example: teacher, department
Types
1.Strong-have attributes of their own
2.Weak-doesn’t Strong-have attributes of their own
Relationship:
It represents dependency among entities
Diamonds are used to show Relationships. The no.of entities that participate in the relationship is called as degree
Example: Teacher works for a department.
Types
1.Binary-relationship b/w 2 entities