Unit 1
Unit 1
Program: B.Tech
Course Name:DBMS
I
Course code: (E2UC302)
Chapter 1: Introduction
• Data, Information, Knowledge.
• Introduction: An overview of the database management system
• Purpose of Database Systems
• Database system Vs file system
• Database system concept and architecture
• Data Modelling using Entity Relationship model
• Enhanced ER model
Data
Data is collection of unstructured facts and figures about the object of
interest.
For e.g. data about an employee would include information like name,
address, age, educational qualifications etc.
For example, take yourself. You may be 5ft tall, have brown hair and blue
eyes. All of this is “data”. You have brown hair whether this is written
down somewhere or not.
Requirement Description
Integrity Data should be accurate e.g. my LinkedIn profile should
contain valid country name.
Availability I should be able to access LinkedIn and see my data at all
times.
Security Only my friends should be able to see my posts and no
one else.
Independent of I should be able to access the same data from my Android
Application app as well as from web browser on my laptop.
Concurrency All my friends should be able to see my posts at the same
time.
Information
Systematic and meaningful form of data.
Information allows us to expand our knowledge beyond the range of our
senses. We can capture data in information, then move it about so that
other people can access it at different times.
If I take a picture of you, the photograph is information. But what you look
like is data.
Information helps human beings in their decision making.
• Internal Schema
• Describes the physical storage structure
• Uses a physical data model
• Conceptual Schema
• Describes the structure of the whole database
• Uses a conceptual or an implementation data model
• External Schema
• Includes a number user views
• Uses a conceptual or an implementation data model
• Mappings
• The process of transforming requests and results between levels
DBMS Architecture: Three schema Architecture
In the above diagram:
It shows the DBMS architecture.
Mapping is used to transform the request and response between various database levels of architecture.
Mapping is not good for small DBMS because it takes more time.
In External / Conceptual mapping, it is necessary to transform the request from external level to
conceptual schema.
In Conceptual / Internal mapping, DBMS transform the request from the conceptual to internal level.
Objectives of Three schema Architecture:
Different users need different views of the same data.
The approach in which a particular user needs to see the data may change over time.
The users of the database should not worry about the physical implementation and internal workings of
the database such as data compression and encryption techniques, hashing, optimization of the internal
structures etc.
All users should be able to access the same data according to their requirements.
DBA should be able to change the conceptual structure of the database without affecting the user's
Internal structure of the database should be unaffected by changes to physical aspects of the storage.
The Three-schema architecture
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.
There are two types of data independence: Logical Data Independence and
Physical Data Independence
Entity-Relationship Data Model: An ER model is the logical representation of data as objects and relationships
among them. These objects are known as entities, and relationship is an association among these entities. This
model was designed by Peter Chen and published in 1976 papers. It was widely used in database designing. A set of
attributes describe the entities. For example, student_name, student_id describes the 'student' entity. A set of the
same type of entities is known as an 'Entity set', and the set of the same type of relationships is known as
'relationship set'.
Object-based Data Model: An extension of the ER model with notions of functions, encapsulation, and object
identity, as well. This model supports a rich type system that includes structured and collection types. Thus, in
1980s, various database systems following the object-oriented approach were developed. Here, the objects are
nothing but the data carrying its properties.
Semi-structured Data Model: This type of data model is different from the other three data models (explained
above). The semi-structured data model allows the data specifications at places where the individual data items of
the same type may have different attributes sets. The Extensible Markup Language, also known as XML, is widely
used for representing the semi-structured data. Although XML was initially designed for including the markup
information to the text document, it gains importance because of its application in the exchange of data.
Data Model Schema and Instance
The data which is stored in the database at a particular moment of time is called an instance of the
database.
The overall design of a database is called schema.
A database schema is the skeleton structure of the database.
It represents the logical view of the entire database.
A schema contains schema objects like table, foreign key, primary key, views, columns, data types,
stored procedure, etc.
A database schema can be represented by using the visual diagram.
That diagram shows the database objects and relationship with each other.
A database schema is designed by the database designers to help programmers whose software will
interact with the database.
The process of database creation is called data modeling.
A schema diagram can display only some aspects of a schema like the name of record type, data type,
and constraints. Other aspects can't be specified through the schema diagram.
Data Model Schema and Instance
For example, the given figure neither show the data type of each data item nor the relationship
among various files.
In the database, actual data changes quite frequently. For example, in the given figure, the database
changes whenever we add a new grade or add a student.
The data at a particular moment of time is called the instance of the database.
Levels of Abstraction
• Physical level describes how a record (e.g., customer) is stored.
• Logical level: describes data stored in database, and the relationships
among the data.
type customer = record
name : string;
street : string;
city : integer;
end;
• View level: application programs hide details of data types.
• Views can also hide information (e.g., salary) for security purposes.
View of Data
An architecture for a database system
Database Schema