SlideShare uma empresa Scribd logo
1 de 51
2. Entity Relationship(ER) Model DATABASE MANAGEMENT SYSTEMS
THE RELATİON MODEL ,[object Object],[object Object],[object Object],[object Object]
BASİC CONCEPT ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],BASİC CONCEPT
AN ENTİTY SET İS A SET OF ENTİTİES OF THE SAME TYPE ,[object Object],Employee Entity Type : e 1 e 2 e 3 Entity set: … The actual employees A general specification
ATTRİBUTES ,[object Object],[object Object],[object Object],[object Object]
TYPES OF ATTRİBUTES ,[object Object],Employee EmpNo Name Address
CONPOSİTE ATTRİBUTE:CONSİST OF SEVERAL COMPONENTS Country Employee Address Street City EmpNo Name
MULTİVALUE ATTRİBUTE :CONTAİNS   MORE THAN ONE VALUE Employee Phone Email
DERİVED ATTRİBUTE:COMPUTED FROM  OTHER ATTRİBUTES Employee Age Bonus
KEY ATTRİBUTES ,[object Object],ERD tabular Employee EmpNo Name EmpNo Name . . . 123456 John Wong . . . 456789 . . . 146777 . . . John Wong Mary Cheung
KEY ATTRİBUTES ,[object Object],Employee Name Address
KEY ATTRİBUTES ,[object Object],[object Object],[object Object],In many cases, a key is artificially introduced (e.g., EmpNo) to make applications more efficient. Employee EmpNo Name Address
RELATİONSHİP ,[object Object],[object Object],[object Object]
[object Object],[object Object],Question: Could Amount be an attribute of Customer? Or an attribute of Account? What does Amount mean? How many values you want to keep? Customer depositor Account Amount CusNo Name AccNo Name
REPRESENTATİON OF RELATİONSHİP ,[object Object],Depositor Note: this is NOT an ERD The amount in  each  deposit. CustomerNo A123456 B456789 B456789 AccountNo A-101 A-201 A-302 Amount 500 900 700 A123456 B456789 A-101 A-201 A-202 500 900 700 ,[object Object]
TRY AN ALTERNATİVE  ,[object Object],AccountNo A-101 A-201 A-302 Name Current Saving Current Amount 500 900 700 ,[object Object],[object Object]
CARDİNALİTY OF RELATİONSHİPS ,[object Object],[object Object],Customer Loan Borrows ,[object Object]
1 :  N  Customer Loan One entity of type  X  can be associated with many entities of type  Y . One entity of type  Y  can be associated with, at most, one entity of type  X .  Customer Borrow Loan ,[object Object],[object Object]
N  :  M One entity of type  X  can be associated with many entities of type  Y . One entity of type  Y  can be associated with many entities of type  X . Customer Borrow loan ,[object Object],[object Object]
NOTES ,[object Object],[object Object],[object Object],[object Object],[object Object]
DEGREES OF A RELATİONSHİPS SET  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Customer Loan Borrow - Binary Customer Loan Borrow Branch - Ternary
RECURSİVE RELATİONSHİPS ,[object Object],[object Object],[object Object],[object Object],manager worker Employee work-for Employee manager worker Employee work-for
TABULAR REPRESENTATİON OF RECURSİVE   RELATİONSHİPS ,[object Object],[object Object],[object Object],ManagerNo WorkerNo A1234 A6543 A1234 A8734 EmployeeNo EmployeeNo A1234 A8734 A1234 A6543
OPTİONAL VERSUS MANDATORY ,[object Object],[object Object],[object Object],[object Object],[object Object]
OPTİONAL VERSUS MANDATORY Neither one is preferable to the other. The proper one to choose depends on the business situation. Mandatory sub-typing is represented by creating a double line from the super-type ( person  in the following ER diagram) to the circle.  Optional sub-typing is represented by leaving a single line from the super-type to the circle.
AGGREGATİON OF ENTİTY TYPES ,[object Object]
AGGREGATİON OF ENTİTY TYPES Consider the relationship between a car and its engine and body. The engine and body are both part of the car. The relationship is represented as follows in an ER diagram.
PARALLEL RELATİONSHİPS ,[object Object]
PARALLEL RELATİONSHİPS A person pays for zero or more insurance policies. An insurance policy is paid for by exactly one person.  A person is insured by zero or more insurance policies. An insurance policy insures one or more persons.
EXİSTENCE DEPENDENCE ,[object Object],Customer Loan loan borrow CusNo LoanNo A loan cannot exist if there is no borrower.
WEAK ENTİTİES ,[object Object],[object Object]
LoanNo Amount Date_pay PaymentNo Payment ,[object Object],[object Object],[object Object],[object Object],Loan payment Question: Why not combine  loan  and  payment  into one entity type? Amount Loan
WEAK ENTİTY VS EXİSTENCE CONSTRAİNTS ,[object Object],[object Object]
ANOTHER EXAMPLE OF WEAK ENTİTY   TYPE ,[object Object],[object Object],EmpNo Name Dependent Emp_Dep Age Employee
TERNARY RELATİONSHİPS Customer Loan Borrow Branch A customer borrows a loan from a branch. Customer Loan Borrow Branch Issue A customer borrows a loan. A loan is issued from a branch.
WHAT ARE THE DİFFERENCES? A customer borrows a loan from a branch. A customer borrows a loan. A loan is issued from a branch.
[object Object],[object Object],[object Object],Customer Loan Borrow Branch Issue Cus_Br
WHY? ,[object Object],[object Object],[object Object],A12345 B56789 A12345 A12345 L-001
BİNARY RELATİONSHİPS TO TERNARY? ,[object Object],[object Object],Customer Loan Borrow Branch Issue Buy_stock
A CASE STUDY A primary school student writes a composition about a picnic:   Today is Sep 9, the weather is fine.  My classmates, John, Mary and I go to a picnic in Sai Kung.  Our teacher is Ms Wong Initial Design: Picnic weather destination date Students Name Teacher Name
QUESTİONS ? ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],My solution Question: How to record number of students in a picnic? Student StudentNo Name weather date destination Picnic goes leading Teacher Name
E-R DESİGN DECİSİONS ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
E-R DİAGRAM FOR COMPANY DATABASE EMPLOYEE WORKS_FOR MANAGES CONTROLS Startdate DEPARTMENT WORKS_ON PROJECT Hours DEPENDENTS_OF DEPENDENT SUPERVISION supervisee supervisor Fname Minit Lname Name Sex Address Salary Ssn Bdate Number Of Employees Locations Can you translate it back into English? Name Number Name Number Location Relationship Birthdate Sex Name
LİMİTATİONS OF ER MODEL ,[object Object],[object Object],[object Object],[object Object]
REDUCTİON OF AN E-R SCHEMA TO TABLES ,[object Object],[object Object],[object Object]
REPRESENTİNG ENTİTY SETS AS TABLES ,[object Object],[object Object],Composite key payment loan-no   payment-date payment-no payment-amount L-17 L-15 L-23 5 22 11 10 May 1999 23 May 1999 17 May 1999 50 300 75 customer customer-name   customer-street customer-id Jones Hayes Smith 321-12-3123  677-89-9011  019-28-3746  Main Main North customer-city Harrison Rye Harrison
REPRESENTİNG RELATİONSHİP SETS AS TABLES depositor ,[object Object],customer borrow loan loan-no cust-no share% date cust-name
[object Object],[object Object],customer cust-no   cust-name A12345 B56789 Peter Wong Mary Cheung loan loan-no   L-001 L-002 date Sep 2000 Aug 2001 customer borrow loan cust-no cust-name date loan-no cust-no A12345 B56789 indicates who borrowed the loan
WEAK ENTİTİES ,[object Object],Already indicates the 1:N relationship between loan-no and payment-no payment loan-no   payment-date payment-no payment-amount L-17 L-17 L-17 5 7 6 10 May 1999 23 May 1999 17 May 1999 50 300 75

Mais conteúdo relacionado

Semelhante a Chapter2

Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------keishaangelina2
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxsantosh96234
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Maniguest1e0229a
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxprosofts1
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...Mustafa Kamel Mohammadi
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mcaEdhole.com
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases Tharindu Weerasinghe
 
ERD with complete knowledge
ERD with complete knowledgeERD with complete knowledge
ERD with complete knowledgeAsma Rasool
 
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
 
Desigining of Database - ER Model
Desigining of Database - ER ModelDesigining of Database - ER Model
Desigining of Database - ER ModelAjay Chhimpa
 
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 DBMSHarinarayananR2
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxmiftah88
 
Conceptual Modeling of Data
Conceptual Modeling of DataConceptual Modeling of Data
Conceptual Modeling of DataM.Zalmai Rahmani
 

Semelhante a Chapter2 (20)

Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------Pertemuan-4------------------------------------------------
Pertemuan-4------------------------------------------------
 
Chapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptxChapter 2. Concepctual design -.pptx
Chapter 2. Concepctual design -.pptx
 
E R Model details.ppt
E R Model details.pptE R Model details.ppt
E R Model details.ppt
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
 
Jobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptxJobs manager vs supervisor.pptx
Jobs manager vs supervisor.pptx
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
27 fcs157al3
27 fcs157al327 fcs157al3
27 fcs157al3
 
Data & Databases
Data & Databases Data & Databases
Data & Databases
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mca
 
Basic concepts of Data and Databases
Basic concepts of Data and Databases Basic concepts of Data and Databases
Basic concepts of Data and Databases
 
ERD with complete knowledge
ERD with complete knowledgeERD with complete knowledge
ERD with complete knowledge
 
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
 
Chapter3
Chapter3Chapter3
Chapter3
 
Chapter3
Chapter3Chapter3
Chapter3
 
Desigining of Database - ER Model
Desigining of Database - ER ModelDesigining of Database - ER Model
Desigining of Database - ER Model
 
02er
02er02er
02er
 
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
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptx
 
Conceptual Modeling of Data
Conceptual Modeling of DataConceptual Modeling of Data
Conceptual Modeling of Data
 

Último

How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityEric T. Tung
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...Paul Menig
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...rajveerescorts2022
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...amitlee9823
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsMichael W. Hawkins
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfAmzadHosen3
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 

Último (20)

How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pillsMifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
 
7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...7.pdf This presentation captures many uses and the significance of the number...
7.pdf This presentation captures many uses and the significance of the number...
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
HONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael HawkinsHONOR Veterans Event Keynote by Michael Hawkins
HONOR Veterans Event Keynote by Michael Hawkins
 
Forklift Operations: Safety through Cartoons
Forklift Operations: Safety through CartoonsForklift Operations: Safety through Cartoons
Forklift Operations: Safety through Cartoons
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 

Chapter2

  • 1. 2. Entity Relationship(ER) Model DATABASE MANAGEMENT SYSTEMS
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. CONPOSİTE ATTRİBUTE:CONSİST OF SEVERAL COMPONENTS Country Employee Address Street City EmpNo Name
  • 9. MULTİVALUE ATTRİBUTE :CONTAİNS MORE THAN ONE VALUE Employee Phone Email
  • 10. DERİVED ATTRİBUTE:COMPUTED FROM OTHER ATTRİBUTES Employee Age Bonus
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. OPTİONAL VERSUS MANDATORY Neither one is preferable to the other. The proper one to choose depends on the business situation. Mandatory sub-typing is represented by creating a double line from the super-type ( person in the following ER diagram) to the circle. Optional sub-typing is represented by leaving a single line from the super-type to the circle.
  • 27.
  • 28. AGGREGATİON OF ENTİTY TYPES Consider the relationship between a car and its engine and body. The engine and body are both part of the car. The relationship is represented as follows in an ER diagram.
  • 29.
  • 30. PARALLEL RELATİONSHİPS A person pays for zero or more insurance policies. An insurance policy is paid for by exactly one person. A person is insured by zero or more insurance policies. An insurance policy insures one or more persons.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36. TERNARY RELATİONSHİPS Customer Loan Borrow Branch A customer borrows a loan from a branch. Customer Loan Borrow Branch Issue A customer borrows a loan. A loan is issued from a branch.
  • 37. WHAT ARE THE DİFFERENCES? A customer borrows a loan from a branch. A customer borrows a loan. A loan is issued from a branch.
  • 38.
  • 39.
  • 40.
  • 41. A CASE STUDY A primary school student writes a composition about a picnic: Today is Sep 9, the weather is fine. My classmates, John, Mary and I go to a picnic in Sai Kung. Our teacher is Ms Wong Initial Design: Picnic weather destination date Students Name Teacher Name
  • 42.
  • 43.
  • 44.
  • 45. E-R DİAGRAM FOR COMPANY DATABASE EMPLOYEE WORKS_FOR MANAGES CONTROLS Startdate DEPARTMENT WORKS_ON PROJECT Hours DEPENDENTS_OF DEPENDENT SUPERVISION supervisee supervisor Fname Minit Lname Name Sex Address Salary Ssn Bdate Number Of Employees Locations Can you translate it back into English? Name Number Name Number Location Relationship Birthdate Sex Name
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.