SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Subject Name Code Credit Hours
Database System COMP 219 3
Chapter IV
Subject Name Code Credit Hours
Database System COMP 219 3
Data Models
• A collection of tools for describing
– Data
– Data relationships
– Data semantics
– Data constraints
• Relational model
• Entity-Relationship data model (mainly for database design)
• Object-based data models (Object-oriented and Object-relational)
• Semistructured data model (XML)
• Other older models:
– Network model
– Hierarchical model
Subject Name Code Credit Hours
Database System COMP 219 3
Data Models
• A collection of Conceptual tools for describing
– Data
– Data relationships
– Data semantics
– Data constraints
• Different data Models
• - Relational model
- Entity-Relationship data model (Conceptual Model-mainly for database design)
- Object-based data models (Object-oriented and Object-relational)
- Semi structured data model (XML)
• Other older models:
– Network model
– Hierarchical model
A Data model is a set of concepts that can be used to
describe the structure of the db.
Subject Name Code Credit Hours
Database System COMP 219 3
Entity-Relationship data model
• It is a high level conceptual data model that describes the structure of db
in terms of entities, relationship among entities & constraints on them..
• Basic Concepts of E-R Model:
- Entity
- Entity Set
- Attributes
- Relationship
- Relationship set
- Identifying Relationship
I
Subject Name Code Credit Hours
Database System COMP 219 3
Entity-Relationship data model
• Entity:
-It is a an object that exists in the real world.
• Example:
- Person, Employee, Car, Home etc..
Object with conceptual Existence
- Account, loan, job etc…
Subject Name Code Credit Hours
Database System COMP 219 3
Entity-Relationship data model
• Entity Set:
- A set of entities of the same type.
• Attributes:
- A set of properties that describe an
entity.
Subject Name Code Credit Hours
Database System COMP 219 3
• Types of Attributes:
• Simple (or) atomic vs. Composite:
• - An attribute which cant be sub divided. (Eg.Age)
• - An attribute which can be divided into sub parts is called
• as composite attribute.
e.g.. Address- Apartment no.
- Street
- Place
- City
- District
Single Valued vs. Multivalued:
• -An attribute having only one value (e.g.. Age,eid,sno)
• - An attribute having multiple values (e.g.. Deptlocat- A dept can be located in
several places)
Entity-Relationship data model
Subject Name Code Credit Hours
Database System COMP 219 3
Entity-Relationship data model
• Stored Vs Derived
• - Stored attribute is one that has some value where as
derived attribute is a one where its value is derived from sa.
• -E.g.. SA-DOB
• DA- Age derived from DOB.
• Key Attribute:
• - An attribute which is used to uniquely identify records.
• E.g.. eid, sno, dno
Subject Name Code Credit Hours
Database System COMP 219 3
Entity-Relationship data model
• Relationship:
• - It is an association among several
entities. It specifies what type of relationship
exists between entities.
Subject Name Code Credit Hours
Database System COMP 219 3
• Relationship set:
• - It is a set of relationships of the same type.
Entity-Relationship data model
1 AA 1000
2 BB 2000
100 FFF 10000
1 AA AC
2 BB AD
100 FFF SD
Entity
E
N
TI
T
Y
S
E
T
DEPT. ENTITY TYPERelationship SetEmp.. ENTITY TYPE
Subject Name Code Credit Hours
Database System COMP 219 3
• Weak Entity Set:
• - No key attributes.
• Identifying Relationship:
• - The relationship associated with the weak
entity type
Entity-Relationship data model
Subject Name Code Credit Hours
Database System COMP 219 3
Constraints
• Two of the most important constraints are
• a. Mapping Constraints
• b. Participation constraints
»Participation constraints
Total Participation Partial Participation
Subject Name Code Credit Hours
Database System COMP 219 3
a. Mapping Cardinalities:
Mapping Cardinalities OR CARDINALITY RATIOS, EXPRESSS THE NUMBER OF
ENTITIES TO WHICH ANOTHER ENTITY CAN BE ASSOCIATED VIA A
RELATIONSHIPSET.
• Several types of Mapping Cardinalities. They are,
• a.i. One-to-One
• An entity in set A is associated with at most one entity in set B and
vice versa.
e1
e2
e3
d1
d2
d3
Employee Dept.Works for
Subject Name Code Credit Hours
Database System COMP 219 3
• a.i. One-to-many
• An entity in set A is associated with zero or more
no. of entities in set B and an entity in B is associated with
at most one entity in A.
a. Mapping Cardinalities:
e1
e2
e3
d1
d2
d3
Employee Dept.Works for
Subject Name Code Credit Hours
Database System COMP 219 3
a. Mapping Cardinalities:
 a.i. Many-to-One
 One or more no. of entities in set A is associated with at
most one entity in B. An entity in B can be associated with any no.
of entities in A.
e1
e2
e3
e4
d1
d2
d3
Employee Dept.Works for
Subject Name Code Credit Hours
Database System COMP 219 3
• a.i. Many-to-Many
• One or more no. of entities in set A
is associated with one or more no. of
entities in set B.
a. Mapping Cardinalities:
e1
e2
e3
e4
d1
d2
d3
Employee Dept.Works for
Subject Name Code Credit Hours
Database System COMP 219 3
• The participation of an entity set E in a relationship set R is
said to be total if every entity in E participates in atleast one
relationship in R.
b. Participation Constraints:
Total Participation
Partial Participation:
The participation of an entity set E in a relationship set R is said to be
partial if only a few of the entities in E participated in relationship in R.
Subject Name Code Credit Hours
Database System COMP 219 3
b. Participation Constraints:
• E.G..
Partial participation Total participation
Employee
Dept.
Manages

Weitere ähnliche Inhalte

Andere mochten auch

Bhavendra_CV (3)
Bhavendra_CV (3)Bhavendra_CV (3)
Bhavendra_CV (3)
Dhaval Soni
 
Linkers note
Linkers noteLinkers note
Linkers note
dutor
 
Accenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-China
Accenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-ChinaAccenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-China
Accenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-China
Jason Chau
 
Brochure AgustaWestland AW159
Brochure AgustaWestland AW159Brochure AgustaWestland AW159
Brochure AgustaWestland AW159
Leonardo
 

Andere mochten auch (17)

Bhavendra_CV (3)
Bhavendra_CV (3)Bhavendra_CV (3)
Bhavendra_CV (3)
 
Magnetek A011989
Magnetek A011989Magnetek A011989
Magnetek A011989
 
Linkers note
Linkers noteLinkers note
Linkers note
 
Accenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-China
Accenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-ChinaAccenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-China
Accenture-Playing-To-Win-Realigning-CIO-CMO-Disconnect-China
 
Como crear una cuenta en wikipedia
Como crear una cuenta en wikipediaComo crear una cuenta en wikipedia
Como crear una cuenta en wikipedia
 
tt9-16s54-56tv_osto
tt9-16s54-56tv_ostott9-16s54-56tv_osto
tt9-16s54-56tv_osto
 
Lessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesLessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online Courses
 
Accommodation[1]
Accommodation[1]Accommodation[1]
Accommodation[1]
 
problem of water
problem of waterproblem of water
problem of water
 
Ferrante ppt2
Ferrante ppt2Ferrante ppt2
Ferrante ppt2
 
Commscope-Andrew C240-JMSM-65
Commscope-Andrew C240-JMSM-65Commscope-Andrew C240-JMSM-65
Commscope-Andrew C240-JMSM-65
 
Multimedia presentation of primary school teachers Tarasevich Inna Osipovna
Multimedia presentation of primary school teachers Tarasevich Inna OsipovnaMultimedia presentation of primary school teachers Tarasevich Inna Osipovna
Multimedia presentation of primary school teachers Tarasevich Inna Osipovna
 
Introduce CPQ & CPS - AdLatte
Introduce CPQ & CPS - AdLatteIntroduce CPQ & CPS - AdLatte
Introduce CPQ & CPS - AdLatte
 
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejenIDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
 
Murder at the Vicarage
Murder at the VicarageMurder at the Vicarage
Murder at the Vicarage
 
Brochure AgustaWestland AW159
Brochure AgustaWestland AW159Brochure AgustaWestland AW159
Brochure AgustaWestland AW159
 
Lesson level ! of English
Lesson level ! of EnglishLesson level ! of English
Lesson level ! of English
 

Ähnlich wie Dbms chapter iv

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
JasmineMichael1
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modelling
g30162363
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
Slideshare
 

Ähnlich wie Dbms chapter iv (20)

DBMS Class 3
DBMS Class 3DBMS Class 3
DBMS Class 3
 
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
 
Dmbs chapter vi
Dmbs chapter viDmbs chapter vi
Dmbs chapter vi
 
relational database
relational databaserelational database
relational database
 
Database.ppt
Database.pptDatabase.ppt
Database.ppt
 
DBMS & Data Models - In Introduction
DBMS & Data Models - In IntroductionDBMS & Data Models - In Introduction
DBMS & Data Models - In Introduction
 
Entityrelationshipmodel
EntityrelationshipmodelEntityrelationshipmodel
Entityrelationshipmodel
 
ER modeling
ER modelingER modeling
ER modeling
 
Sachin noire 2024
Sachin noire 2024Sachin noire 2024
Sachin noire 2024
 
Introduction to Database Management Systems
Introduction to Database Management Systems Introduction to Database Management Systems
Introduction to Database Management Systems
 
Common Data Model - A Business Database!
Common Data Model - A Business Database!Common Data Model - A Business Database!
Common Data Model - A Business Database!
 
Common Data Service – A Business Database!
Common Data Service – A Business Database!Common Data Service – A Business Database!
Common Data Service – A Business Database!
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
 
Cn presentation on the topic called as re modelling
Cn presentation on the topic called as re modellingCn presentation on the topic called as re modelling
Cn presentation on the topic called as re modelling
 
Chapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdfChapter – 2 Data Models.pdf
Chapter – 2 Data Models.pdf
 
DBMS
DBMS DBMS
DBMS
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Datastage database design and data modeling ppt 4
Datastage database design and data modeling ppt 4Datastage database design and data modeling ppt 4
Datastage database design and data modeling ppt 4
 
er-models.pptx
er-models.pptxer-models.pptx
er-models.pptx
 

Mehr von Bala Ganesh

Dbms chapter iii
Dbms chapter iiiDbms chapter iii
Dbms chapter iii
Bala Ganesh
 
Flip flop& RAM ROM
Flip flop& RAM ROMFlip flop& RAM ROM
Flip flop& RAM ROM
Bala Ganesh
 
Chap iii-Logic Gates
Chap iii-Logic GatesChap iii-Logic Gates
Chap iii-Logic Gates
Bala Ganesh
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
Bala Ganesh
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
Bala Ganesh
 
Software testing
Software testingSoftware testing
Software testing
Bala Ganesh
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
Bala Ganesh
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
Bala Ganesh
 
Comp 107cep iii,iv,v
Comp 107cep iii,iv,vComp 107cep iii,iv,v
Comp 107cep iii,iv,v
Bala Ganesh
 
Wdf 222chp iii vi
Wdf 222chp iii viWdf 222chp iii vi
Wdf 222chp iii vi
Bala Ganesh
 

Mehr von Bala Ganesh (20)

Dbms chapter iii
Dbms chapter iiiDbms chapter iii
Dbms chapter iii
 
Dbms chapter ii
Dbms chapter iiDbms chapter ii
Dbms chapter ii
 
Flip flop& RAM ROM
Flip flop& RAM ROMFlip flop& RAM ROM
Flip flop& RAM ROM
 
karnaugh maps
karnaugh mapskarnaugh maps
karnaugh maps
 
Chap iii-Logic Gates
Chap iii-Logic GatesChap iii-Logic Gates
Chap iii-Logic Gates
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
 
DEL-244Chep i
DEL-244Chep iDEL-244Chep i
DEL-244Chep i
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
Software testing
Software testingSoftware testing
Software testing
 
Design
DesignDesign
Design
 
Comp 107 cep 8
Comp 107 cep 8Comp 107 cep 8
Comp 107 cep 8
 
Comp 107 cep 7
Comp 107 cep 7Comp 107 cep 7
Comp 107 cep 7
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
 
Comp107 chep6
Comp107 chep6Comp107 chep6
Comp107 chep6
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
 
Comp 111 cep ii
Comp 111 cep iiComp 111 cep ii
Comp 111 cep ii
 
Comp 107cep iii,iv,v
Comp 107cep iii,iv,vComp 107cep iii,iv,v
Comp 107cep iii,iv,v
 
Wdf 222chp iii vi
Wdf 222chp iii viWdf 222chp iii vi
Wdf 222chp iii vi
 
Wdf222 cep ii
Wdf222 cep iiWdf222 cep ii
Wdf222 cep ii
 

Kürzlich hochgeladen

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 

Kürzlich hochgeladen (20)

An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
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
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
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
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
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
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
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
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
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...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Dbms chapter iv

  • 1. Subject Name Code Credit Hours Database System COMP 219 3 Chapter IV
  • 2. Subject Name Code Credit Hours Database System COMP 219 3 Data Models • A collection of tools for describing – Data – Data relationships – Data semantics – Data constraints • Relational model • Entity-Relationship data model (mainly for database design) • Object-based data models (Object-oriented and Object-relational) • Semistructured data model (XML) • Other older models: – Network model – Hierarchical model
  • 3. Subject Name Code Credit Hours Database System COMP 219 3 Data Models • A collection of Conceptual tools for describing – Data – Data relationships – Data semantics – Data constraints • Different data Models • - Relational model - Entity-Relationship data model (Conceptual Model-mainly for database design) - Object-based data models (Object-oriented and Object-relational) - Semi structured data model (XML) • Other older models: – Network model – Hierarchical model A Data model is a set of concepts that can be used to describe the structure of the db.
  • 4. Subject Name Code Credit Hours Database System COMP 219 3 Entity-Relationship data model • It is a high level conceptual data model that describes the structure of db in terms of entities, relationship among entities & constraints on them.. • Basic Concepts of E-R Model: - Entity - Entity Set - Attributes - Relationship - Relationship set - Identifying Relationship I
  • 5. Subject Name Code Credit Hours Database System COMP 219 3 Entity-Relationship data model • Entity: -It is a an object that exists in the real world. • Example: - Person, Employee, Car, Home etc.. Object with conceptual Existence - Account, loan, job etc…
  • 6. Subject Name Code Credit Hours Database System COMP 219 3 Entity-Relationship data model • Entity Set: - A set of entities of the same type. • Attributes: - A set of properties that describe an entity.
  • 7. Subject Name Code Credit Hours Database System COMP 219 3 • Types of Attributes: • Simple (or) atomic vs. Composite: • - An attribute which cant be sub divided. (Eg.Age) • - An attribute which can be divided into sub parts is called • as composite attribute. e.g.. Address- Apartment no. - Street - Place - City - District Single Valued vs. Multivalued: • -An attribute having only one value (e.g.. Age,eid,sno) • - An attribute having multiple values (e.g.. Deptlocat- A dept can be located in several places) Entity-Relationship data model
  • 8. Subject Name Code Credit Hours Database System COMP 219 3 Entity-Relationship data model • Stored Vs Derived • - Stored attribute is one that has some value where as derived attribute is a one where its value is derived from sa. • -E.g.. SA-DOB • DA- Age derived from DOB. • Key Attribute: • - An attribute which is used to uniquely identify records. • E.g.. eid, sno, dno
  • 9. Subject Name Code Credit Hours Database System COMP 219 3 Entity-Relationship data model • Relationship: • - It is an association among several entities. It specifies what type of relationship exists between entities.
  • 10. Subject Name Code Credit Hours Database System COMP 219 3 • Relationship set: • - It is a set of relationships of the same type. Entity-Relationship data model 1 AA 1000 2 BB 2000 100 FFF 10000 1 AA AC 2 BB AD 100 FFF SD Entity E N TI T Y S E T DEPT. ENTITY TYPERelationship SetEmp.. ENTITY TYPE
  • 11. Subject Name Code Credit Hours Database System COMP 219 3 • Weak Entity Set: • - No key attributes. • Identifying Relationship: • - The relationship associated with the weak entity type Entity-Relationship data model
  • 12. Subject Name Code Credit Hours Database System COMP 219 3 Constraints • Two of the most important constraints are • a. Mapping Constraints • b. Participation constraints »Participation constraints Total Participation Partial Participation
  • 13. Subject Name Code Credit Hours Database System COMP 219 3 a. Mapping Cardinalities: Mapping Cardinalities OR CARDINALITY RATIOS, EXPRESSS THE NUMBER OF ENTITIES TO WHICH ANOTHER ENTITY CAN BE ASSOCIATED VIA A RELATIONSHIPSET. • Several types of Mapping Cardinalities. They are, • a.i. One-to-One • An entity in set A is associated with at most one entity in set B and vice versa. e1 e2 e3 d1 d2 d3 Employee Dept.Works for
  • 14. Subject Name Code Credit Hours Database System COMP 219 3 • a.i. One-to-many • An entity in set A is associated with zero or more no. of entities in set B and an entity in B is associated with at most one entity in A. a. Mapping Cardinalities: e1 e2 e3 d1 d2 d3 Employee Dept.Works for
  • 15. Subject Name Code Credit Hours Database System COMP 219 3 a. Mapping Cardinalities:  a.i. Many-to-One  One or more no. of entities in set A is associated with at most one entity in B. An entity in B can be associated with any no. of entities in A. e1 e2 e3 e4 d1 d2 d3 Employee Dept.Works for
  • 16. Subject Name Code Credit Hours Database System COMP 219 3 • a.i. Many-to-Many • One or more no. of entities in set A is associated with one or more no. of entities in set B. a. Mapping Cardinalities: e1 e2 e3 e4 d1 d2 d3 Employee Dept.Works for
  • 17. Subject Name Code Credit Hours Database System COMP 219 3 • The participation of an entity set E in a relationship set R is said to be total if every entity in E participates in atleast one relationship in R. b. Participation Constraints: Total Participation Partial Participation: The participation of an entity set E in a relationship set R is said to be partial if only a few of the entities in E participated in relationship in R.
  • 18. Subject Name Code Credit Hours Database System COMP 219 3 b. Participation Constraints: • E.G.. Partial participation Total participation Employee Dept. Manages