fen 2015-08-311 introduction to the database field: conceptual modelling: the entity-relation (er)...
TRANSCRIPT
![Page 1: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/1.jpg)
FEN 2015-08-31 1
Introduction to the database field:
Conceptual modelling:The Entity-Relation (ER) Model
Seminar:Introduction to relational databases
![Page 2: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/2.jpg)
2
…or…
Where does all the tables come from???
FEN 2015-08-31
![Page 3: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/3.jpg)
3
Conceptual Data Models
A conceptual data model describes the data objects (entities) and their relations in the problem domain.A conceptual model of the data is the basis on which the IT systems of an organisation are build.It should be:
Independent of implementationStable over time
Over time conceptual data structure doesn't change nearly as much as functionality
Conceptual models are to be transformed to a database model – for instance the relational model.
FEN 2015-08-31
![Page 4: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/4.jpg)
4
Example: MiniBank
This is conceptual (ER-model):
FEN 2015-08-31
What would a conceptual model look like?• Entities?• Customer• Account
• Relations:• Customer-Owns-Account
Customer Account
custNo name accNo balance
inRate
Owns1 n
This is implementation:
![Page 5: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/5.jpg)
5
Entity-Relation (ER) Model: ConceptsEntities
Attributes⋅ Atomic⋅ Composite⋅ Multi valued
Attribute valuesEntity typesKeysDomains
FEN 2015-08-31
RelationsCardinality ratioParticipation (total / partial)Relations may have attributes
Weak Entity TypesIdentifying ownerIdentifying relationPartial keyA weak entity always has total participation in the identifying relation.
Customer Account
custNo name accNo balance
inRate
Owns1 n
![Page 6: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/6.jpg)
6
Example: The Company Database (Elmasri)
FEN 2015-08-31
![Page 7: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/7.jpg)
7
Entities?
FEN 2015-08-31
Department: name(kk), number(kk), locationProject: name(kk), number(kk), locationEmployee: ssn(kk), bdate, name (poss. composite), sex, address (poss. composite), salaryDependent (weak?): name (partial key), sex, bdate
Example: The Company Database (Elmasri)
![Page 8: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/8.jpg)
8
Relations?
FEN 2015-08-31
ManagesWorks_ForWorks_OnDependents_OfSupervisionControls
Example: The Company Database (Elmasri)
![Page 9: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/9.jpg)
9
ER Diagram for the Company Database
FEN 2015-08-31
Example: The Company Database (Elmasri)
![Page 10: FEN 2015-08-311 Introduction to the database field: Conceptual modelling: The Entity-Relation (ER) Model Seminar: Introduction to relational databases](https://reader030.vdocuments.mx/reader030/viewer/2022032605/56649e7d5503460f94b7fc3a/html5/thumbnails/10.jpg)
10
Example/Exercise (Elmasri)
FEN 2015-08-31
Questions:Can a customer exists without an account?Can an account have more owners?How many branches can account belong to?Can a customer have accounts in more than one branch?…???