Dbms Unit 1
Dbms Unit 1
Unit- 1
INTRODUCTION TO DBMS
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
What Is DBMS?
2
Database
View Levels of
DBMS
Architecture
A data model organizes elements of data and standardizes how they relate
to one another and to properties of the real world entities.
Data models describe how the data in database is get organized or stored
and how it is related with each other’s.
the different types of data models are as follow.
1. Relation model 7. Entity relation Model
2. Network model 8. Flat data model
3. Hierarchical model 9. Semi structured model
4. Object oriented model 10. Associative model
5. Context data model 11. Record base model
6. Object relation model
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
Relational Data Model
13
This model is the most popular model and the most extensively used model.
In this data can be stored in the tables and this storing is called as relation.
Each row in a relation contains unique value and it is called as tuple, each
column contains value from same domain and it is called as attribute.
Advantages
Structural independence – changes in the relational data structure do
not affect the DBMS’s data access in any way
Improved conceptual simplicity by concentrating on the logical view
Easier database design, implementation, management, and use
Powerful database management system.
Disadvantages
Can facilitate poor design and implementation
Advantages
Provide very efficient "High-speed" retrieval.
Simplicity The network model is conceptually simple and easy to design.
Ability to handle more relationship types The network model can handle the
one-to-many and many-to-many relationships.
Data Integrity In a network model, no member can exist without an owner.
Data Independence.
Disadvantages
System complexity: data are accessed one record at a time.
Making structural modifications to the database is very difficult as the data
access method is navigational.
Any changes made to the database structure require the application
programs to be modified before they can access data.
this model has one parent entity with several children entity but at the top
we should have only one entity called root.
For example, department is the parent entity called root and it has several
children entities like students, professors and many more.
In This model data are organized into a tree-like structure.
The data are stored as records which are connected to one another through
links. It preserves one to many relations.
Advantages
Simplicity
Security
Database Integrity
Efficiency
Disadvantages
Complexity of Implementation
Difficulty in Management
Complexity of Programming
Poor Portability
Database Management Problems
Object oriented data model can hold the audio, video and graphic files.
OODBMS should be used when there is a business need, high performance
required, and complex data is being used.
It can represent the data in real world entity called Object.
Advantages:
Suitable for application expecting high performance.
Due to the object oriented nature of the database model, it is much
simpler to approach a problem
Disadvantages:
complex data is being used
Complex relations are used
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
Context-Awareness Properties of Ubicomp
20
Object relation model is a very powerful model but coming to its design it is
quiet complex.
This complexity is not problem because it gives efficient results and
widespread with huge applications.
The Object Relational data model allows its users to inherit objects, tables .
An inherited object contains new attributes as well as the attributes that
were inherited.
The object relational data model can get quite complicated and difficult to
handle at times as it is a combination of the Object oriented data model and
Relational data model and utilizes the functionalities of both of them.
Record base model: This model specify the overall structure of database. Like
Object based model, they also describe data at the conceptual and view levels. T
Flat Data Model: The flat model is the earliest, simplest data model. It simply
lists all the data in a single table, consisting of columns and rows. In order to
access or manipulate the data, the computer has to read the entire flat file into
memory, which makes this model inefficient for all but the smallest data sets.
26
Types of Attributes
Name Meaning
Entity-Set & Key is an attribute or collection of attributes that uniquely
Keys identifies an entity among entity set.
Cardinalities Types
Super Key A set of attributes (one or more) that collectively identifies an
entity in an entity set.
Candidate The minimal set of attribute which can uniquely identify a tuple
Key is known as candidate key.
Primary A primary key is one of the candidate keys chosen by the
Key database designer to uniquely identify the entity set.
Foreign If an attribute is depend on the attribute present as values of
Key some other attribute for its identity, it will be referred as foreign
key
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
Composite Attribute
33
34
37
39
40
41
Specialization is the opposite of generalization. In specialization, a group of
entities is divided into sub-groups based on their characteristics.
specialization is a process that defines a group entities which is divided into
sub groups based on their characteristic.
It is a top down approach, in which one higher entity can be broken down
into two lower level entity.
42
43
Sub class and Super class relationship leads the concept of Inheritance.
The relationship between sub class & super class is denoted with
Symbol .
Super Class: Super class is an entity type that has a relationship with one or
more subtypes. An entity cannot exist in database merely by being member of
any super class.
For example: Shape super class is having sub groups as Square, Circle,
Triangle.
Sub Class: Sub class is a group of entities with unique attributes. Sub class
inherits properties and attributes from its super class. For example: Square,
Circle, Triangle are the sub class of Shape super class.
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
Sub Class and Super Class
45
First-Name Last-Name
Roll_no city
Roll_no Mobile-no
Way-01: AR ( a1 , a2 , b1 ) & B ( b1 , b2 )
Way-02: A ( a1 , a2 ) & BR ( a1 , b1 , b2 )
Installing and upgrading the DBMS Servers: - DBA is responsible for installing a
new DBMS server for the new projects. He is also responsible for upgrading these
servers as there are new versions comes in the market or requirement.
Design and implementation: - He should be able to decide proper memory
management, file organizations, error handling, log maintenance for the database.
Performance tuning: - Since database is huge and it will have lots of tables, data,
constraints & indices, there will be variations in the performance from time to time.
Migrate database servers: - Sometimes, users using oracle would like to shift to
SQL server or Netezza. It is the responsibility of DBA to make sure that migration
happens without any failure, and there is no data loss.
Backup and Recovery: - Proper backup and recovery programs needs to be
developed by DBA and has to be maintained him.
Security: - DBA is responsible for creating various database users and roles, and
giving them different levels of access rights.
Documentation: - DBA should be properly documenting all his activities so that if
he quits or any new DBA comes in, he should be able to understand the database
without any effort.
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
Legacy System
67
The Software system which are developed long year ago for an organisation
but still they are in use are called as legacy system.
There is a significant business risk in simply scrapping a legacy system &
replacing it with a system that has developed using modern technology.
During their lifetime they have undergone major changes which may not
have been documented.
Legacy systems are not simply old software systems. Legacy systems are
socio-technical computer-based systems so they include software,
hardware, data and business processes.
Changes to one part of the system inevitably involve further changes to
other components.
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
The different parts of a legacy system
68
System hardware: In many cases, legacy systems have been written for
mainframe hardware which is no longer available, which is expensive to
maintain and which may not be compatible with current organisational IT
purchasing policies.
Support software: The legacy system may rely on a range of different
support software from the operating system and utilities provided by the
hardware manufacturer.
Application software: As I discuss later, the application system which
provides the business services is usually composed of a number of separate
programs which have been developed at different times.
Application data: These are the data which are processed by the
application system.
Business processes: These are processes which are used in the business
to achieve some business objective.
Business policies and rules: These are definitions of how the business
should be carried out and constraints on the business.
Prepared By: Prof. V. K. Wani Unit No. 1: Introduction to DBMS
Layered model of a legacy system
70