SlideShare a Scribd company logo
Database Models
Introduction
Data Model
• Data Model is the modeling of the data
description, data semantics, and consistency
constraints of the data.
• It provides the conceptual tools for describing
the design of a database at each level of data
abstraction.
• Therefore, there are following four data models
used for understanding the structure of the
database:
Relational Database management Models-MCA.pptx
• 1) Relational Data Model: This type of model designs
the data in the form of rows and columns within a table.
• Thus, a relational model uses tables for representing
data and in-between relationships. Tables are also called
relations.
• This model was initially described by Edgar F. Codd, in
1969.
• The relational data model is the widely used model
which is primarily used by commercial data processing
applications.
Relational Database management Models-MCA.pptx
• 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'.
Relational Database management Models-MCA.pptx
• 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.
• 4) Semistructured Data Model: This type of data model
is different from the other three data models
(explained above).
• The semistructured 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 semistructured
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.
Relational Database management Models-MCA.pptx
• 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.
• For example, the given figure neither show the
data type of each data item nor the
relationship among various files.
• 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.
• 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.
• Data Independence
• Data independence can be explained using the
three-schema architecture.
• 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:
• 1. Logical Data Independence
• Logical data independence refers characteristic of being able
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.
• If we do any changes in the conceptual view of the data,
then the user view of the data would not be affected.
• Logical data independence occurs at the user interface level.
• Physical Data Independence
• Physical data independence can be defined as the
capacity to change the internal schema without
having to change the conceptual schema.
• If we do any changes in the storage size of the
database system server, then the Conceptual
structure of the database will not be affected.
• Physical data independence is used to separate
conceptual levels from the internal levels.
• Physical data independence occurs at the logical
interface level.
Relational Database management Models-MCA.pptx
• Database Language
• A DBMS has appropriate languages and
interfaces to express database queries and
updates.
• Database languages can be used to read, store
and update the data in the database.
Relational Database management Models-MCA.pptx
• Data Definition Language
• DDL stands for Data Definition Language. It is used to
define database structure or pattern.
• It is used to create schema, tables, indexes, constraints,
etc. in the database.
• Using the DDL statements, you can create the skeleton of
the database.
• Data definition language is used to store the information of
metadata like the number of tables and schemas, their
names, indexes, columns in each table, constraints, etc.
• Here are some tasks that come under DDL:
• Create: It is used to create objects in the database.
• Alter: It is used to alter the structure of the database.
• Drop: It is used to delete objects from the database.
• Truncate: It is used to remove all records from a table.
• Rename: It is used to rename an object.
• Comment: It is used to comment on the data dictionary.
• Data Manipulation Language
• DML stands for Data Manipulation Language.
It is used for accessing and manipulating data
in a database. It handles user requests.
• Here are some tasks that come under DML:
• Select: It is used to retrieve data from a database.
• Insert: It is used to insert data into a table.
• Update: It is used to update existing data within a table.
• Delete: It is used to delete all records from a table.
• Merge: It performs UPSERT operation, i.e., insert or
update operations.
• Call: It is used to call a structured query language or a Java
subprogram.
• Explain Plan: It has the parameter of explaining data.
• Lock Table: It controls concurrency.
• Data Control Language
• DCL stands for Data Control Language. It is
used to retrieve the stored or saved data.
• The DCL execution is transactional. It also has
rollback parameters.
• (But in Oracle database, the execution of data
control language does not have the feature of
rolling back.)
• Here are some tasks that come under DCL:
• Grant: It is used to give user access privileges to a
database.
• Revoke: It is used to take back permissions from
the user.
• There are the following operations which have
the authorization of Revoke:
• CONNECT, INSERT, USAGE, EXECUTE, DELETE,
UPDATE and SELECT.
• Transaction Control Language
• TCL is used to run the changes made by the DML
statement. TCL can be grouped into a logical transaction.
• Here are some tasks that come under TCL:
• Commit: It is used to save the transaction on the
database.
• Rollback: It is used to restore the database to original
since the last Commit.
UNIT-II
ER-DIAGRAM
ER-DIAGRAM
•
ER model
• ER model stands for an Entity-Relationship model. It is a
high-level data model. This model is used to define the
data elements and relationship for a specified system.
• It develops a conceptual design for the database. It also
develops a very simple and easy to design view of data.
• In ER modeling, the database structure is portrayed as a
diagram called an entity-relationship diagram.
• For example,
• Suppose we design a school database.
• In this database, the student will be an entity
with attributes like address, name, id, age, etc.
• The address can be another entity with
attributes like city, street name, pin code, etc
and there will be a relationship between
them.
Relational Database management Models-MCA.pptx
Relational Database management Models-MCA.pptx
Relational Database management Models-MCA.pptx
Relational Database management Models-MCA.pptx
• 1. Entity:
• An entity may be any object, class, person or
place. In the ER diagram, an entity can be
represented as rectangles.
• Consider an organization as an example-
manager, product, employee, department etc.
can be taken as an entity.
Relational Database management Models-MCA.pptx
Relational Database management Models-MCA.pptx
Relational Database management Models-MCA.pptx
• An entity that depends on another entity
called a weak entity.
• The weak entity doesn't contain any key
attribute of its own.
• The weak entity is represented by a double
rectangle.
Relational Database management Models-MCA.pptx
• 2. Attribute
• The attribute is used to describe the property
of an entity. Eclipse is used to represent an
attribute.
• For example, id, age, contact number, name,
etc. can be attributes of a student.
Relational Database management Models-MCA.pptx
• a. Key Attribute
• The key attribute is used to represent the
main characteristics of an entity.
• It represents a primary key.
• The key attribute is represented by an ellipse
with the text underlined.
Relational Database management Models-MCA.pptx
• . Composite Attribute
• An attribute that composed of many other
attributes is known as a composite attribute.
• The composite attribute is represented by an
ellipse, and those ellipses are connected with
an ellipse.
Relational Database management Models-MCA.pptx
• An attribute can have more than one value.
These attributes are known as a multivalued
attribute. The double oval is used to represent
multivalued attribute.
• For example, a student can have more than
one phone number.
Relational Database management Models-MCA.pptx
• d. Derived Attribute
• An attribute that can be derived from other
attribute is known as a derived attribute. It can
be represented by a dashed ellipse.
• For example, A person's age changes over
time and can be derived from another
attribute like Date of birth.
• 3. Relationship
• A relationship is used to describe the relation
between entities. Diamond or rhombus is
used to represent the relationship.
Relational Database management Models-MCA.pptx
• b. One-to-many relationship
• When only one instance of the entity on the
left, and more than one instance of an entity on
the right associates with the relationship then
this is known as a one-to-many relationship.
• For example, Scientist can invent many
inventions, but the invention is done by the
only specific scientist.

More Related Content

PPTX
DatabaseManagementSystem.pptx
uwmctesting
 
PPT
introduction-to-dbms-unit-1.ppt
rekhasai2468
 
PPTX
Module 1 - Chapter 2.pptx
SoniaDevi15
 
PPT
Ch1_Intro-95(1).ppt
RAJULKUMARSUTHAR
 
PPTX
Database Introduction to Data Models.pptx
ssuser19199c
 
PPTX
Basic Concept of Database
Marlon Jamera
 
PPTX
Utsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra
 
PPTX
Unit 2_DBMS_10.2.22.pptx
MaryJoseph79
 
DatabaseManagementSystem.pptx
uwmctesting
 
introduction-to-dbms-unit-1.ppt
rekhasai2468
 
Module 1 - Chapter 2.pptx
SoniaDevi15
 
Ch1_Intro-95(1).ppt
RAJULKUMARSUTHAR
 
Database Introduction to Data Models.pptx
ssuser19199c
 
Basic Concept of Database
Marlon Jamera
 
Utsav Mahendra : Introduction to Database and managemnet
Utsav Mahendra
 
Unit 2_DBMS_10.2.22.pptx
MaryJoseph79
 

Similar to Relational Database management Models-MCA.pptx (20)

PPTX
RDBMS stands for Relational Database Management System
AnilNaik42
 
PPTX
DATABASE MANAGEMENT SYSTEMS PPT .pptx
YogeshGarg228050
 
PPTX
DBMS-Unit-1.pptx
Bhavya304221
 
PPTX
DATABASE MANAGEMENT SYSTEMS CS 3492.pptx
venigkrish89
 
PPTX
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
dagadsai0330
 
PPTX
Unit 2 DATABASE ESSENTIALS.pptx
Nirmalavenkatachalam
 
PPTX
DATA MODEL Power point presentation for dbms
AshokRachapalli1
 
PPTX
Database Management System
NILESH UCHCHASARE
 
PPTX
Unit 1 dbms
Sweta Singh
 
PDF
dbms Unit 1.pdf arey bhai teri maa chodunga
VaradKadtan1
 
PDF
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
RiturajDas28
 
PPTX
Database management systems for students
DharaniMani4
 
PPTX
DBMS
addisonabner
 
PPTX
IET MySQL PPT Ver9ZESXRDCTFYVGBUHNIJOMK.pptx
chinmaygulhane747
 
PPTX
data base management sysytem a new apprach .pptx
urvashipundir04
 
PPTX
Introduction to Database Management Systems (DBMS)
Vijayananda Ratnam Ch
 
PDF
Database system
Hitesh Mohapatra
 
PDF
Relational data base management system (Unit 1)
Ismail Mukiibi
 
PPTX
DATA MODELS.pptx
Nithyasri Arumugam
 
PPTX
Database management system.pptx
AshmitKashyap1
 
RDBMS stands for Relational Database Management System
AnilNaik42
 
DATABASE MANAGEMENT SYSTEMS PPT .pptx
YogeshGarg228050
 
DBMS-Unit-1.pptx
Bhavya304221
 
DATABASE MANAGEMENT SYSTEMS CS 3492.pptx
venigkrish89
 
Unit-1 DBMS24.pptxruzruxtidtixift8ffticiycyoc
dagadsai0330
 
Unit 2 DATABASE ESSENTIALS.pptx
Nirmalavenkatachalam
 
DATA MODEL Power point presentation for dbms
AshokRachapalli1
 
Database Management System
NILESH UCHCHASARE
 
Unit 1 dbms
Sweta Singh
 
dbms Unit 1.pdf arey bhai teri maa chodunga
VaradKadtan1
 
SQL Tutorial - Basics of Structured Query Language Day 1.pdf
RiturajDas28
 
Database management systems for students
DharaniMani4
 
IET MySQL PPT Ver9ZESXRDCTFYVGBUHNIJOMK.pptx
chinmaygulhane747
 
data base management sysytem a new apprach .pptx
urvashipundir04
 
Introduction to Database Management Systems (DBMS)
Vijayananda Ratnam Ch
 
Database system
Hitesh Mohapatra
 
Relational data base management system (Unit 1)
Ismail Mukiibi
 
DATA MODELS.pptx
Nithyasri Arumugam
 
Database management system.pptx
AshmitKashyap1
 
Ad

Recently uploaded (20)

PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
DOCX
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
PPTX
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Action Plan_ARAL PROGRAM_ STAND ALONE SHS.docx
Levenmartlacuna1
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
Artificial Intelligence in Gastroentrology: Advancements and Future Presprec...
AyanHossain
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
Ad

Relational Database management Models-MCA.pptx

  • 2. Data Model • Data Model is the modeling of the data description, data semantics, and consistency constraints of the data. • It provides the conceptual tools for describing the design of a database at each level of data abstraction. • Therefore, there are following four data models used for understanding the structure of the database:
  • 4. • 1) Relational Data Model: This type of model designs the data in the form of rows and columns within a table. • Thus, a relational model uses tables for representing data and in-between relationships. Tables are also called relations. • This model was initially described by Edgar F. Codd, in 1969. • The relational data model is the widely used model which is primarily used by commercial data processing applications.
  • 6. • 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'.
  • 8. • 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.
  • 9. • 4) Semistructured Data Model: This type of data model is different from the other three data models (explained above). • The semistructured 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 semistructured 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.
  • 10. 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.
  • 12. • 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. • For example, the given figure neither show the data type of each data item nor the relationship among various files.
  • 13. • 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.
  • 14. • 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.
  • 15. • Data Independence • Data independence can be explained using the three-schema architecture. • 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.
  • 16. • There are two types of data independence: • 1. Logical Data Independence • Logical data independence refers characteristic of being able 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. • If we do any changes in the conceptual view of the data, then the user view of the data would not be affected. • Logical data independence occurs at the user interface level.
  • 17. • Physical Data Independence • Physical data independence can be defined as the capacity to change the internal schema without having to change the conceptual schema. • If we do any changes in the storage size of the database system server, then the Conceptual structure of the database will not be affected. • Physical data independence is used to separate conceptual levels from the internal levels. • Physical data independence occurs at the logical interface level.
  • 19. • Database Language • A DBMS has appropriate languages and interfaces to express database queries and updates. • Database languages can be used to read, store and update the data in the database.
  • 21. • Data Definition Language • DDL stands for Data Definition Language. It is used to define database structure or pattern. • It is used to create schema, tables, indexes, constraints, etc. in the database. • Using the DDL statements, you can create the skeleton of the database. • Data definition language is used to store the information of metadata like the number of tables and schemas, their names, indexes, columns in each table, constraints, etc.
  • 22. • Here are some tasks that come under DDL: • Create: It is used to create objects in the database. • Alter: It is used to alter the structure of the database. • Drop: It is used to delete objects from the database. • Truncate: It is used to remove all records from a table. • Rename: It is used to rename an object. • Comment: It is used to comment on the data dictionary.
  • 23. • Data Manipulation Language • DML stands for Data Manipulation Language. It is used for accessing and manipulating data in a database. It handles user requests. • Here are some tasks that come under DML:
  • 24. • Select: It is used to retrieve data from a database. • Insert: It is used to insert data into a table. • Update: It is used to update existing data within a table. • Delete: It is used to delete all records from a table. • Merge: It performs UPSERT operation, i.e., insert or update operations. • Call: It is used to call a structured query language or a Java subprogram. • Explain Plan: It has the parameter of explaining data. • Lock Table: It controls concurrency.
  • 25. • Data Control Language • DCL stands for Data Control Language. It is used to retrieve the stored or saved data. • The DCL execution is transactional. It also has rollback parameters. • (But in Oracle database, the execution of data control language does not have the feature of rolling back.)
  • 26. • Here are some tasks that come under DCL: • Grant: It is used to give user access privileges to a database. • Revoke: It is used to take back permissions from the user. • There are the following operations which have the authorization of Revoke: • CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.
  • 27. • Transaction Control Language • TCL is used to run the changes made by the DML statement. TCL can be grouped into a logical transaction. • Here are some tasks that come under TCL: • Commit: It is used to save the transaction on the database. • Rollback: It is used to restore the database to original since the last Commit.
  • 29. ER-DIAGRAM • ER model • ER model stands for an Entity-Relationship model. It is a high-level data model. This model is used to define the data elements and relationship for a specified system. • It develops a conceptual design for the database. It also develops a very simple and easy to design view of data. • In ER modeling, the database structure is portrayed as a diagram called an entity-relationship diagram.
  • 30. • For example, • Suppose we design a school database. • In this database, the student will be an entity with attributes like address, name, id, age, etc. • The address can be another entity with attributes like city, street name, pin code, etc and there will be a relationship between them.
  • 35. • 1. Entity: • An entity may be any object, class, person or place. In the ER diagram, an entity can be represented as rectangles. • Consider an organization as an example- manager, product, employee, department etc. can be taken as an entity.
  • 39. • An entity that depends on another entity called a weak entity. • The weak entity doesn't contain any key attribute of its own. • The weak entity is represented by a double rectangle.
  • 41. • 2. Attribute • The attribute is used to describe the property of an entity. Eclipse is used to represent an attribute. • For example, id, age, contact number, name, etc. can be attributes of a student.
  • 43. • a. Key Attribute • The key attribute is used to represent the main characteristics of an entity. • It represents a primary key. • The key attribute is represented by an ellipse with the text underlined.
  • 45. • . Composite Attribute • An attribute that composed of many other attributes is known as a composite attribute. • The composite attribute is represented by an ellipse, and those ellipses are connected with an ellipse.
  • 47. • An attribute can have more than one value. These attributes are known as a multivalued attribute. The double oval is used to represent multivalued attribute. • For example, a student can have more than one phone number.
  • 49. • d. Derived Attribute • An attribute that can be derived from other attribute is known as a derived attribute. It can be represented by a dashed ellipse. • For example, A person's age changes over time and can be derived from another attribute like Date of birth.
  • 50. • 3. Relationship • A relationship is used to describe the relation between entities. Diamond or rhombus is used to represent the relationship.
  • 52. • b. One-to-many relationship • When only one instance of the entity on the left, and more than one instance of an entity on the right associates with the relationship then this is known as a one-to-many relationship. • For example, Scientist can invent many inventions, but the invention is done by the only specific scientist.