UNIT : 1
OVERVIEW TO DATABASE
MANAGEMENT SYSTEM
SUBJECT : INTRODUCTION TO DBMS SUBJECT CODE: 05BC3204
❖ Introduction to Database Management systems,
❖ Database applications
❖ Purpose
❖ instance and schema
❖ Data Models
❖ Database System Architecture
Text
Image Words
Data
Sound Number
❖ Data is a collection of facts, such as text, numbers, words,
images , sounds measurements etc.
❖ Data is raw, unorganized facts that need to be processed.
❖ Example:
❖Marks of students
❖Name of employees
❖Building photos
❖ Processed data is called information.
❖ A process includes:
❖Calculations
❖Comparisons
❖Organization
❖Sorting
❖Summerization
❖Analysis
When data is processed, organized, structured or presented in a given context
so as to make it useful, it is called information.
❖ Database is an organized collection of
meaningful data that is designed for a
specific purpose.
❖ It’s a place where data is stored in such
a way that we can retrieve data in a
way that we want.
❖ Database stores each & every
information in an organized way such
as tables, views, reports etc.
❖ Database is collection of logically
related data.
Telephone Directory Dictionary Employee Records
Attendance Register
❖ Database is collection of logically related data.
❖ Example:
courses
teachers students
❖ DBMS stands for Database Management System.
❖ Its Collection of logically related data.
❖ Database is a collection of data and Management System is a
set of programs to store and retrieve those data.
❖ DBMS stores data in the form of fields & records.
❖ Fields
❖A field is a character or group of characters that have a specific
meaning.
❖A field /column is a single piece of information.
❖A field contain similar types of data.
❖E.g:
❖ Student Id, Forename Surname , Date Of Birth
❖ Records
❖Known as tuple /row / entity .
❖A record is a collection of logically related fields.
❖Data about data is called metadata That contain list of user along
with tables, fields & datatype.
Meta data
Student tables Fields
Roll_No Stud_Name Sem student 3
1 Ekta 1 course 3
2 Nihar 2
Column_name Data_type Belongs to
3 Mansi 3
Course Roll_No Number Student
Stud_Name Varchar Student
Sub_Code Sub_Name C_C
Sem Number Student
CS01 Oracle 10
Sub_code Character Course
CS02 Python 10
Sub_name Varchar Course
CS03 Java 10 C_C Number Course
CS04 Asp .Net 10
❖ You can use database for:
❖Store & maintaining the information
❖Taking meaningful decisions
❖Reorganized information
❖Retrieve the information
❖Processing or manipulating the information
❖ DBASE ❖ SQL server
❖ ORACLE ❖ MySQL
❖ SYBASE ❖ FOXPRO
❖ INGRESS ❖ FOXBASE
E-COMMERCE EDUCTIONAL INSTITUTE SOCIAL MEDIA
LIBRARY MANAGEMENT BANKING ACCOUNTING
HR MANAGEMENT MANUFECTURING AIRLINES & RAILWAYS
SALES & FINANCE TELECOMMUNICATION
Field Applications
Ecommerce Inventory Information, Purchases, Invoices, Etc.
Education Soudent Information, Courses, Grades, Etc.
Social Media User Data, Preferences, Etc.
Library Book Information, Issue Date, Etc.
Banking Client Information, Accourt, Activités, Loans, Etc.
Accounts Account Information, Transactions, Etc.
HR Management Employee Information, Salary, Paychecks, Etc.
Manufacturing Supplier Information, Bills, Inventory, Etc.
Airline & Railways Flight Information, Reservation Information, Tickets, Schedules,
Etc.
Sales & Finance Store Product Information, Purchases Of Stocks And Bonds ,
Sales , Customer And Transaction Details Etc
Telecommunications Communication Network, Telephone Numbers, Record Of Calls,
For Generating Monthly Bills, Etc.
❖ Data Sharing
❖ Reduce Data Redundancy
❖ Remove Data Inconsistency
❖ Data Validation
❖ Data Security
❖ Backup And Recovery
❖ Faster Data Access
Data Sharing is possible between multiple users.
Computer Civil
Emp_Name Address Mob Subject Emp_Name Address Mob Subject
Prof. Ajay Shah Rajkot 1234 CPU Prof. Ajay Shah Rajkot 1234 CPU
Database management
system can remove such Same data is stored at
data redundancy by four different places.
storing data centrally.
Emp_Name Address Mob Subject Emp_Name Address Mob Subject
Prof. Ajay Shah Rajkot 1234 CPU Prof. Ajay Shah Rajkot 1234 CPU
Electrical Mechanical
Computer Civil
Emp_Name Address Mob Subject Emp_Name Address Mob Subject
Prof. Ajay Rajkot 123 CPU Prof. Ajay Shah Rajkot 1234 CPU
6789
Shah 4
Same data having
Database management different state (values)
system can keep data
in consistent state.
Mobile no is changed
Emp_Name Address Mob Subject Emp_Name Address Mob Subject
Prof. Ajay Shah Rajkot 1234
6789 CPU Prof. Ajay Shah Rajkot 1234 CPU
Electrical Mechanical
Roll_No Stud_Name Sem Elective_sub Percentage
1 Ekta 1 Cyber security 80.25
2.5 Nihar 2 75
3 Mansi 30 Cloud computing 65
Elective subject
Roll number must not be
should not be blanked
Semester must
fractional
be between 1 to
6
Emp_Name Address Mob Subject Wants to
access Faculty of
Prof. Ajay Shah Rajkot 1234 CPU
other
college
Emp_Name Salary Load
Prof. Ajay 50000 20
Shah
Wants to
access
Emp_Name Teaching Knowledge Rating
MU
Prof. Ajay Shah Good V. Good 9 Faculty
DBMS prevents unauthorized user to access data.
DBMS allows user to access data all or any piece
of data from database.
❖ Either transaction execute 0% or 100%.
Sum of both account
before transfer is
3000
Person A Person B
Account A Account B
Bal : 2000 Bal : 1000
Transfer 500
Step 1 : Debit 500 from Account A
Step 2 : Credit 500 into Account B
Transaction Sum of both
is failed Sum of both account account is 2500
after transfer is 3000 so inconsistent
❖ The overall design or descriptions of a database is called
schema.
❖ Schemas are changed rarely
❖ The collection of information stored in the database at
particular moment is called instance.
❖ Instances are changed frequently.
Empty State
Std ID Name City
Std ID Name City
Initial state
100 Lucky Hyderabad
( 1st data is loaded)
101 Pinky Delhi
Std ID Name City
100 Lucky Hyderabad Current state
101 Pinky Delhi (present operation
is applied)
102 Bob Hyderabad
Emp_Name Salary Schema
Char(10) Int
Prof. Ajay 15000
Shah Instance
Prof. Om Patel 10000
❖ ANSI SPARC - American National Standards Institute,
Standards Planning And Requirements Committee
❖ Data Abstraction is a process of hiding unwanted or irrelevant
details from the end user.
❖ 3 levels of data abstraction:
❖View level
❖Conceptual level
❖Physical level
❖ Its called user view.
❖ Its an end or highest level from where users can interact with
the database using applications.
❖ Specify how data are viewed by each users.
❖ Each user can show a different view for specific data
❖ It a middle level called logical level.
❖ It describes each entity with their relationship.
❖ It specify table or entity along with its attributes & logical
relations between entities.
❖ At this level data is represented in the form of table –
conceptual level.
❖ We can see and work with data at this level
❖ It’s a lowest level that describes how a data is stored
on the storage device.
❖ Very less data kept in this level.
❖ At this level we can know where the data is stored in
file, size of the file , memory as well as location of the
file.
❖ DBA works at this level.
❖ Data independence is ability to modify a schema definition in one
level without affecting a schema definition in the next higher level.
Data
Independence
Physical Data Logical Data
Independence Independence
❖ It is mainly concerned with the storage of the data.
❖ Physical data independence helps you to separate conceptual
levels from the internal/physical levels.
❖ Logical Data Independence is mainly concerned with the
structure or changing the data definition.
❖ Logical data is data about database, that is, it stores
information about how data is managed inside.
❖ For example, a table (relation) stored in the database and all
its constraints, applied on that relation.
❖ Logical data independence is a kind of mechanism, which
liberalizes itself from actual data stored on the disk.
❖ If we do some changes on table format, it should not change
the data residing on the disk.
❖ For example:
❖A table/relation is a logical data collection in the traditional
sense.
❖A constraint can exist in a table.
❖Any modifications we make to the table (such as a
constraint) there will be no effect on the data saved to disk.
❖ A Data Model Decides The
Method Of Storing Data In
Database.
❖ When The Data Is Stored In The
Database It Needs To Be Stored
In A Particular Format.
❖ So Data Model Decide The
Structure To Store Data
Decide required layouts Required attributes
Architect will design house Database designer design
Contractor implement DBA implement design
design using DBMS software
Hierarchical Model
Network Model
Relational Model
Entity-Relationship Model
❖ It was developed by IBM, in the 1960s.
❖ Used tree structure to represent data.
❖ The hierarchy starts from the Root data, and expands like a
tree, adding child nodes to the parent nodes.
❖ A parent node contain one or more child node.
❖ Data are viewed as a collection of tables.
❖ Support one to one or one to many relationship.
❖ Upside down approach.
Root
Child
Parent node
Child
❖ Simple & Easy to understand
❖ Data security
❖ Maintain data integrity
❖ Up to down traversal approach
❖ Complex model
❖ One parent per child is allowed in hierarchical model.
❖ Does not support Many too many relationships.
❖ This is an extension of the Hierarchical model.
❖ In this model data is organized more like a graph.
❖ It allowed to have more than one parent node.
❖ It is designed to represent objects and their
relationships flexibly.
❖ Each set contains one owner or parent record as well
as one or more child or member records.
❖ Conceptually simple and easy to design.
❖ Data security
❖ Maintain data integrity
❖ Support many too many relationships.
❖ Data access is easier and flexible
❖ System complexity
❖ Lack of structural independence
❖ Top to bottom traverse approach
❖ Time consuming
❖ Itis based on real-world entities & their relationships.
❖ Used to design a conceptual view of database.
❖ In terms of DBMS, an entity is a table or attribute of a
table in database.
❖ By showing relationship among tables and their
attributes, ER diagram shows the complete logical
structure of a database.
Student
Roll_No Stud_Name Sem
1 Ekta 1
2 Nihar 2
3 Mansi 3
Course
Sub_Code Sub_Name Course duration
CS01 Oracle 3 months
CS02 Python 6 months
CS03 Java 3 months
CS04 Asp .Net 3 months
Stud_
Roll_No Name Sub_Code
Student Study Course
Sub_ Course_
Name duration
Sem
❖ Easy to understand
❖ Simple
❖ More specific to relational database modelling
❖ Good DBMS support
❖ Visual representation
❖Limited expressiveness
❖Can be ambiguous
❖Mostly for relational database only
❖Limited constraint representation
❖No data manipulation language
❖ This data model is introduced by C.F.Codd in 1970.
❖ Currently, it is considered as the most widely used
data model.
❖ It represents the database as a collection of relations.
❖ A relation is nothing but a table of values.
❖ Every row in the table represents a collection of
related data values.
❖ The table name and column names are helpful to
interpret the meaning of values in each row.
❖ The data are represented as a set of relations.
❖Structural independence
❖Conceptual simplicity
❖Design , implementation , maintenance and usage ease
❖Query capability
❖Limits redundancy
❖Flexible
❖Offers better data integrity
❖Performance Issue
❖Complex to understand when there is more number of
tables.
❖ A Data Model Decides The
Method Of Storing Data In
Database.
❖ Defines the logical structure of
a database.
❖ When The Data Is Stored In The
Database It Needs To Be Stored
In A Particular Format.
❖ So Data Model Decide The
Structure To Store Data
Decide required layouts Required attributes
Architect will design house Database designer design
Contractor implement DBA implement design
design using DBMS software
Hierarchical Model
Network Model
Relational Model
Entity-Relationship Model
❖ Itwas developed by IBM, in the 1960s.
❖ Used tree structure to represent data.
❖ The hierarchy starts from the Root data,
and expands like a tree, adding child
nodes to the parent nodes.
❖ A parent node contain one or more child
node.
❖ Data are viewed as a collection of tables.
❖ Support one to one or one to many
relationship.
❖ Upside down approach.
Root
❖ Simple & Easy to understand
❖ Data security
❖ Maintain data integrity
❖ Topto down traversal approach
❖ Complex model
❖ One parent per child is allowed in hierarchical model.
❖ Does not support Many too many relationships.
❖ This is an extension of the Hierarchical
model.
❖ In this model data is organized more like
a graph.
❖ It allowed to have more than one parent
node.
❖ It is designed to represent objects and
their relationships flexibly.
❖ Each set contains one owner or parent
record as well as one or more child or
member records.
❖ Conceptually simple and easy to design.
❖ Data security
❖ Maintain data integrity
❖ Support many too many relationships.
❖ Data access is easier and flexible
❖ Reduce data redundancy
❖ System complexity
❖ Lack of structural independence
❖ Itis based on real-world entities & their
relationships.
❖ Used to design a conceptual view of
database.
❖ In terms of DBMS, an entity is a table or
attribute of a table in database.
❖ By showing relationship among tables and
their attributes, ER diagram shows the
complete logical structure of a database.
❖ relationships are created by dividing object
of interest into entity and its characteristics
into attributes.
Student
Roll_No Stud_Name Sem
1 Ekta 1
2 Nihar 2
3 Mansi 3
Course
Sub_Code Sub_Name Course duration
CS01 Oracle 3 months
CS02 Python 6 months
CS03 Java 3 months
CS04 Asp .Net 3 months
Stud_
Roll_No Name Sub_Code
Student Study Course
Sub_ Course_
Name duration
Sem
❖ Easy to understand
❖ Simple
❖ More specific to relational database modelling
❖ Good DBMS support
❖ Visual representation
❖Limited expressiveness
❖Can be ambiguous
❖Mostly for relational database only
❖Limited constraint representation
❖No data manipulation language
❖ This data model is introduced by C.F.Codd in
1970.
❖ Currently, it is considered as the most
widely used data model.
❖ It represents the database as a collection of
relations.
❖ A relation is nothing but a table of values.
❖ Every row in the table represents a
collection of related data values.
❖ The table name and column names are
helpful to interpret the meaning of values in
each row.
❖ The data are represented as a set of
relations.
❖Structural independence
❖Conceptual simplicity
❖Design , implementation , maintenance and usage ease
❖Query capability
❖Limits redundancy
❖Flexible
❖Offers better data integrity
❖Performance Issue
❖Complex to understand when there is more number of
tables.