SlideShare ist ein Scribd-Unternehmen logo
1 von 59
The E-R Model ,[object Object],[object Object],CS 157A Lecture 4
 
 
 
 
Entity-Relationship (E-R) Model COURSE # CTITILE PROF SCHED ROOM COURSE ENROLL STUDENT STUID SNAME MAJOR CREDITS GRADE
Class Hierarchies Employees ssn name lot ISA Hourly Emps Contract Emps Hourly wage Hours worked contractid * Sometimes it’s natural to classify the entities in an entity set into subclass, then we will use Class Hierarchies.
Aggregation name ssn lot Employees monitors until since Sponsors Department Projects pid Started-on pbudget dname did budget * A relationship set is an association between entity sets.  Sometimes we have to model a relationship between a collection of entities and relationships, then we need to use  aggregation .
Conceptual design using the ER model ,[object Object],[object Object],[object Object],[object Object]
UNARY RELATIONSHIP ,[object Object],[object Object],Student * Entity set =  * Relation =  Dr. Lee * Attribute =
BINARY RELATIONSHIP ,[object Object],Employees Works_In Department * Entity set = * Relation =  * Attribute = ssn name lot did budget dname
TERNARY RELATIONSHIP Works_In Employees Department Locations Ternary relationship  : is an associate of 3 entities sets . * Entity set =  * Relation  =  ssn name lot did dname budget cap add * Attribute =
QUARTERY  RELATIONSHIP Employees Works_In Locations Department Product Quartery relationship  : is an associate of 4 entities sets. * Entity set = * Relation =  * Attribute =
 
Additional features of the ER model ,[object Object],[object Object],[object Object],[object Object],[object Object]
An example of  Key Constraints  on  Manage Manages Department Employees ssn name lot Since dname did budget ssn = Social Security Number. did =  Department  id.
 
Weak Entities A weak entity  : is an entity of which is existence depends on  other entities. Policy Department Employees ssn name lot cost Pname --------- age
 
 
Entity versus Attribute Works-In2 Department Employees ssn name lot from dname did budget to *  Entity set  = * Relation =  *  Attribute  =
Entity versus Relationship Manages Department Employees ssn name apptnum did budget dname Mgr-Appts lot since dbudget
Binary versus Ternary Relationship Covers Dependents Employees ssn name Pname --------- age Policies lot policyid cost
Using a Ternary Relationship instead of Aggregation Sponsors Departments Projects pid Started-on did budget pbudget dname Employees name ssn lot
ONE TO MANY RELATIONSHIP   customer customer-name customer-city customer-id borrower customer-street loan loan-number amount
MANY TO ONE RELATIONSHIP   customer customer-name customer-city customer-id borrower customer-street loan loan-number amount
ONE TO ONE RELATIONSHIP   customer customer-name customer-city customer-id borrower customer-street loan loan-number amount
E-R Diagram with Composite, Multivalued, and Derived Attributes Customer date-of-birth phone-number name customer-id first-name age last-name middle-name zip-code state city address street Street-number apartment-number street-name
WEAK ENTITY SETS ,[object Object],[object Object],[object Object]
DISCRIMINATOR ,[object Object],[object Object],[object Object]
E-R DIAGRAM WITH A WEAK ENTITY SET ,[object Object],loan E-R diagram with a weak entity set loan-payment payment payment-date payment-amount payment-number amount loan-number
 
 
 
 
Entity/Relationship Model ,[object Object],[object Object],[object Object],[object Object],[object Object],Students ID name phone height
Relationships ,[object Object],[object Object],Students Courses Taking
Relationship Set ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Multiway Relationships ,[object Object],[object Object],[object Object],[object Object],Students Courses Taking Assisting TA/Graders
[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],Students Courses TAs Enrolls
Beers-Bars-Drinkers Example ,[object Object],name addr license name manf name addr Beers Drinkers Bars Serves Frequents Likes
Multiplicity of Relationships ,[object Object],[object Object],[object Object],Many-many Many-one One-one
Example: Drinkers Have Favorite Beers name addr license name manf name addr Beers Drinkers Bars Serves Frequents Likes Favorite
One-One Relationships ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Manfs Beers Best- seller
Attributes on Relationships ,[object Object],Bars Beers Sells price Bars Beers Sells price Prices
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Converting Multiway to 2-Way ,[object Object],[object Object],[object Object],[object Object],Bars Beers The- Bar Price The- Beer The- Price BBP
Roles ,[object Object],[object Object],Husband Wife d 1 d 2 d 3 d 4 … … Drinkers Married husband wife
[object Object],[object Object],[object Object],[object Object],Buddy1 Buddy2 d 1 d 2 d 1 d 3 d 2 d 1 d 2 d 4 … … Drinkers Buddies 1 2
More Design Issues ,[object Object],[object Object],[object Object]
Subclasses ,[object Object],[object Object]
E/R Subclasses ,[object Object],[object Object],name manf Beers Ales color isa
Different Subclass Viewpoints ,[object Object],[object Object],[object Object],[object Object],name manf Beers Ales color isa Pete’s Ale
Multiple Inheritance ,[object Object],name manf Beers name manf Wines Grape Beers isa isa
Problems ,[object Object],[object Object],[object Object],[object Object]
Keys ,[object Object],[object Object],[object Object],[object Object]
Example ,[object Object],[object Object],[object Object],name manf Beers Ales color isa
Example: A Multiattribute Key ,[object Object],dept room Courses number hours

Weitere ähnliche Inhalte

Was ist angesagt?

Android styles and themes
Android   styles and themesAndroid   styles and themes
Android styles and themesDeepa Rani
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagramHaseeb
 
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
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayArray Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayimtiazalijoono
 
Lesson 2 network database system
Lesson 2 network database systemLesson 2 network database system
Lesson 2 network database systemGiO Friginal
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMSkoolkampus
 
Er & eer to relational mapping
Er & eer to relational mappingEr & eer to relational mapping
Er & eer to relational mappingsaurabhshertukde
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship ModellingBhandari Nawaraj
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagramssadique_ghitm
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationshipsPooja mittal
 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional DependencyRaj Naik
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level ArchitectureAdeel Rasheed
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSRubal Sagwal
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbmsNaresh Kumar
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database DesignArchit Saxena
 

Was ist angesagt? (20)

Android styles and themes
Android   styles and themesAndroid   styles and themes
Android styles and themes
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
Er diagrams presentation
Er diagrams presentationEr diagrams presentation
Er diagrams presentation
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagram
 
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
 
Array Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional arrayArray Introduction One-dimensional array Multidimensional array
Array Introduction One-dimensional array Multidimensional array
 
Lesson 2 network database system
Lesson 2 network database systemLesson 2 network database system
Lesson 2 network database system
 
2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS2. Entity Relationship Model in DBMS
2. Entity Relationship Model in DBMS
 
Er & eer to relational mapping
Er & eer to relational mappingEr & eer to relational mapping
Er & eer to relational mapping
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Object and class relationships
Object and class relationshipsObject and class relationships
Object and class relationships
 
Decomposition using Functional Dependency
Decomposition using Functional DependencyDecomposition using Functional Dependency
Decomposition using Functional Dependency
 
3 Level Architecture
3 Level Architecture3 Level Architecture
3 Level Architecture
 
ER-Model-ER Diagram
ER-Model-ER DiagramER-Model-ER Diagram
ER-Model-ER Diagram
 
DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
 
ER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMSER Modeling and Introduction to RDBMS
ER Modeling and Introduction to RDBMS
 
All data models in dbms
All data models in dbmsAll data models in dbms
All data models in dbms
 
C by balaguruswami - e.balagurusamy
C   by balaguruswami - e.balagurusamyC   by balaguruswami - e.balagurusamy
C by balaguruswami - e.balagurusamy
 
Relational Database Design
Relational Database DesignRelational Database Design
Relational Database Design
 

Andere mochten auch

Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entityVisakh V
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2sadeenedian08
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Typesaakanksha s
 
How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagramTech_MX
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mappingShubham Saini
 

Andere mochten auch (8)

Er
ErEr
Er
 
Slide 6 er strong & weak entity
Slide 6 er  strong & weak entitySlide 6 er  strong & weak entity
Slide 6 er strong & weak entity
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2
 
dbms
dbmsdbms
dbms
 
Unit 02 dbms
Unit 02 dbmsUnit 02 dbms
Unit 02 dbms
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
 
How to Draw an Effective ER diagram
How to Draw an Effective ER diagramHow to Draw an Effective ER diagram
How to Draw an Effective ER diagram
 
ER model to Relational model mapping
ER model to Relational model mappingER model to Relational model mapping
ER model to Relational model mapping
 

Ähnlich wie DBMS UNIT1

Ähnlich wie DBMS UNIT1 (20)

Test presentation
Test presentationTest presentation
Test presentation
 
ER model
ER modelER model
ER model
 
Er model
Er modelEr model
Er model
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
 
Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
 
ER Model and other topics in DBMS
ER Model and other topics in DBMSER Model and other topics in DBMS
ER Model and other topics in DBMS
 
Unit02 dbms
Unit02 dbmsUnit02 dbms
Unit02 dbms
 
dbms er model
dbms er modeldbms er model
dbms er model
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
 
E R Model details.ppt
E R Model details.pptE R Model details.ppt
E R Model details.ppt
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mca
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
10287 lecture5(2)
10287 lecture5(2)10287 lecture5(2)
10287 lecture5(2)
 
Chapter3
Chapter3Chapter3
Chapter3
 
Chapter3
Chapter3Chapter3
Chapter3
 
L7 er2
L7 er2L7 er2
L7 er2
 

Kürzlich hochgeladen

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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
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...christianmathematics
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
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 pdfAyushMahapatra5
 
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
 
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 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
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.pptxheathfieldcps1
 
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
 
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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 

Kürzlich hochgeladen (20)

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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
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...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
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
 
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 ...
 
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
 
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
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
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
 
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...
 
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
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 

DBMS UNIT1

  • 1.
  • 2.  
  • 3.  
  • 4.  
  • 5.  
  • 6. Entity-Relationship (E-R) Model COURSE # CTITILE PROF SCHED ROOM COURSE ENROLL STUDENT STUID SNAME MAJOR CREDITS GRADE
  • 7. Class Hierarchies Employees ssn name lot ISA Hourly Emps Contract Emps Hourly wage Hours worked contractid * Sometimes it’s natural to classify the entities in an entity set into subclass, then we will use Class Hierarchies.
  • 8. Aggregation name ssn lot Employees monitors until since Sponsors Department Projects pid Started-on pbudget dname did budget * A relationship set is an association between entity sets. Sometimes we have to model a relationship between a collection of entities and relationships, then we need to use aggregation .
  • 9.
  • 10.
  • 11.
  • 12. TERNARY RELATIONSHIP Works_In Employees Department Locations Ternary relationship : is an associate of 3 entities sets . * Entity set = * Relation = ssn name lot did dname budget cap add * Attribute =
  • 13. QUARTERY RELATIONSHIP Employees Works_In Locations Department Product Quartery relationship : is an associate of 4 entities sets. * Entity set = * Relation = * Attribute =
  • 14.  
  • 15.
  • 16. An example of Key Constraints on Manage Manages Department Employees ssn name lot Since dname did budget ssn = Social Security Number. did = Department id.
  • 17.  
  • 18. Weak Entities A weak entity : is an entity of which is existence depends on other entities. Policy Department Employees ssn name lot cost Pname --------- age
  • 19.  
  • 20.  
  • 21. Entity versus Attribute Works-In2 Department Employees ssn name lot from dname did budget to * Entity set = * Relation = * Attribute =
  • 22. Entity versus Relationship Manages Department Employees ssn name apptnum did budget dname Mgr-Appts lot since dbudget
  • 23. Binary versus Ternary Relationship Covers Dependents Employees ssn name Pname --------- age Policies lot policyid cost
  • 24. Using a Ternary Relationship instead of Aggregation Sponsors Departments Projects pid Started-on did budget pbudget dname Employees name ssn lot
  • 25. ONE TO MANY RELATIONSHIP customer customer-name customer-city customer-id borrower customer-street loan loan-number amount
  • 26. MANY TO ONE RELATIONSHIP customer customer-name customer-city customer-id borrower customer-street loan loan-number amount
  • 27. ONE TO ONE RELATIONSHIP customer customer-name customer-city customer-id borrower customer-street loan loan-number amount
  • 28. E-R Diagram with Composite, Multivalued, and Derived Attributes Customer date-of-birth phone-number name customer-id first-name age last-name middle-name zip-code state city address street Street-number apartment-number street-name
  • 29.
  • 30.
  • 31.
  • 32.  
  • 33.  
  • 34.  
  • 35.  
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44. Example: Drinkers Have Favorite Beers name addr license name manf name addr Beers Drinkers Bars Serves Frequents Likes Favorite
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.