SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
E-R MODEL
FEATURES OF E-R MODEL
• ER Model is a high-level conceptual data model.
• It allows us to describe the data involved in a real-world enterprise in term of objects
and their relationships.
• It is widely used to develop an initial design of a database.
• It provides a set of useful concepts that make it convenient for a developer to move
from a basic set of information to a detailed and precise description of information
that can be easily implemented in a database system.
• It describes data as a collection of entities , relationships and attributes.
Example -:
College is a database keeps track of Students ,faculty , departments and courses organized
by various departments. College contains various departments like Department of English,
Department of Hindi , Department of Computer Science etc. Each department assigned a
unique id and name. Some faculty members are also appointed to each department and one
of them works as head of the department.
1. Faculty information contains name , address , department , basic salary etc. A faculty
member is assigned to only one department but can teach various courses of other
department also.
2. Student information contain Roll no (unique) ,name , address etc. A student can opt only
one course.
3. Parent (guardian) information is also kept along with each student. We keep each
guardian’s name ,age ,sex and address.
• Entity-:
1. It is an object of concern used to represent the things in the real world, eg.
Car, table , book etc.
2. An entity need not be a physical entity, it can also represent a concept in
real world eg. Project , loan.
3. It represent a class of things , not any one instance, eg. Student entity has
instance of ‘Ramesh’ and ‘Mohan’.
• Strong Entity -: It contain primary key.
• Weak Entity-: It does not contain primary key.
• Entity set – A collection of a entities is called an entity set.
• Attributes: An attributes is a properly used to describe the specific features of the
entity. Eg: A Student entity may be described by the student’s name , age , address
and course etc.
Another Example
• Domains:
Each simple attributes of an entity type contains a possible set of values that can be attached to it.
This is called the domain of attributes. Ex-: for person entity person_id has a specific domain ,
integer values say from 1 to 100.
Types of Attributes
• Simple: The attribute that can not be further divided into smaller parts and represents the basic
meaning is called a simple attribute. For example : first name , last name , age.
• Composite: Attributes that can be further divided into smaller units and each individual unit
contain a specific meaning. For example : Name attributes of employee can be sub divided into
fname , lname and mname.
• Single Valued: Attributes having a single value for a particular entity. For example age is single
valued attribute of a student entity.
• Multivalued: Attributes that have more than one values for a particular entity is called
multivalued attribute. For multivalued attributes we must also specify the minimum and maximum
number of values that can be attached. For ex phone number for a person entity is a multivalued
attributes.
• Stored: Attributes that are directly stored in the database. For ex Birth date attributes of a person.
• Derived: Attributes that are not stored directly but can be derived from stored attributes are called
derived attributes. For example: The year of services of a person entity can be determined from the
current date and the date of joining of the person. Another example total salary of the person can
be calculated from the basic salary attributes of a person.
Relationships
• A connection or set of association.
• A rule for communication among entities.
Example : College is the database , the association between student and course entity, ie “Student opts
course” is an example of a relationship.
• Degree: The degree of a relationship type is the number of participating entity types.
• Binary Relationship: The relationship between two entities is called binary relationship.
• Ternary Relationship: A relationship among three entities is called ternary relationship.
• N-ry Relationship: Relationship among n entities.
RELATIONSHIP EXAMPLE
• Ternary and Binary Relationship
Relationship Cardinality:
Cardinality specifies the number of instances of an entity associated with another entity
participating in a relationship. there are following degree of cardinality:
• One to One: An entity in A is associated with at most one entity in B, and an entity B is
associated with at most one entity in A. ex: Relationship between college and principal.
• One to Many: An entity in A is associated with any number of entities in B. An entity B is
associated with at the most one entity in A. ex: department and faculty relationship.
• Many to One: An entity in A is associated with at most one entity in B. An entity in B is
associated with any number in A. ex: Relationship between course and instructor.
• Many to Many: Entities in A and B are associated with any number of entities from each
other ex: relationship between course and faculty, book writes author.
ONE TO ONE AND ONE TO MANY
MANY TO ONE AND MANY TO MANY
GENERALIZATION
Generalization is the process of extracting common properties from a set of entities and create a
generalized entity from it. It is a bottom-up approach in which two or more entities can be generalized to
a higher level entity if they have some attributes in common. For Example, STUDENT and FACULTY can be
generalized to a higher level entity called PERSON as shown in Figure 1. In this case, common attributes
like P_NAME, P_ADD become part of higher entity (PERSON) and specialized attributes like S_FEE become
part of specialized entity (STUDENT).
SPECIALIZATION
In specialization, an entity is divided into sub-entities based on their characteristics. It is a top-down
approach where higher level entity is specialized into two or more lower level entities. For Example,
EMPLOYEE entity in an Employee management system can be specialized into DEVELOPER, TESTER etc.
In this case, common attributes like E_NAME, E_SAL etc. become part of higher entity (EMPLOYEE) and
specialized attributes like TES_TYPE become part of specialized entity (TESTER).
AGGREGATION
An ER diagram is not capable of representing relationship between an entity and a relationship which
may be required in some scenarios. In those cases, a relationship with its corresponding entities is
aggregated into a higher level entity. For Example, Employee working for a project may require some
machinery. So, REQUIRE relationship is needed between relationship WORKS_FOR and entity
MACHINERY. Using aggregation, WORKS_FOR relationship with its entities EMPLOYEE and PROJECT is
aggregated into single entity and relationship REQUIRE is created between aggregated entity and
MACHINERY.
Inheritance
• We use all the above features of ER-Model in order to create classes of objects in object-
oriented programming. The details of entities are generally hidden from the user; this process
known as abstraction.
• Inheritance is an important feature of Generalization and Specialization. It allows lower-level
entities to inherit the attributes of higher-level entities.
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt? (7)

DBMS UNIT1
DBMS UNIT1DBMS UNIT1
DBMS UNIT1
 
B.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational Model
B.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational ModelB.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational Model
B.Sc. II (IV Sem) RDBMS & PL/SQL Unit-2 Relational Model
 
Data model
Data modelData model
Data model
 
Sameer
SameerSameer
Sameer
 
Db lec 02_new
Db lec 02_newDb lec 02_new
Db lec 02_new
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
Types of keys in database management system by Dr. Kamal Gulati
Types of keys in database management system by Dr. Kamal GulatiTypes of keys in database management system by Dr. Kamal Gulati
Types of keys in database management system by Dr. Kamal Gulati
 

Ähnlich wie Entity Relationship Model

Entity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptxEntity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptx
sukrithlal008
 

Ähnlich wie Entity Relationship Model (20)

E_R-Diagram (2).pptx
E_R-Diagram (2).pptxE_R-Diagram (2).pptx
E_R-Diagram (2).pptx
 
Unit iv dbms
Unit   iv dbmsUnit   iv dbms
Unit iv dbms
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
 
Entity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptxEntity Relationship Diagram – ER Diagram in DBMS.pptx
Entity Relationship Diagram – ER Diagram in DBMS.pptx
 
E r model
E r modelE r model
E r model
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptx
 
Data Models
Data ModelsData Models
Data Models
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
Database Design and Entity relationship Model.pptx
Database Design and Entity relationship Model.pptxDatabase Design and Entity relationship Model.pptx
Database Design and Entity relationship Model.pptx
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Data model and entity relationship
Data model and entity relationshipData model and entity relationship
Data model and entity relationship
 
ER diagram
ER diagramER diagram
ER diagram
 
ER Diagram- Cardinality.pptx
ER Diagram- Cardinality.pptxER Diagram- Cardinality.pptx
ER Diagram- Cardinality.pptx
 
database
databasedatabase
database
 
Entity relationship model
Entity relationship modelEntity relationship model
Entity relationship model
 
Database part3-
Database part3-Database part3-
Database part3-
 

Mehr von Bosco Technical Training Society, Don Bosco Technical School (Aff. GGSIP University, New Delhi)

Mehr von Bosco Technical Training Society, Don Bosco Technical School (Aff. GGSIP University, New Delhi) (20)

String Manipulation Function and Header File Functions
String Manipulation Function and Header File FunctionsString Manipulation Function and Header File Functions
String Manipulation Function and Header File Functions
 
C Structure and Union in C
C Structure and Union in CC Structure and Union in C
C Structure and Union in C
 
Preprocessor Directive in C
Preprocessor Directive in CPreprocessor Directive in C
Preprocessor Directive in C
 
File Handling in C Programming
File Handling in C ProgrammingFile Handling in C Programming
File Handling in C Programming
 
Bit field enum and command line arguments
Bit field enum and command line argumentsBit field enum and command line arguments
Bit field enum and command line arguments
 
Pointers in C and Dynamic Memory Allocation
Pointers in C and Dynamic Memory AllocationPointers in C and Dynamic Memory Allocation
Pointers in C and Dynamic Memory Allocation
 
Array in C
Array in CArray in C
Array in C
 
C storage class
C storage classC storage class
C storage class
 
Function in C Programming
Function in C ProgrammingFunction in C Programming
Function in C Programming
 
C Constructs (C Statements & Loop)
C Constructs (C Statements & Loop)C Constructs (C Statements & Loop)
C Constructs (C Statements & Loop)
 
C Operators
C OperatorsC Operators
C Operators
 
C programming Basics
C programming BasicsC programming Basics
C programming Basics
 
Software Development Skills and SDLC
Software Development Skills and SDLCSoftware Development Skills and SDLC
Software Development Skills and SDLC
 
Mobile commerce
Mobile commerceMobile commerce
Mobile commerce
 
E commerce application
E commerce applicationE commerce application
E commerce application
 
Data normalization
Data normalizationData normalization
Data normalization
 
Html Form Controls
Html Form ControlsHtml Form Controls
Html Form Controls
 
Security issue in e commerce
Security issue in e commerceSecurity issue in e commerce
Security issue in e commerce
 
ER to Relational Mapping
ER to Relational MappingER to Relational Mapping
ER to Relational Mapping
 
Database connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwariDatabase connectivity with data reader by varun tiwari
Database connectivity with data reader by varun tiwari
 

Kürzlich hochgeladen

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

Entity Relationship Model

  • 2. FEATURES OF E-R MODEL • ER Model is a high-level conceptual data model. • It allows us to describe the data involved in a real-world enterprise in term of objects and their relationships. • It is widely used to develop an initial design of a database. • It provides a set of useful concepts that make it convenient for a developer to move from a basic set of information to a detailed and precise description of information that can be easily implemented in a database system. • It describes data as a collection of entities , relationships and attributes.
  • 3. Example -: College is a database keeps track of Students ,faculty , departments and courses organized by various departments. College contains various departments like Department of English, Department of Hindi , Department of Computer Science etc. Each department assigned a unique id and name. Some faculty members are also appointed to each department and one of them works as head of the department. 1. Faculty information contains name , address , department , basic salary etc. A faculty member is assigned to only one department but can teach various courses of other department also. 2. Student information contain Roll no (unique) ,name , address etc. A student can opt only one course. 3. Parent (guardian) information is also kept along with each student. We keep each guardian’s name ,age ,sex and address.
  • 4. • Entity-: 1. It is an object of concern used to represent the things in the real world, eg. Car, table , book etc. 2. An entity need not be a physical entity, it can also represent a concept in real world eg. Project , loan. 3. It represent a class of things , not any one instance, eg. Student entity has instance of ‘Ramesh’ and ‘Mohan’. • Strong Entity -: It contain primary key. • Weak Entity-: It does not contain primary key. • Entity set – A collection of a entities is called an entity set. • Attributes: An attributes is a properly used to describe the specific features of the entity. Eg: A Student entity may be described by the student’s name , age , address and course etc.
  • 6. • Domains: Each simple attributes of an entity type contains a possible set of values that can be attached to it. This is called the domain of attributes. Ex-: for person entity person_id has a specific domain , integer values say from 1 to 100. Types of Attributes • Simple: The attribute that can not be further divided into smaller parts and represents the basic meaning is called a simple attribute. For example : first name , last name , age. • Composite: Attributes that can be further divided into smaller units and each individual unit contain a specific meaning. For example : Name attributes of employee can be sub divided into fname , lname and mname. • Single Valued: Attributes having a single value for a particular entity. For example age is single valued attribute of a student entity. • Multivalued: Attributes that have more than one values for a particular entity is called multivalued attribute. For multivalued attributes we must also specify the minimum and maximum number of values that can be attached. For ex phone number for a person entity is a multivalued attributes.
  • 7. • Stored: Attributes that are directly stored in the database. For ex Birth date attributes of a person. • Derived: Attributes that are not stored directly but can be derived from stored attributes are called derived attributes. For example: The year of services of a person entity can be determined from the current date and the date of joining of the person. Another example total salary of the person can be calculated from the basic salary attributes of a person. Relationships • A connection or set of association. • A rule for communication among entities. Example : College is the database , the association between student and course entity, ie “Student opts course” is an example of a relationship. • Degree: The degree of a relationship type is the number of participating entity types. • Binary Relationship: The relationship between two entities is called binary relationship. • Ternary Relationship: A relationship among three entities is called ternary relationship. • N-ry Relationship: Relationship among n entities.
  • 9. • Ternary and Binary Relationship
  • 10. Relationship Cardinality: Cardinality specifies the number of instances of an entity associated with another entity participating in a relationship. there are following degree of cardinality: • One to One: An entity in A is associated with at most one entity in B, and an entity B is associated with at most one entity in A. ex: Relationship between college and principal. • One to Many: An entity in A is associated with any number of entities in B. An entity B is associated with at the most one entity in A. ex: department and faculty relationship. • Many to One: An entity in A is associated with at most one entity in B. An entity in B is associated with any number in A. ex: Relationship between course and instructor. • Many to Many: Entities in A and B are associated with any number of entities from each other ex: relationship between course and faculty, book writes author.
  • 11. ONE TO ONE AND ONE TO MANY
  • 12. MANY TO ONE AND MANY TO MANY
  • 13.
  • 14.
  • 15.
  • 16.
  • 17. GENERALIZATION Generalization is the process of extracting common properties from a set of entities and create a generalized entity from it. It is a bottom-up approach in which two or more entities can be generalized to a higher level entity if they have some attributes in common. For Example, STUDENT and FACULTY can be generalized to a higher level entity called PERSON as shown in Figure 1. In this case, common attributes like P_NAME, P_ADD become part of higher entity (PERSON) and specialized attributes like S_FEE become part of specialized entity (STUDENT).
  • 18. SPECIALIZATION In specialization, an entity is divided into sub-entities based on their characteristics. It is a top-down approach where higher level entity is specialized into two or more lower level entities. For Example, EMPLOYEE entity in an Employee management system can be specialized into DEVELOPER, TESTER etc. In this case, common attributes like E_NAME, E_SAL etc. become part of higher entity (EMPLOYEE) and specialized attributes like TES_TYPE become part of specialized entity (TESTER).
  • 19. AGGREGATION An ER diagram is not capable of representing relationship between an entity and a relationship which may be required in some scenarios. In those cases, a relationship with its corresponding entities is aggregated into a higher level entity. For Example, Employee working for a project may require some machinery. So, REQUIRE relationship is needed between relationship WORKS_FOR and entity MACHINERY. Using aggregation, WORKS_FOR relationship with its entities EMPLOYEE and PROJECT is aggregated into single entity and relationship REQUIRE is created between aggregated entity and MACHINERY.
  • 20. Inheritance • We use all the above features of ER-Model in order to create classes of objects in object- oriented programming. The details of entities are generally hidden from the user; this process known as abstraction. • Inheritance is an important feature of Generalization and Specialization. It allows lower-level entities to inherit the attributes of higher-level entities.
  • 21.
  • 22.
  • 23.
  • 24.