L16 - ER Modeling 2

# L16 - ER Modeling 2 - Entity Relationship Model Entity...

This preview shows pages 1–7. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Entity Relationship Model Entity Relationship Model Â¡ A database can be modeled as: Â¢ a collection of entities , together with Â¢ relationships among entities. Â¡ An entity is an object that exists and is distinguishable from other objects. Â¡ Entities have attributes Â¢ these are properties that describe the entity and can be used to distinguish one from another Â¡ An entity set is a set of entities of the same type that share the same properties. Relationship Sets Relationship Sets Â¡ A relationship is an association among several entities and a relationship set is a mathematical relation among n â‰¥ 2 entities, each taken from entity sets {( e 1 , e 2 , â€¦ e n ) | e 1 âˆˆ E 1 , e 2 âˆˆ E 2 , â€¦, e n âˆˆ E n } where ( e 1 , e 2 , â€¦, e n ) is a relationship Â¡ The degree of a relationship set refers to number of entity sets that participate in a relationship set. Â¢ Relationship sets that involve two entity sets are binary (or degree two). Generally, most relationship sets in a database system are binary. Â¢ Relationships between more than two entity sets are rare. Most relationships are binary. Attributes Attributes Â¡ An entity is represented by a set of attributes , that is descriptive properties possessed by all members of an entity set Â¡ The domain of an attribute is the set of permitted values for that attribute Â¡ Attribute can be characterized along several dimensions: Â¢ Simple vs. composite attributes. Â¢ Single-valued vs. multi-valued attributes Â¢ Derived attributes â€“ those that can be computed from other attributes Mapping Cardinality Constraints for Relationships Mapping Cardinality Constraints for Relationships Â¡ Mapping cardinality constraints express the number of entities to which another entity can be associated via a relationship set. Â¢ They are 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 Keys Keys Â¡ A super key of an entity set is a set of one or more attributes whose values uniquely determine each entity. Â¡ A candidate key of an entity set is a minimal super key Â¢ minimal in the sense that if we remove an attribute from the superkey it is no longer a superkey Â¡ Although several candidate keys may exist, one of the candidate keys is selected to be the primary key . Relationship Sets and Keys Relationship Sets and Keys Â¡ When we think in terms of representing a relationship set in the context of a relational database schema, we need to consider the concept of a key for a relationship set Â¢ The combination of primary keys of the participating entity sets can be used to form a super key for a relationship set....
View Full Document

## This note was uploaded on 04/08/2008 for the course EE 468 taught by Professor Conry during the Spring '08 term at Clarkson University .

### Page1 / 30

L16 - ER Modeling 2 - Entity Relationship Model Entity...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online