




























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
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
1 / 36
This page cannot be seen from the preview
Don't miss anything!
(^) Entity Sets (^) Relationship Sets (^) Mapping Constraints (^) Keys (^) E-R Diagram (^) Weak Entity Sets (^) Generalization & Specialization (^) Exercise on E-R Diagrams
(^) 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.
(^) 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
(^) 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
(^) 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
(^) 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
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
(^) 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)
(^) 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
(^) 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
(^) 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