SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
The Entity Relationship Model
Data Modeling
Data modeling – a technique for organizing and
documenting a system’s data. Sometimes called
database modeling.
2
Entity relationship diagram (ERD) – a data
model utilizing several notations to depict data
in terms of the entities and relationships
described by that data.
Purpose of E-R Model
• Facilitates database design
• Express logical properties of mini-world of
interest within enterprise - Universe of
DiscourseDiscourse
• Conceptual level model
• Not limited to any particular DBMS
• E-R diagrams used as design tools
• A semantic model – captures meanings
Symbols used in E-R Diagram
• Entity – rectangle
• Attribute – oval
• Relationship – diamond
• Link - line• Link - line
Course
Number
Title
Credit Hours
ER diagram
Section StudentTakes
Grade
Belongs
Term
Semester Year
Id Name
e-mail
Number
Entity
• Object that exists and that can be distinguished from other objects
• Can be person, place, event, object, concept in the real world
• Can be physical object or abstraction
• Entity instance is a particular person, place, etc.
• Entity type is a category of entities
• Entity set is a collection of entities of same type-must be well-defined
• In E-R diagram, rectangle represents entity set
Data Modeling Concepts: Entity
Entity instance – a single occurrence of an entity.
Student ID Last Name First Name
2144 Arnold Betty
entity
8-7
2144 Arnold Betty
3122 Taylor John
3843 Simmons Lisa
9844 Macy Bill
2837 Leath Heather
2293 Wrench Tim
instances
Data Modeling Concepts: Degree
Associative entity –
an entity that inherits
its primary key from
more than one other
entity (called parents).
8-8
Each part of that
concatenated key
points to one and only
one instance of each
of the connecting
entities.
Associative
Entity
Attributes
• Defining properties or qualities of entity type
• Represented by oval on E-R diagram
• Domain – set of allowable values for attribute
– Credit hours might be integer values between 0 and 150
– lastName might be all legal last names – a string that might
also include apostrophes, blanks, hyphens, or other special
characterscharacters
• Attribute maps entity set to domain
• May have null values for some entity instances – no
mapping to domain for those instances
Attributes (cont.)
• May be multi-valued – use double oval on E-R
diagram (e.g., student may have more than one
email address)
• May be composite – use oval for composite
attribute, with ovals for components connected
to it by lines
address
emailStudents
• May be derived – use dashed oval
address
street city state
zip
Faculty age
Keys
• Superkey: attribute or set of attributes that uniquely
identifies an entity (can always tell one entity instance
from another)
– stuId is superkey for Student entity
– stuId, credits together form a superkey, because stuId is a superkey
• Composite key: key with more than one attribute
– courseNumber, sectionNumber, semester make up a composite key
• Candidate key: superkey such that no proper subset of its
attributes is also a superkey (minimal superkey –no
unnecessary attributes)
– Although stuId, credits is a superkey, only stuId is a candidate key
– courseNumber, sectionNumber, semester is a candidate (no one attribute is a
superkey)
– If Student entity contains stuId and ssan as atributes, both stuId and ssan are
candidate keys
Keys (cont.)
• Primary key: the candidate key actually used for
identifying entities and accessing records
• Alternate key: candidate key not used for primary
key
• Secondary key: attribute or set of attributes used
for accessing records, but not necessarily unique
– lastName might be used to find instances in Student, to
help narrow down the resultshelp narrow down the results
• Foreign key: term used in relational model (but
not in the E-R model) for an attribute that is
primary key of a table and is used to establish a
relationship, usually with another table, where it
appears as an attribute also
– stuId in Enroll entity
Relationships
• Connections or interactions between entity instances
• Represented by diamond on E-R diagram
• Relationship type – category of relationships
• Relationship set – collection of relationships of same type, consists of
relationship instances – relationships that exist at a given moment
• Type forms intension; set forms extension of relationship• Type forms intension; set forms extension of relationship
• Relationship can have descriptive attributes
• Degree of relationship
– Binary – links two entity sets; set of ordered pairs
– Ternary – links three entity sets; ordered triples
– N-ary – links n entity sets; ordered n-tuples
– Note: ternary relationships may sometimes be replaced by two binary
relationships
Replace Ternary Relationship with Two
Binary Relationships
Ternary Relationship Binary Relationship
Cardinality of Relationships
• Number of entity instances to which another entity can map
under the relationship
• One-to-one: X:Y is 1:1 is each entity in X is associated with at
most one entity in Y and each entity in Y with at most one
entity in X.
• One-to-many: X:Y is 1:M is each entity in X can be associated• One-to-many: X:Y is 1:M is each entity in X can be associated
with many entities in Y, but each entity in Y with at most one
entity in X.
• Many-to-many: X:Y is M:M if each entity in X can be
associated with many entities in Y, and each entity in Y with
many entities in X (many=more than one)
Showing Cardinalities on ER Diagram
One: 1
Many: M, n
Faculty ClassFaculty-
Class
1 M
Chair- 11
Student ClassEnroll NM
Chairperson Department
Chair-
Dept
11
Chair-
Showing Cardinalities on ER Diagram
One: Single Arrow
Many: Double Arrow
Faculty ClassFaculty-
Class
Chairperson Department
Chair-
Dept
Student ClassEnroll
Faculty ClassFaculty-
Class
Chair-
Showing Cardinalities on ER Diagram
One: Single Arrow
Many: No Arrow
Chairperson Department
Chair-
Dept
Student ClassEnroll
Showing Cardinalities on ER Diagram
One: No Arrow
Many: Big Dot
Faculty ClassFaculty-
Class
Chairperson Department
Chair-
Dept
Student ClassEnroll
Showing Cardinalities on ER Diagram
One: No Arrow
Many: Crow’s Feet
Faculty ClassFaculty-
Class
Chairperson Department
Chair-
Dept
Student ClassEnroll
Cardinality Example
Recursive Relationship
Entity Sets with Two Relationships
Existence Dependency and Weak Entities
• Entity Y is existence dependent on entity X is each instance of
Y must have a corresponding instance of X
• Y must have total participation in its relationship with X
• If Y does not have its own candidate key, Y is called a weak
entity, and X is strong entity
• Weak entity may have a partial key, a discriminator, that• Weak entity may have a partial key, a discriminator, that
distinguishes instances of the weak entity that are related to
the same strong entity
• Use double rectangle for weak entity, with double diamond
for relationship connecting it to its strong entity
Data Modeling Concepts:
Parent and Child Entities
Parent entity - a data entity that contributes
one or more attributes to another entity, called
the child. In a one-to-many relationship the
parent is the entity on the "one" side.
8-25
Child entity - a data entity that derives one or
more attributes from another entity, called the
parent. In a one-to-many relationship the child
is the entity on the "many" side.
Data Modeling Concepts:
Generalization
Generalization – a concept wherein the attributes that
are common to several types of an entity are grouped
into their own entity.
Supertype – an entity whose instances store attributes
8-26
Supertype – an entity whose instances store attributes
that are common to one or more entity subtypes.
Subtype – an entity whose instances may inherit
common attributes from its entity supertype
And then add other attributes unique to the subtype.
Entity Discovery
• In interviews or JRP sessions, pay attention to key
words (i.e. "we need to keep track of ...").
• In interviews or JRP sessions, ask users to identify
things about which they would like to capture,
8-27
things about which they would like to capture,
store, and produce information.
• Study existing forms, files, and reports.
• Scan use case narratives for nouns.
• Some CASE tools can reverse engineer existing files
and databases.
ER Diagram Example
Existence Dependency and Weak Entities
Example
Faculty
facId
name
rank
Evaluation
IsRated
date
rater
rating
ER Diagram Example
deptName
Department
deptCode
office
EmploysChairsHasMajor
Offers
Textbook
isbn
title
credit
Student
stuId
major
lastName
firstName
lastName Faculty
facId
rank
firstName
Faculty-
Class-
Textbook
Teaches
Textbook
author
publisher
E-R Diagram description
• Student: stuId, lastName, firstName, major, credits
– Each student has a unique id and has at most one major
• Department: deptCode, deptName, office
– Each department has a unique code and a unique name, and that each
department has one office designated as the departmental office
• Faculty: facId, lastName, firstName, rank
– facId is unique and that every faculty member must belong to
department. One faculty member in each department is thedepartment. One faculty member in each department is the
chairperson.
• Class: classNumber, sched, room
– classNumber consists of deptCode, courseNumber, section
• Textbook: isbn, author, title, publisher
– A book can have multiple authors
• Evaluation: date, rater, rating
– Evaluation is a weak entity, dependent on Faculty

Más contenido relacionado

La actualidad más candente

Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Dbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design IssueDbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design IssueAmiya9439793168
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPTTrinath
 
Database management systems
Database management systemsDatabase management systems
Database management systemsJoel Briza
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams SimplifiedPuneet Arora
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship ModellingBhandari Nawaraj
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 
Dbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelDbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelAmiya9439793168
 
Data cleansing and prep with synapse data flows
Data cleansing and prep with synapse data flowsData cleansing and prep with synapse data flows
Data cleansing and prep with synapse data flowsMark Kromer
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignPrabu U
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersAbdul Rahman Sherzad
 
Monetize your IOT Investment with Salesforce and AWS PPT
Monetize your IOT Investment with Salesforce and AWS PPTMonetize your IOT Investment with Salesforce and AWS PPT
Monetize your IOT Investment with Salesforce and AWS PPTAmazon Web Services
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Beat Signer
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and modelssabah N
 
3 pillars of big data : structured data, semi structured data and unstructure...
3 pillars of big data : structured data, semi structured data and unstructure...3 pillars of big data : structured data, semi structured data and unstructure...
3 pillars of big data : structured data, semi structured data and unstructure...PROWEBSCRAPER
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 

La actualidad más candente (20)

Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Dbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design IssueDbms 7: ER Diagram Design Issue
Dbms 7: ER Diagram Design Issue
 
Data Modeling PPT
Data Modeling PPTData Modeling PPT
Data Modeling PPT
 
ER diagram powerpoint
ER diagram powerpointER diagram powerpoint
ER diagram powerpoint
 
Data model in salesforce
Data model in salesforceData model in salesforce
Data model in salesforce
 
Database management systems
Database management systemsDatabase management systems
Database management systems
 
ER Diagrams Simplified
ER Diagrams SimplifiedER Diagrams Simplified
ER Diagrams Simplified
 
Joins and unions
Joins and unionsJoins and unions
Joins and unions
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Dbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational ModelDbms 10: Conversion of ER model to Relational Model
Dbms 10: Conversion of ER model to Relational Model
 
Data cleansing and prep with synapse data flows
Data cleansing and prep with synapse data flowsData cleansing and prep with synapse data flows
Data cleansing and prep with synapse data flows
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Monetize your IOT Investment with Salesforce and AWS PPT
Monetize your IOT Investment with Salesforce and AWS PPTMonetize your IOT Investment with Salesforce and AWS PPT
Monetize your IOT Investment with Salesforce and AWS PPT
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
 
data modeling and models
data modeling and modelsdata modeling and models
data modeling and models
 
3 pillars of big data : structured data, semi structured data and unstructure...
3 pillars of big data : structured data, semi structured data and unstructure...3 pillars of big data : structured data, semi structured data and unstructure...
3 pillars of big data : structured data, semi structured data and unstructure...
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 

Destacado

ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ARADHYAYANA
 
Mohit pl'z concurrency
Mohit pl'z concurrencyMohit pl'z concurrency
Mohit pl'z concurrencyMohit
 
Unit 2
Unit 2Unit 2
Unit 2Mohit
 
Unit 2
Unit 2Unit 2
Unit 2Mohit
 
RDBMS ERD Examples
RDBMS ERD ExamplesRDBMS ERD Examples
RDBMS ERD ExamplesSarmad Ali
 
Proyectos de bases de datos
Proyectos de bases de datosProyectos de bases de datos
Proyectos de bases de datosDavid Arroyo
 
Presentation of DBMS (database management system) part 1
Presentation of DBMS (database management system) part 1Presentation of DBMS (database management system) part 1
Presentation of DBMS (database management system) part 1Junaid Nadeem
 
C1 basic concepts of database
C1 basic concepts of databaseC1 basic concepts of database
C1 basic concepts of databaseWan Azni
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramGaurav Gupta
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMSSarmad Ali
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemVarun Arora
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraintsNikhil Deswal
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) iRavinder Kamboj
 
Student Information System ( S.I.S. )
Student Information System ( S.I.S.  )Student Information System ( S.I.S.  )
Student Information System ( S.I.S. )Pulkiŧ Sharma
 
Rdbms
RdbmsRdbms
Rdbmsrdbms
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMSkoolkampus
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data ModelSmriti Jain
 

Destacado (20)

Erd examples
Erd examplesErd examples
Erd examples
 
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
 
Mohit pl'z concurrency
Mohit pl'z concurrencyMohit pl'z concurrency
Mohit pl'z concurrency
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 2
Unit 2Unit 2
Unit 2
 
Chap08
Chap08Chap08
Chap08
 
RDBMS ERD Examples
RDBMS ERD ExamplesRDBMS ERD Examples
RDBMS ERD Examples
 
Proyectos de bases de datos
Proyectos de bases de datosProyectos de bases de datos
Proyectos de bases de datos
 
Presentation of DBMS (database management system) part 1
Presentation of DBMS (database management system) part 1Presentation of DBMS (database management system) part 1
Presentation of DBMS (database management system) part 1
 
C1 basic concepts of database
C1 basic concepts of databaseC1 basic concepts of database
C1 basic concepts of database
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMS
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Cardinality and participation constraints
Cardinality and participation constraintsCardinality and participation constraints
Cardinality and participation constraints
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) i
 
RDBMS.ppt
RDBMS.pptRDBMS.ppt
RDBMS.ppt
 
Student Information System ( S.I.S. )
Student Information System ( S.I.S.  )Student Information System ( S.I.S.  )
Student Information System ( S.I.S. )
 
Rdbms
RdbmsRdbms
Rdbms
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
 
Database : Relational Data Model
Database : Relational Data ModelDatabase : Relational Data Model
Database : Relational Data Model
 

Similar a RDBMS ERD

Similar a RDBMS ERD (20)

ER MODEL.pptx
ER MODEL.pptxER MODEL.pptx
ER MODEL.pptx
 
Database design
Database designDatabase design
Database design
 
Revision ch 3
Revision ch 3Revision ch 3
Revision ch 3
 
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptxDATA MODEL PRESENTATION UNIT I-BCA I.pptx
DATA MODEL PRESENTATION UNIT I-BCA I.pptx
 
Database part3-
Database part3-Database part3-
Database part3-
 
entityrelationshipmodel.pptx
entityrelationshipmodel.pptxentityrelationshipmodel.pptx
entityrelationshipmodel.pptx
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 
Day 1 SQL.pptx
Day 1 SQL.pptxDay 1 SQL.pptx
Day 1 SQL.pptx
 
SQL.pptx
SQL.pptxSQL.pptx
SQL.pptx
 
18306_lec-2 (1).ppt
18306_lec-2 (1).ppt18306_lec-2 (1).ppt
18306_lec-2 (1).ppt
 
Data Models.pptx
Data Models.pptxData Models.pptx
Data Models.pptx
 
Unit i b(er model)
Unit i b(er model)Unit i b(er model)
Unit i b(er model)
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
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
 
ERD(2).ppt
ERD(2).pptERD(2).ppt
ERD(2).ppt
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
ER_model
ER_modelER_model
ER_model
 
entity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.pptentity-relationship-diagram-chen-&-crow -model.ppt
entity-relationship-diagram-chen-&-crow -model.ppt
 
erdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdferdiagramspresentation-150826044953-lva1-app6891.pdf
erdiagramspresentation-150826044953-lva1-app6891.pdf
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 

Más de Sarmad Ali

Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers Sarmad Ali
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 RelationalSarmad Ali
 
RDBMS Arch & Models
RDBMS Arch & ModelsRDBMS Arch & Models
RDBMS Arch & ModelsSarmad Ali
 
Management Information System-MIS
Management Information System-MISManagement Information System-MIS
Management Information System-MISSarmad Ali
 
Classification of Compilers
Classification of CompilersClassification of Compilers
Classification of CompilersSarmad Ali
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler ConstructionSarmad Ali
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction Sarmad Ali
 
About Data Base
About Data BaseAbout Data Base
About Data BaseSarmad Ali
 
Management information system-MIS
Management information system-MISManagement information system-MIS
Management information system-MISSarmad Ali
 

Más de Sarmad Ali (11)

Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers
 
RDBMS Model
RDBMS ModelRDBMS Model
RDBMS Model
 
RDBMS Algebra
RDBMS AlgebraRDBMS Algebra
RDBMS Algebra
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 Relational
 
RDBMS Arch & Models
RDBMS Arch & ModelsRDBMS Arch & Models
RDBMS Arch & Models
 
Management Information System-MIS
Management Information System-MISManagement Information System-MIS
Management Information System-MIS
 
Classification of Compilers
Classification of CompilersClassification of Compilers
Classification of Compilers
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
About Data Base
About Data BaseAbout Data Base
About Data Base
 
Management information system-MIS
Management information system-MISManagement information system-MIS
Management information system-MIS
 

Último

social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 

Último (20)

social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 

RDBMS ERD

  • 2. Data Modeling Data modeling – a technique for organizing and documenting a system’s data. Sometimes called database modeling. 2 Entity relationship diagram (ERD) – a data model utilizing several notations to depict data in terms of the entities and relationships described by that data.
  • 3. Purpose of E-R Model • Facilitates database design • Express logical properties of mini-world of interest within enterprise - Universe of DiscourseDiscourse • Conceptual level model • Not limited to any particular DBMS • E-R diagrams used as design tools • A semantic model – captures meanings
  • 4. Symbols used in E-R Diagram • Entity – rectangle • Attribute – oval • Relationship – diamond • Link - line• Link - line
  • 5. Course Number Title Credit Hours ER diagram Section StudentTakes Grade Belongs Term Semester Year Id Name e-mail Number
  • 6. Entity • Object that exists and that can be distinguished from other objects • Can be person, place, event, object, concept in the real world • Can be physical object or abstraction • Entity instance is a particular person, place, etc. • Entity type is a category of entities • Entity set is a collection of entities of same type-must be well-defined • In E-R diagram, rectangle represents entity set
  • 7. Data Modeling Concepts: Entity Entity instance – a single occurrence of an entity. Student ID Last Name First Name 2144 Arnold Betty entity 8-7 2144 Arnold Betty 3122 Taylor John 3843 Simmons Lisa 9844 Macy Bill 2837 Leath Heather 2293 Wrench Tim instances
  • 8. Data Modeling Concepts: Degree Associative entity – an entity that inherits its primary key from more than one other entity (called parents). 8-8 Each part of that concatenated key points to one and only one instance of each of the connecting entities. Associative Entity
  • 9. Attributes • Defining properties or qualities of entity type • Represented by oval on E-R diagram • Domain – set of allowable values for attribute – Credit hours might be integer values between 0 and 150 – lastName might be all legal last names – a string that might also include apostrophes, blanks, hyphens, or other special characterscharacters • Attribute maps entity set to domain • May have null values for some entity instances – no mapping to domain for those instances
  • 10. Attributes (cont.) • May be multi-valued – use double oval on E-R diagram (e.g., student may have more than one email address) • May be composite – use oval for composite attribute, with ovals for components connected to it by lines address emailStudents • May be derived – use dashed oval address street city state zip Faculty age
  • 11. Keys • Superkey: attribute or set of attributes that uniquely identifies an entity (can always tell one entity instance from another) – stuId is superkey for Student entity – stuId, credits together form a superkey, because stuId is a superkey • Composite key: key with more than one attribute – courseNumber, sectionNumber, semester make up a composite key • Candidate key: superkey such that no proper subset of its attributes is also a superkey (minimal superkey –no unnecessary attributes) – Although stuId, credits is a superkey, only stuId is a candidate key – courseNumber, sectionNumber, semester is a candidate (no one attribute is a superkey) – If Student entity contains stuId and ssan as atributes, both stuId and ssan are candidate keys
  • 12. Keys (cont.) • Primary key: the candidate key actually used for identifying entities and accessing records • Alternate key: candidate key not used for primary key • Secondary key: attribute or set of attributes used for accessing records, but not necessarily unique – lastName might be used to find instances in Student, to help narrow down the resultshelp narrow down the results • Foreign key: term used in relational model (but not in the E-R model) for an attribute that is primary key of a table and is used to establish a relationship, usually with another table, where it appears as an attribute also – stuId in Enroll entity
  • 13. Relationships • Connections or interactions between entity instances • Represented by diamond on E-R diagram • Relationship type – category of relationships • Relationship set – collection of relationships of same type, consists of relationship instances – relationships that exist at a given moment • Type forms intension; set forms extension of relationship• Type forms intension; set forms extension of relationship • Relationship can have descriptive attributes • Degree of relationship – Binary – links two entity sets; set of ordered pairs – Ternary – links three entity sets; ordered triples – N-ary – links n entity sets; ordered n-tuples – Note: ternary relationships may sometimes be replaced by two binary relationships
  • 14. Replace Ternary Relationship with Two Binary Relationships Ternary Relationship Binary Relationship
  • 15. Cardinality of Relationships • Number of entity instances to which another entity can map under the relationship • One-to-one: X:Y is 1:1 is each entity in X is associated with at most one entity in Y and each entity in Y with at most one entity in X. • One-to-many: X:Y is 1:M is each entity in X can be associated• One-to-many: X:Y is 1:M is each entity in X can be associated with many entities in Y, but each entity in Y with at most one entity in X. • Many-to-many: X:Y is M:M if each entity in X can be associated with many entities in Y, and each entity in Y with many entities in X (many=more than one)
  • 16. Showing Cardinalities on ER Diagram One: 1 Many: M, n Faculty ClassFaculty- Class 1 M Chair- 11 Student ClassEnroll NM Chairperson Department Chair- Dept 11
  • 17. Chair- Showing Cardinalities on ER Diagram One: Single Arrow Many: Double Arrow Faculty ClassFaculty- Class Chairperson Department Chair- Dept Student ClassEnroll
  • 18. Faculty ClassFaculty- Class Chair- Showing Cardinalities on ER Diagram One: Single Arrow Many: No Arrow Chairperson Department Chair- Dept Student ClassEnroll
  • 19. Showing Cardinalities on ER Diagram One: No Arrow Many: Big Dot Faculty ClassFaculty- Class Chairperson Department Chair- Dept Student ClassEnroll
  • 20. Showing Cardinalities on ER Diagram One: No Arrow Many: Crow’s Feet Faculty ClassFaculty- Class Chairperson Department Chair- Dept Student ClassEnroll
  • 23. Entity Sets with Two Relationships
  • 24. Existence Dependency and Weak Entities • Entity Y is existence dependent on entity X is each instance of Y must have a corresponding instance of X • Y must have total participation in its relationship with X • If Y does not have its own candidate key, Y is called a weak entity, and X is strong entity • Weak entity may have a partial key, a discriminator, that• Weak entity may have a partial key, a discriminator, that distinguishes instances of the weak entity that are related to the same strong entity • Use double rectangle for weak entity, with double diamond for relationship connecting it to its strong entity
  • 25. Data Modeling Concepts: Parent and Child Entities Parent entity - a data entity that contributes one or more attributes to another entity, called the child. In a one-to-many relationship the parent is the entity on the "one" side. 8-25 Child entity - a data entity that derives one or more attributes from another entity, called the parent. In a one-to-many relationship the child is the entity on the "many" side.
  • 26. Data Modeling Concepts: Generalization Generalization – a concept wherein the attributes that are common to several types of an entity are grouped into their own entity. Supertype – an entity whose instances store attributes 8-26 Supertype – an entity whose instances store attributes that are common to one or more entity subtypes. Subtype – an entity whose instances may inherit common attributes from its entity supertype And then add other attributes unique to the subtype.
  • 27. Entity Discovery • In interviews or JRP sessions, pay attention to key words (i.e. "we need to keep track of ..."). • In interviews or JRP sessions, ask users to identify things about which they would like to capture, 8-27 things about which they would like to capture, store, and produce information. • Study existing forms, files, and reports. • Scan use case narratives for nouns. • Some CASE tools can reverse engineer existing files and databases.
  • 29. Existence Dependency and Weak Entities Example Faculty facId name rank Evaluation IsRated date rater rating
  • 31. E-R Diagram description • Student: stuId, lastName, firstName, major, credits – Each student has a unique id and has at most one major • Department: deptCode, deptName, office – Each department has a unique code and a unique name, and that each department has one office designated as the departmental office • Faculty: facId, lastName, firstName, rank – facId is unique and that every faculty member must belong to department. One faculty member in each department is thedepartment. One faculty member in each department is the chairperson. • Class: classNumber, sched, room – classNumber consists of deptCode, courseNumber, section • Textbook: isbn, author, title, publisher – A book can have multiple authors • Evaluation: date, rater, rating – Evaluation is a weak entity, dependent on Faculty