0% found this document useful (0 votes)
31 views58 pages

DBMS 1 Unit 1

Uploaded by

vepewip135
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views58 pages

DBMS 1 Unit 1

Uploaded by

vepewip135
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Database Management System -I

Dr. Ankit Bhavsar Database Management System - I 1


INTRODUCTION

0301203
DATABASE MANAGEMENT SYSTEM - I

0301206
PRACTICAL ON DBMS - I

BY:
Prof. (Dr.) Ankit Bhavsar

Dr. Ankit Bhavsar Database Management System - I 2


0301203 Database Management System - I

UNIT MODULES WEIGHTAGE

1 Introduction to DBMS 20 %

2 Introduction to RDBMS 20 %

3 Inroduction to Normalization 20 %

4 Open Source Database Management Software 20 %

5 Introduction to MySQL 20 %

Dr. Ankit Bhavsar Database Management System - I 3


INTERNAL EVALUATION

INTERNAL EVALUATION

ASSIGNMENTS ATTENDANCE MCQ TEST

5 Assignments 25 Marks 20 Marks * 5


* 5 Marks = 100Marks
= 25 Marks

Dr. Ankit Bhavsar Database Management System - I 4


TEXT BOOK


Database Principles Fundamentals of Design,
Implementation and Managements
 Publisher : - Cengage Learning
 Author : - Coronel, Morris and Rob

Dr. Ankit Bhavsar Database Management System - I 5


UNIT - 1 Introduction to DBMS


Introduction of the Data and DBMS

Role and Advantage of DBMS

DBMS Function and Environment

DBMS Users

Types of Database

Advantage and Disadvantage of DBMS

Database Models

Dr. Ankit Bhavsar Database Management System - I 6


Introduction to Database Management System

• Information is the result of processing raw data


to reveal its meaning
• A database is a shared, integrated computer
structure that stores a collection of
– End user data, that is, raw facts of interest to
the end user
– Metadata, or data about data, through which
the enduser data are integrated and managed

Dr. Ankit Bhavsar Database Management System - I 7


Role of DBMS


DBMS is a collection of programs that manages the database
structure and controls access to the data stored in the
database.

Role of DBMS :
• The DBMS serves as the intermediary between the user and the
database.
• The only way to access the data in the files is through the DBMS.
• The DBMS hides much of the database’s internal complexity from
the application programs and users.

Dr. Ankit Bhavsar Database Management System - I 8


Advantages of DBMS
• Improved data sharing :
– DBMS enables the data in the database to be shared
among multiple applications or users.

• Improved data security :


– The more users access the data, the greater the risks of
data security breaches. A DBMS provides a framework for
better enforcement of data privacy and security policies.

• Better data integration :


– It becomes much easier to see how actions in one
segment of the company affect other segments.

Dr. Ankit Bhavsar Database Management System - I 9


Advantages of DBMS

• Minimized data inconsistency :



Data inconsistency exists when different versions of
the same data appear in different places.The
probability of data inconsistency is greatly reduced in a
properly designed database.
• Improved data access :
– The DBMS makes it possible to produce quick
answers to the queries.

Dr. Ankit Bhavsar Database Management System - I 10


Advantages of DBMS

• Improved decision making :


– Better-managed data and improved data access
make it possible to generate better quality
information, on which better decisions are based.
• Increased end-user productivity :
– The availability of data, combined with the tools
that transform data into usable information,
empowers end users to make quick, informed
decisions that can make the difference between
success and failure in the global economy.

Dr. Ankit Bhavsar Database Management System - I 11


The Database System Environment

• The term database system refers to an organization of


components that define and regulate the collection, storage,
management, and use of data within a database environment
• The database system is composed of the five major parts
– Hardware
– Software
– People
– Procedures
– data

Dr. Ankit Bhavsar Database Management System - I 12


The Database System Environment

• Hardware.
– Hardware refers to all of the system’s physical devices; for
example, computers storage devices, printers, network
devices , and other devices

Dr. Ankit Bhavsar Database Management System - I 13


The Database System Environment
• Software:
– To make the database system function fully, three types of software are
needed:
• operating system software
• DBMS software
• Application programs and utilities.
– Operating system software manages all hardware components and makes it
possible for all other software to run on the computers. Examples of operating
system software include Microsoft Windows, Linux, Mac OS, UNIX, and MVS.
– DBMS software manages the database within the database system. Some
examples of DBMS software include Microsoft SQL Server, Oracle
Corporation’s Oracle, MySQL AB’s MySQL and IBM’s DB2.
– Application programs and utility software are used to access and
manipulate data in the DBMS and to manage the computer environment in
which data access and manipulation take place.

Dr. Ankit Bhavsar Database Management System - I 14


The Database System Environment
• People:
– This component includes all users of the database system. On
the basis of primary job functions, five types of users can be
identified in a database system:
• Systems administrators
• Database administrators
• Database designers,
• Systems analysts and programmers
• End users.

Dr. Ankit Bhavsar Database Management System - I 15


The Database System Environment
• People:
– System administrators: oversee the database system’s general
operations.
– Database administrators: also known as DBAs, manage the DBMS and
ensure that the database is functioning properly.
– Database designers: design the database structure. If the the
architecture is poor then the DBA or System adminstrator cannot produce
produce a useful database environment
– Systems analysts and programmers: design and implement the
application programs. They design and create the data entry screens,
reports, and procedures through which end users access and manipulate
the database’s data.
– End users: are the people who use the application programs to run the
organization’s daily operations.

Dr. Ankit Bhavsar Database Management System - I 16


The Database System Environment

• Procedures.
– Procedures are the instructions and rules that govern the
design and use of the database system.
– Procedures also are used to ensure that there is an organized
way to monitor and audit both the data that enter the database
and the information that is generated through the use of that data.

• Data.
– The word data covers the collection of facts stored in the
database.
– the determination of what data are to be entered into the
database and how that data are to be organized is a vital part
of the database designer’s job.

Dr. Ankit Bhavsar Database Management System - I 17


Types of database users

• System administrators: oversee the database system’s general


operations.
• Database administrators: also known as DBAs, manage the DBMS
and ensure that the database is functioning properly.
• Database designers: design the database structure. If the the
architecture is poor then the DBA or System adminstrator cannot
produce produce a useful database environment
• Systems analysts and programmers: design and implement the
application programs. They design and create the data entry
screens, reports, and procedures through which end users access
and manipulate the database’s data.
• End users: are the people who use the application programs to run
the organization’s daily operations.

Dr. Ankit Bhavsar Database Management System - I 18


DBMS Functions
A DBMS performs several important functions that guarantee the integrity and
consistency of the data in the database.
• Data dictionary management:
– The DBMS stores definitions of the data elements and their
relationships (metadata) in a data dictionary.
• Data storage management:
– The DBMS creates and manages the complex structures required for
data storage,thus relieving you from the difficult task of defining and
programming the physical data characteristics.
• Data transformation and presentation:
– The DBMS transforms entered data to conform to required data
structures.
• Security management:
– The DBMS creates a security system that enforces user security and
data privacy.
Dr. Ankit Bhavsar Database Management System - I 19
DBMS Functions

• Multiuser access control:



To provide data integrity and data consistency, the DBMS
uses sophisticated algorithms to ensure that multiple
users can access the database concurrently without
compromising the integrity of the database
• Backup and recovery management:
–The DBMS provides backup and data recovery to ensure
data safety and integrity
• Data integrity management:
– The DBMS promotes and enforces integrity rules, thus
minimizing data redundancy and maximizing data
consistency.
Dr. Ankit Bhavsar Database Management System - I 20
DBMS Functions

• Database access languages and application


programming interfaces:

The DBMS provides data access through a query
language. A query language is a nonprocedural
language—one that lets the user specify what must
be done without having to specify how it is to be
done. Structured Query Language (SQL) is the de
facto query language and data access standard
supported by the majority of DBMS vendors.
• Database communication interfaces:
– Current-generation DBMSs accept end-user requests
via multiple,different network environments.

Dr. Ankit Bhavsar Database Management System - I 21


Types of Database

Databases can be classified according to the



Number of users

Database location(s)

Extent of use
• The number of users determines whether the database is
classified:
1. Single-user
2. Multiuser

Dr. Ankit Bhavsar Database Management System - I 22


Types of Database


Location might also be used to classify the database. It
can be classified as
3. Centralized
4. Distributed
• The most popular way of classifying database is based on
how they will be used
5. Operational database
6. Data warehouse

Dr. Ankit Bhavsar Database Management System - I 23


Types of Databases

1. Single-user database :
– It supports only one user at a time. In other words, if user A is using
the database, users B and C must wait until user A is done.
– A single-user database that runs on a personal computer is called
a desktop database.

Dr. Ankit Bhavsar Database Management System - I 24


Types of Databases

2. Multiuser database
– It supports multiple users at the same time.
– When the multiuser database supports a relatively small number of
users (usually fewer than 50) or a specific department within an
organization, it is called a workgroup database.
– When the database is used by the entire organization and supports
many users (more than 50, usually hundreds) across many
departments, the database is known as an enterprise database.

Dr. Ankit Bhavsar Database Management System - I 25


Types of Databases

3. Centralized database:
– A database that supports data located at a single site is
called a centralized database.

3. Distributed database :
– A database that supports data distributed across several
different sites is called a distributed database.

Dr. Ankit Bhavsar Database Management System - I 26


Types of Databases

5. Operational database :

A database that is designed primarily to support a
company’s day-to-day operations is classified as an
operational database (sometimes referred to as a
transactional or production database).
6. Data warehouse :
– This type of database focuses primarily on storing data
used to generate information required to make tactical or
strategic decisions

Dr. Ankit Bhavsar Database Management System - I 27


Database Architecture

Dr. Ankit Bhavsar Database Management System - I 28


Database Architecture

• Three level architecture is also called three schema


architecture
• This framework is used for describing the structure of
specific database systems (small systems may not support
all aspects of the architecture)

Dr. Ankit Bhavsar Database Management System - I 29


Database Architecture - External View

Highest or Top level of data abstraction ( No knowledge of DBMS
S/W and H/W or physical storage).

This level is concerned with the user.

Each external schema describes the part of the database that a
particular user is interested in and hides the rest of the database
from user.

There can be n number of external views for database where n is
the number of users.

All database users work on external level of DBMS

Dr. Ankit Bhavsar Database Management System - I 30


Database Architecture -Conceptual View


This level is in between the user level and physical storage
view.

It hides the details of physical storage structures and
concentrates on describing entities, data types,
relationships, user operations, and constraints.

Dr. Ankit Bhavsar Database Management System - I 31


Database Architecture - Internal View

It is the lowest level of data abstraction. (it has the knowledge
about s/w and h/w).

At this level, it keeps the information about the actual
representation of the entire database i.e. the actual storage of
the data on the disk in the form of records or blocks.

It is close to the physical storage method.

The internal view is the view that tells us what data is stored in
the database and how.

Dr. Ankit Bhavsar Database Management System - I 32


Working of three level architecture

Dr. Ankit Bhavsar Database Management System - I 33


Disadvantages of DBMS
• Increased costs :
–The cost of maintaining the hardware, software, and personnel
required to operate and manage a database system can be costly
• Management complexity :
– Databases systems hold crucial company data that are accessed from
multiple sources, security issues must be assessed constantly.
• Maintaining currency :

To maximize the efficiency of the database system, you must keep your
system updated.
• Vendor dependence :
– Given the heavy investment in technology and personnel training,
companies might be reluctant to change database vendors.
• Frequent upgrade/replacement cycles :
– DBMS vendors frequently upgrade their products by adding new
functionality.
Dr. Ankit Bhavsar Database Management System - I 34
DATABASE MODEL

Database design focuses on how the database structure will be
used to store and manages end-user data.

Data Modeling - the first step in desigining a database, refers to
the process of creating a specific data model for a determined
problem domain.

A Data Model is a relatively simple representation, usually
graphical or more complex real world data structure.

The term “Data Model” and “Database Model” are same.

Dr. Ankit Bhavsar Database Management System - I 35


DATABASE MODEL

Hierarchical Model : data model based on trees.


Network Model: data model based on graphs with records as nodes
and relationships between records as edges.


Relational Model : data model based on tables


E-R Model : data model based on entiities and their relationship

Dr. Ankit Bhavsar Database Management System - I 36


DATABASE MODEL - EVOLUTION

GENERATION TIME DATA MODEL EXAMPLES

First 1960 - 1970 File System VMS

Second 1970 Hierarchical and IMS, ADABAS,


Netwowrk IDSII

Thired Mid - 1970 Relational DB2, Oracle, MS


SQL Server

Fourth Mid - 1980 Object Oriented DB2

Fifth Mid - 1990 XML DBXML


Dr. Ankit Bhavsar Database Management System - I 37
Emerging: No Late 2000 to Key Value store Simple DB
SQL Present Column store (Amazon)
Hierarchical Model

Hierarchical Model was developed in the 1960 to manage large
amount of data for complex manufacturing projects.

i.e Apollo rocket that landed on the moon in 1969.

The model’s basic logical structure is represented by an upside-
down tree.

The hierarchical structure contains levels or segment.

Segment is the equivalent of a file system’s record type.

Within hierarchical, each parent can have many children and
each child has only one parent.

This model depicts a set of one to many (1:M) relationship.

Dr. Ankit Bhavsar Database Management System - I 38


Hierarchical Model

Dr. Ankit Bhavsar Database Management System - I 39


Hierarchical Model
Advantages Disadvantages

Promotes data sharing Requires knowledge of physical


Parent/child relationship data storage characteristics
promotes conceptual simplicity Navigational system requires
and data integrity knowledge of hierarchical path
Database security is provided Changes in structure require
and enforced by DBMS changes in all application programs
Efficient with 1:M Implementation limitations
relationships No data definition
Lack of standards

Dr. Ankit Bhavsar Database Management System - I 40


Network Model

The Network Model was created to represent complex data relationships more
effectively than the hierarchical model.

It allow more than one parent.

The Network Model is generally not used today.

Starndard database concept like Schema, DML, DDL still used by morden data model

Dr. Ankit Bhavsar Database Management System - I 41


Network Model
Advantages Disadvantages

Conceptual simplicity system complexity limits


Handles more relationship efficiency
types Navigational system yields
Data access is flexible complex implementation,
Data owner/member application development, and
relationship promotes data management
integrity Structural changes require
Conformance to standards changes in all application
Includes data definition programs
language (DDL) and data
manipulation language
(DML)

Dr. Ankit Bhavsar Database Management System - I 42


NETWORK MODEL

Standard Database Concepts
– Schema : is the conceptual organization of the entire
database as viewed by the database administrator.
– SubSchema : define the portion of the database “seen”
by the application programs that actually produce the desired
information from the data within the database.
– DML : the Data Manipulation Lanaguage defines the
envionment in which data can be managed and is used to
work with the data in the database.
– DDL : the Data Definition Language enable the database
administrator to define the schema componets.

Dr. Ankit Bhavsar Database Management System - I 43


Hierarchical V/S Network
Hierarchical Model Network Model


Manage large amounts of data 
Represent complex data
for complex manufacturing relationships
projects 
Improve database performance

Represented by an upside- and impose a database standard
down tree which contains 
Depicts both one-to-many (1:M)
segments and many-to-many (M:M)

Segments: Equivalent of a file relationships
system’s record type

Depicts a set of one-to-many
(1:M) relationships

Dr. Ankit Bhavsar Database Management System - I 44


RELATIONAL MODEL

Relational Model was introuduced in 1970 bt E.F.Codd of IBM in
his landmark paper “A Relational Model of Data for Large Shared
Databanks”

The Relational data model is implemented through a very
sophistiated “Relational Database Management System”.

The RDBMS manages all of the physical details, while the user
sees the relational database as a collection of table in which
data are stored.

Dr. Ankit Bhavsar Database Management System - I 45


RELATIONAL MODEL

Performs basic functions provided by the hierarchical and
network DBMS systems.

Makes the relational data model easier to understand and
implement.

Hides the complexities of the relational model from the user.

Dr. Ankit Bhavsar Database Management System - I 46


RELATIONAL MODEL

Dr. Ankit Bhavsar Database Management System - I 47


RELATIONAL MODEL

Dr. Ankit Bhavsar Database Management System - I 48


RELATIONAL Model
Advantages Disadvantages


Structural independence is 
Requires substantial hardware and
promoted using independent system software overhead
tables 
Conceptual simplicity gives

Tabular view improves untrained people the tools to use a
conceptual simplicity good system poorly

Ad hoc query capability is 
May promote information
based on SQL problems

Isolates the end user from
physical-level details

Improves implementation and
management simplicity

Dr. Ankit Bhavsar Database Management System - I 49


ENITITY RELATIONSHIP MODEL

In turn, the rapidaly increasing requirements for transation and
information created the need for more complex database
implementation structure.

Thus creating the need for more effective database design tools -
– Entity Relationship (ER) Model or ERM

Peter Chen first introduced to ER data model in 1976, the
graphical representation of Entites and their relationships in a
database structure quickly became popular.

Dr. Ankit Bhavsar Database Management System - I 50


ENITITY RELATIONSHIP MODEL

The ER Model is baed on the following components:
– Entity:
– an entity is defined as anything about which data will be
collected and stored.
– An entity is represented in the ERD by a RECTANGE also
know as entity box.
– The name of enitity , a noun is written in the center of the
rectangle.
– The entity name is generally written in capital letters and in
singluar form. i.e PAINTER rather than PAINTERS,
EMPLOYEE rather than EMPLOYEES

Dr. Ankit Bhavsar Database Management System - I 51


ENITITY RELATIONSHIP MODEL

The ER Model is baed on the following components:
– Entity:
– Each row in the relational table is know as an ENTITY
INSTANCE or ENTITY OCCURRENCE in the ER model
– Each entity consists of a set of attributes that describes
particular characteristics of the entity.
– i.e EMPLOYEE will have attributes - PAN NUMBER,
ADDHAAR NO etc.

Dr. Ankit Bhavsar Database Management System - I 52


ENITITY RELATIONSHIP MODEL

The ER Model is baed on the following components:
– Relationships:
– It describe associations among data. Associations between
two entities.
– Three types of data relations ships :
• one – to – many (1:M)
• many – to – many (M:N)
• one – to – one (1:1)
– The ER model use the term “connectivity” to label the
relationship types.
– The name of the relationship is usually an active or passive
verb.
Dr. Ankit Bhavsar Database Management System - I 53
ENITITY RELATIONSHIP MODEL

Type of relationships using three ER notations:
– Chen notation
– Crow’s Foot notation
– Class diagram notation (part of UML )

Dr. Ankit Bhavsar Database Management System - I 54


ENITITY RELATIONSHIP MODEL

Dr. Ankit Bhavsar Database Management System - I 55


ENITITY RELATIONSHIP MODEL
Advantages Disadvantages


Visual modeling yields

Limited constraint representation
conceptual simplicity

Limited relationship representation

Visual representation makes

No data manipulation language
it an effective communication

Loss of information content occurs
tool when attributes are removed from

Is integrated with the entities to avoid crowded displays
dominant relational model

Dr. Ankit Bhavsar Database Management System - I 56



Sem – 2

CEC exam for unit 1 on – --/12 / 2022

Assignment Submission – -- / 12 / 2022

Dr. Ankit Bhavsar UNIT - 1 Intro to IS and its Need 57


UNIT 1 COMPLETED

Dr. Ankit Bhavsar UNIT - 1 Intro to IS and its Need 58

You might also like