Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Fundamentals of Entity-Relationship Model in Database System Concepts, Exams of Human Memory

The basics of the entity-relationship model in database systems, including entity sets, attributes, relationship sets, mapping constraints, keys, and e-r diagrams. It also discusses weak entity sets, generalization, and specialization.

Typology: Exams

2017/2018

Uploaded on 04/29/2018

satyajit-sahoo
satyajit-sahoo 🇮🇳

4 documents

1 / 36

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
©Silberschatz, Korth and Sudarshan2.1Database System Concepts
Chapter 2: Entity-Relationship Model
Chapter 2: Entity-Relationship Model
Entity Sets
Relationship Sets
Mapping Constraints
Keys
E-R Diagram
Weak Entity Sets
Generalization & Specialization
Exercise on E-R Diagrams
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24

Partial preview of the text

Download Fundamentals of Entity-Relationship Model in Database System Concepts and more Exams Human Memory in PDF only on Docsity!

Chapter 2: Entity-Relationship Model Chapter 2: Entity-Relationship Model

 (^) Entity Sets  (^) Relationship Sets  (^) Mapping Constraints  (^) Keys  (^) E-R Diagram  (^) Weak Entity Sets  (^) Generalization & Specialization  (^) Exercise on E-R Diagrams

Entity Sets Entity Sets

 (^) A database can be modeled as:  (^) a collection of entities,  (^) relationship among entities.  (^) An entity is an object that exists and is distinguishable from other objects.

 Example: specific person, company, event, plant, book, etc

 (^) Entities have attributes  (^) Example: people have names and addresses  (^) An entity set is a set of entities of the same type that share the same properties.  (^) Example: set of all persons, companies, trees, holidays

Attributes Attributes

 (^) An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set.  (^) Domain – the set of permitted values for each attribute  (^) Attribute types:  (^) Simple and composite attributes.  (^) Single-valued and multi-valued attributes  (^) E.g. multi-valued attribute: phone-numbers, mobile numbers, emails etc.  (^) Derived attributes  (^) Can be computed from other attributes  (^) E.g. age , given date of birth Example: customer = (customer-id, customer-name, customer-street, customer-city) loan = (loan-number, amount)

Composite Attributes Composite Attributes

Relationship Set Relationship Set borrowerborrower

Relationship Sets (Cont.) Relationship Sets (Cont.)

 (^) An attribute can also be property of a relationship set.  (^) For instance, the depositor relationship set between entity sets customer and account may have the attribute access-date

Mapping Cardinalities Mapping Cardinalities

 (^) Express the number of entities to which another entity can be associated via a relationship set.  (^) Most useful in describing binary relationship sets.  (^) For a binary relationship set the mapping cardinality must be one of the following types:  (^) One to one  (^) One to many  (^) Many to one  (^) Many to many

Mapping Cardinalities Mapping Cardinalities

One to one One to many Note: Some elements in A and B may not be mapped to any elements in the other set

Mapping Cardinalities affect ER Design Mapping Cardinalities affect ER Design  (^) Can make access-date an attribute of account, instead of a relationship attribute, if each account can have only one customer  (^) I.e., the relationship from account to customer is many to one, or equivalently, customer to account is one to many

E-R Diagrams E-R Diagrams

 (^) Rectangles represent entity sets.  (^) Diamonds represent relationship sets.  (^) Lines link attributes to entity sets and entity sets to relationship sets.  (^) Ellipses represent attributes  (^) Double ellipses represent multivalued attributes.  (^) Dashed ellipses denote derived attributes.  (^) Underline indicates primary key attributes (will study later)

Relationship Sets with Attributes Relationship Sets with Attributes

Roles Roles

 (^) Entity sets of a relationship need not be distinct  (^) The labels “manager” and “worker” are called roles; they specify how employee entities interact via the works-for relationship set.  (^) Roles are indicated in E-R diagrams by labeling the lines that connect diamonds to rectangles.  (^) Role labels are optional, and are used to clarify semantics of the relationship

One-To-Many Relationship One-To-Many Relationship

 (^) In the one-to-many relationship a loan is associated with at most one customer via borrower , a customer is associated with several loans via borrower

Many-To-One Relationships Many-To-One Relationships

 (^) In a many-to-one relationship a loan is associated with several customers via borrower , a customer is associated with at most one loan via borrower