SlideShare a Scribd company logo
1 of 38
ENTITY-RELATIONSHIP MODEL
E- R DATA MODELING 
 An entity is an object that exists and is distinguishable from other 
objects. 
 Example: specific person, company, event, plant 
 Entities have attributes 
 Example: people have names and addresses 
 
 An entity set is a set of entities of the same type that share the same 
properties. 
 Example: set of all persons, companies, trees, holidays
ATTRIBUTES 
 An entity is represented by a set of attributes, that is descriptive properties 
possessed by all members of an entity set. 
 Example: 
instructor = (ID, name, street, city, salary ) 
course= (course_id, title, credits) 
 Domain – the set of permitted values for each attribute 
 Attribute types: 
 Simple and composite attributes. 
 Single-valued and multivalued attributes 
 Derived attributes
TYPES OF ATTRIBUTES 
Simple Attribute: Attribute that consist of a single atomic value. 
Example: Salary 
Composite Attribute : Attribute value not atomic. 
Example : Address : ‘House _no:City:State 
Name : ‘First Name: Middle Name: Last Name’
TYPES OF ATTRIBUTES 
Single Valued Attribute: Attribute that hold a single value 
Exampe1: City 
Example2:Customer id 
Multi Valued Attribute: Attribute that hold multiple values. 
Example1: A customer can have multiple phone numbers, email id's etc 
Example2: A person may have several college degrees 
Derived Attribute: An attribute that’s value is derived from a stored attribute. 
Example : age, and it’s value is derived from the stored attribute Date of Birth.
ENTITY SETS INSTRUCTOR AND STUDENT 
instructor_ID instructor_name student-ID student_name
RELATIONSHIP SETS 
 A relationship is an association among several entities 
Example: 
44553 (Peltier) advisor 22222 (Einstein) 
student entity relationship set instructor entity
8 
ENTITY-RELATIONSHIP DIAGRAMS 
 Representing entities 
 we represent an entity by a named rectangle 
 use a singular noun, or adjective + noun 
 refer to one instance in naming 
PART-TIME 
EMPLOYEE 
CUSTOMER
ENTITY-RELATIONSHIP DIAGRAMS 
 Representing relationship 
DEPT employs EMPLOYEE
ENTITY-RELATIONSHIP DIAGRAMS 
Types of Relationships 
 Three types of relationships can exist between entities 
 One-to-one relationship (1:1): One instance in an entity 
(parent) refers to one and only one instance in the 
related entity (child). 
 One-to-many relationship (1:M): One instance in an 
entity (parent) refers to one or more instances in the 
related entity (child)
ENTITY-RELATIONSHIP DIAGRAMS 
One to one One to many
ENTITY-RELATIONSHIP DIAGRAMS 
 Types of Relationships 
 Many-to-many relationship (M:N): exists when one instance of 
the first entity (parent) can relate to many instances of the 
second entity (child), and one instance of the second entity can 
relate to many instances of the first entity. 
Many to many
CARDINALITY CONSTRAINTS 
 We express cardinality constraints by drawing either a directed line 
(), signifying “one,” or an undirected line (—), signifying “many,” 
between the relationship set and the entity set. 
 Or, by numbering each entity. * or, m for many. 
 One-to-one relationship: 
 A student is associated with at most one instructor via the 
relationship advisor 
 A student is associated with at most one department via 
stud_dept 
1 1
ONE-TO-MANY RELATIONSHIP 
 one-to-many relationship between an instructor and a student 
 an instructor is associated with several (including 0) students via 
advisor 
 a student is associated with at most one instructor via advisor, 
1 *
MANY-TO-MANY RELATIONSHIP 
 An instructor is associated with several (possibly 0) students via 
advisor 
 A student is associated with several (possibly 0) instructors via 
advisor 
* *
16 
ENTITY-RELATIONSHIP DIAGRAMS 
 Crow’s foot notation: A type of cardinality notation. It is 
called crow's foot notation because of the shapes, which 
include circles, bars, and symbols, that indicate various 
possibilities. 
 A single bar indicates one, a double bar indicates one 
and only one, a circle indicates zero, and a crow's foot 
indicates many.
17 
ENTITY-RELATIONSHIP DIAGRAMS 
Crow's foot notation is a common method of indicating cardinality. The four examples 
show how you can use various symbols to describe the relationships between entities.
DIFFERENT TYPES OF KEYS 
 A candidate key of an entity set is a minimal super key 
 ID is candidate key of instructor 
 course_id is candidate key of course
PRIMARY KEY 
 A primary key is a candidate key that is most appropriate to be the 
main reference key for the table. As its name suggests, it is the primary 
key of reference for the table and is used throughout the database to 
help establish relationships with other tables. 
 The primary key must contain unique values, must never be null 
and uniquely identify each record in the table
FOREIGN KEY 
 A foreign key is generally a primary key from one table that appears as a 
field in another where the first table has a relationship to the second. In 
other words, if we had a table A with a primary key X that linked to a table B 
where X was a field in B, then X would be a foreign key in B
DIFFERENT TYPES OF KEYS 
A super key of an entity set is a set of one or more attributes whose 
values uniquely determine each entity. 
Example: 
 {Student ID,FirstName } 
 {Student ID, LastName } 
 {Student ID,FirstName,LastName}
E-R DIAGRAMS 
 Rectangles represent entity sets. 
 Diamonds represent relationship sets. 
 Attributes listed inside entity rectangle. Or , as oval shape along with the 
rectangle. 
 Underline indicates primary key attributes
SUMMARY OF SYMBOLS USED IN E-R NOTATION
TOTAL PARTICIPATION OF ENTITY SET 
 E.g., A Class entity cannot exist unless related to a Faculty member 
entity
WEAK ENTITY SETS 
An entity set that does not have a primary key is referred to as a weak entity set 
 We underline the discriminator of a weak entity set with a dashed 
line. 
 We put the identifying relationship of a weak entity in a double 
diamond. 
 Primary key for section – (course_id, sec_id, semester, year)
SUMMARY OF SYMBOLS USED IN E-R NOTATION 
Crows feet notation
SUMMARY OF SYMBOLS USED IN E-R NOTATION 
 Representing attributes 
 Rectangle -- Entity 
 Ellipses -- Attribute (underlined attributes are [part of] the primary key) 
 Double ellipses -- multi-valued attribute 
 Dashed ellipses-- derived attribute, e.g. age is derivable from birthdate and 
current date.
SUMMARY OF SYMBOLS USED IN E-R NOTATION 
 Representing attributes
E-R DIAGRAM FOR A UNIVERSITY
Extended ER Features: Generalization
EXTENDED ER FEATURES: GENERALIZATION 
 A bottom-up design process – combine a number of entity sets 
that share the same features into a higher-level entity set. 
 Specialization and generalization are simple inversions of each 
other; they are represented in an E-R diagram in the same way. 
 The terms specialization and generalization are used 
interchangeably.
SPECIALIZATION AND GENERALIZATION (CONT.) 
 Can have multiple specializations of an entity set based on different 
features. 
 E.g., permanent_employee vs. temporary_employee, in addition to 
instructor vs. secretary 
 Each particular employee would be 
 a member of one of permanent_employee or temporary_employee, 
 and also a member of one of instructor, secretary 
 The ISA relationship also referred to as superclass - subclass 
relationship
UML 
 UML: Unified Modeling Language 
 UML has many components to graphically model different aspects of 
an entire software system 
 UML Class Diagrams correspond to E-R Diagram, but several 
differences.
FIGURE 7.26
FIGURE 7.29
3 
8 
Thank you

More Related Content

What's hot

Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity ConstraintsMegha yadav
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbmsVignesh Saravanan
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraintsmadhav bansal
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model IntroductionNishant Munjal
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbmsRituBhargava7
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level ArchitectureAdeel Rasheed
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra pptGirdharRatne
 
Characteristic of dabase approach
Characteristic of dabase approachCharacteristic of dabase approach
Characteristic of dabase approachLuina Pani
 

What's hot (20)

Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
Integrity constraints in dbms
Integrity constraints in dbmsIntegrity constraints in dbms
Integrity constraints in dbms
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Relational model
Relational modelRelational model
Relational model
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Data Models
Data ModelsData Models
Data Models
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
Relational Data Model Introduction
Relational Data Model IntroductionRelational Data Model Introduction
Relational Data Model Introduction
 
File systems versus a dbms
File systems versus a dbmsFile systems versus a dbms
File systems versus a dbms
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Dbms architecture
Dbms architectureDbms architecture
Dbms architecture
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
Characteristic of dabase approach
Characteristic of dabase approachCharacteristic of dabase approach
Characteristic of dabase approach
 
ER MODEL
ER MODELER MODEL
ER MODEL
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 

Similar to Entity Relationship Diagram

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.pptxsukrithlal008
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdfvinayakjadhav94
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxparimala123
 
Data Modeling Er
Data Modeling ErData Modeling Er
Data Modeling Er1ajnabi4u
 
Design issues with constraints of E-R model
Design issues with constraints of E-R modelDesign issues with constraints of E-R model
Design issues with constraints of E-R modelPaurav Shah
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide sharefanta teferi
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptxqwert001
 
Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..Nimrakhan89
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSssuser20b618
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...Mustafa Kamel Mohammadi
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER modelUma mohan
 

Similar to Entity Relationship Diagram (20)

ERD.pptx
ERD.pptxERD.pptx
ERD.pptx
 
Lecture one db
Lecture one dbLecture one db
Lecture one db
 
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
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
 
DBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptxDBMS Unit-2_Final.pptx
DBMS Unit-2_Final.pptx
 
Data Modeling Er
Data Modeling ErData Modeling Er
Data Modeling Er
 
Design issues with constraints of E-R model
Design issues with constraints of E-R modelDesign issues with constraints of E-R model
Design issues with constraints of E-R model
 
Download different material from slide share
Download different material from slide shareDownload different material from slide share
Download different material from slide share
 
5e7ry754.pptx
5e7ry754.pptx5e7ry754.pptx
5e7ry754.pptx
 
Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..Advantages and disadvantages of er model in DBMS. Types of database models ..
Advantages and disadvantages of er model in DBMS. Types of database models ..
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Data modeling
Data modelingData modeling
Data modeling
 
Data model and entity relationship
Data model and entity relationshipData model and entity relationship
Data model and entity relationship
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
dbms mannual.pdf
dbms mannual.pdfdbms mannual.pdf
dbms mannual.pdf
 
ER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docxER Diagram_Kameshwari.docx
ER Diagram_Kameshwari.docx
 
Rdbms ER model
Rdbms ER modelRdbms ER model
Rdbms ER model
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 

More from Shakila Mahjabin (15)

Computer processing
Computer processingComputer processing
Computer processing
 
Arrays in CPP
Arrays in CPPArrays in CPP
Arrays in CPP
 
CSC 433 Sample normalization SQL Question
CSC 433 Sample normalization SQL QuestionCSC 433 Sample normalization SQL Question
CSC 433 Sample normalization SQL Question
 
SQL : introduction
SQL : introductionSQL : introduction
SQL : introduction
 
Normalization
NormalizationNormalization
Normalization
 
Solution of Erds
Solution of ErdsSolution of Erds
Solution of Erds
 
Ch1- Introduction to dbms
Ch1- Introduction to dbmsCh1- Introduction to dbms
Ch1- Introduction to dbms
 
Stack and queue
Stack and queueStack and queue
Stack and queue
 
Algo analysis
Algo analysisAlgo analysis
Algo analysis
 
Merge sort and quick sort
Merge sort and quick sortMerge sort and quick sort
Merge sort and quick sort
 
Codes on structures
Codes on structuresCodes on structures
Codes on structures
 
Arrays
ArraysArrays
Arrays
 
array, function, pointer, pattern matching
array, function, pointer, pattern matchingarray, function, pointer, pattern matching
array, function, pointer, pattern matching
 
String operation
String operationString operation
String operation
 
Data Structure Basics
Data Structure BasicsData Structure Basics
Data Structure Basics
 

Recently uploaded

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.pptxDenish Jangid
 
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Ữ Â...Nguyen Thanh Tu Collection
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
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.docxRamakrishna Reddy Bijjam
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
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 ClassroomPooky Knightsmith
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 

Recently uploaded (20)

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
 
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Ữ Â...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
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
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
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
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 

Entity Relationship Diagram

  • 2. E- R DATA MODELING  An entity is an object that exists and is distinguishable from other objects.  Example: specific person, company, event, plant  Entities have attributes  Example: people have names and addresses   An entity set is a set of entities of the same type that share the same properties.  Example: set of all persons, companies, trees, holidays
  • 3. ATTRIBUTES  An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set.  Example: instructor = (ID, name, street, city, salary ) course= (course_id, title, credits)  Domain – the set of permitted values for each attribute  Attribute types:  Simple and composite attributes.  Single-valued and multivalued attributes  Derived attributes
  • 4. TYPES OF ATTRIBUTES Simple Attribute: Attribute that consist of a single atomic value. Example: Salary Composite Attribute : Attribute value not atomic. Example : Address : ‘House _no:City:State Name : ‘First Name: Middle Name: Last Name’
  • 5. TYPES OF ATTRIBUTES Single Valued Attribute: Attribute that hold a single value Exampe1: City Example2:Customer id Multi Valued Attribute: Attribute that hold multiple values. Example1: A customer can have multiple phone numbers, email id's etc Example2: A person may have several college degrees Derived Attribute: An attribute that’s value is derived from a stored attribute. Example : age, and it’s value is derived from the stored attribute Date of Birth.
  • 6. ENTITY SETS INSTRUCTOR AND STUDENT instructor_ID instructor_name student-ID student_name
  • 7. RELATIONSHIP SETS  A relationship is an association among several entities Example: 44553 (Peltier) advisor 22222 (Einstein) student entity relationship set instructor entity
  • 8. 8 ENTITY-RELATIONSHIP DIAGRAMS  Representing entities  we represent an entity by a named rectangle  use a singular noun, or adjective + noun  refer to one instance in naming PART-TIME EMPLOYEE CUSTOMER
  • 9. ENTITY-RELATIONSHIP DIAGRAMS  Representing relationship DEPT employs EMPLOYEE
  • 10. ENTITY-RELATIONSHIP DIAGRAMS Types of Relationships  Three types of relationships can exist between entities  One-to-one relationship (1:1): One instance in an entity (parent) refers to one and only one instance in the related entity (child).  One-to-many relationship (1:M): One instance in an entity (parent) refers to one or more instances in the related entity (child)
  • 11. ENTITY-RELATIONSHIP DIAGRAMS One to one One to many
  • 12. ENTITY-RELATIONSHIP DIAGRAMS  Types of Relationships  Many-to-many relationship (M:N): exists when one instance of the first entity (parent) can relate to many instances of the second entity (child), and one instance of the second entity can relate to many instances of the first entity. Many to many
  • 13. CARDINALITY CONSTRAINTS  We express cardinality constraints by drawing either a directed line (), signifying “one,” or an undirected line (—), signifying “many,” between the relationship set and the entity set.  Or, by numbering each entity. * or, m for many.  One-to-one relationship:  A student is associated with at most one instructor via the relationship advisor  A student is associated with at most one department via stud_dept 1 1
  • 14. ONE-TO-MANY RELATIONSHIP  one-to-many relationship between an instructor and a student  an instructor is associated with several (including 0) students via advisor  a student is associated with at most one instructor via advisor, 1 *
  • 15. MANY-TO-MANY RELATIONSHIP  An instructor is associated with several (possibly 0) students via advisor  A student is associated with several (possibly 0) instructors via advisor * *
  • 16. 16 ENTITY-RELATIONSHIP DIAGRAMS  Crow’s foot notation: A type of cardinality notation. It is called crow's foot notation because of the shapes, which include circles, bars, and symbols, that indicate various possibilities.  A single bar indicates one, a double bar indicates one and only one, a circle indicates zero, and a crow's foot indicates many.
  • 17. 17 ENTITY-RELATIONSHIP DIAGRAMS Crow's foot notation is a common method of indicating cardinality. The four examples show how you can use various symbols to describe the relationships between entities.
  • 18. DIFFERENT TYPES OF KEYS  A candidate key of an entity set is a minimal super key  ID is candidate key of instructor  course_id is candidate key of course
  • 19. PRIMARY KEY  A primary key is a candidate key that is most appropriate to be the main reference key for the table. As its name suggests, it is the primary key of reference for the table and is used throughout the database to help establish relationships with other tables.  The primary key must contain unique values, must never be null and uniquely identify each record in the table
  • 20. FOREIGN KEY  A foreign key is generally a primary key from one table that appears as a field in another where the first table has a relationship to the second. In other words, if we had a table A with a primary key X that linked to a table B where X was a field in B, then X would be a foreign key in B
  • 21. DIFFERENT TYPES OF KEYS A super key of an entity set is a set of one or more attributes whose values uniquely determine each entity. Example:  {Student ID,FirstName }  {Student ID, LastName }  {Student ID,FirstName,LastName}
  • 22. E-R DIAGRAMS  Rectangles represent entity sets.  Diamonds represent relationship sets.  Attributes listed inside entity rectangle. Or , as oval shape along with the rectangle.  Underline indicates primary key attributes
  • 23. SUMMARY OF SYMBOLS USED IN E-R NOTATION
  • 24. TOTAL PARTICIPATION OF ENTITY SET  E.g., A Class entity cannot exist unless related to a Faculty member entity
  • 25. WEAK ENTITY SETS An entity set that does not have a primary key is referred to as a weak entity set  We underline the discriminator of a weak entity set with a dashed line.  We put the identifying relationship of a weak entity in a double diamond.  Primary key for section – (course_id, sec_id, semester, year)
  • 26. SUMMARY OF SYMBOLS USED IN E-R NOTATION Crows feet notation
  • 27. SUMMARY OF SYMBOLS USED IN E-R NOTATION  Representing attributes  Rectangle -- Entity  Ellipses -- Attribute (underlined attributes are [part of] the primary key)  Double ellipses -- multi-valued attribute  Dashed ellipses-- derived attribute, e.g. age is derivable from birthdate and current date.
  • 28. SUMMARY OF SYMBOLS USED IN E-R NOTATION  Representing attributes
  • 29. E-R DIAGRAM FOR A UNIVERSITY
  • 30. Extended ER Features: Generalization
  • 31.
  • 32. EXTENDED ER FEATURES: GENERALIZATION  A bottom-up design process – combine a number of entity sets that share the same features into a higher-level entity set.  Specialization and generalization are simple inversions of each other; they are represented in an E-R diagram in the same way.  The terms specialization and generalization are used interchangeably.
  • 33. SPECIALIZATION AND GENERALIZATION (CONT.)  Can have multiple specializations of an entity set based on different features.  E.g., permanent_employee vs. temporary_employee, in addition to instructor vs. secretary  Each particular employee would be  a member of one of permanent_employee or temporary_employee,  and also a member of one of instructor, secretary  The ISA relationship also referred to as superclass - subclass relationship
  • 34.
  • 35. UML  UML: Unified Modeling Language  UML has many components to graphically model different aspects of an entire software system  UML Class Diagrams correspond to E-R Diagram, but several differences.
  • 38. 3 8 Thank you