Advantages of ER Modeling

 An ER model is derived from business specifications. ER models separate the information required by a business from the activities performed within a business. Although business can change their activities, the type of information tends to remain constant. Therefore, the data structures also tend to be constant. The advantages of ER modeling are summarized later: 1. The ER modeling provides an easily understood pictorial map for the database design. 2. It is possible to represent the real world problems in a better manner in ER modeling. 3. The conversion of ER model to relational model is straightforward. 4. The enhanced ER model provides more flexibility in modeling real world problems. 5. The symbols used to represent entity and relationships between entities are simple and easy to follow. Summary This chapter has described the fundamentals of ER modeling of data. An ER model is a logical representation of data. The ER model was introduced Review Questions 61 by Peter Chen in 1976. An ER model is usually expressed in the form of ER diagram. The basic constructs of ER model are entity types, relationships, and attributes. This chapter also described the types of entities like strong and weak entity, types of relationships like one-to-one, one-to-many, and many-to-many relationship. Attributes can also be classified as single valued, multivalued and derived attribute. In this chapter different types of entities, attributes, and relationship were explained with simple examples. Review Questions 2.1. Construct an ER diagram of tennis player. PLAYER name country age Number of titles ATP ranking 2.2. Construct an ER diagram of Indian cricket team. One way of constructing ER diagram for Indian cricket team is shown later. TEAM CRICKET BOARD PLAYERS Consists of name age skills Managed by Appoints COACH name experience Here skills refers to player’s skill which may be batting, bowling, and fielding. All-rounders can have many skills. 2.3. What is Weak entity type? Entity types that do not have key attribute of their own are called Weak entity type. 62 2 Entity–Relationship Model 2.4. Define entity with example? An entity is an object with a physical existence. Examples of entity is a person, a car, an organization, a house, etc. 2.5. Define Entity type, Entity set? An entity type defines a collection of entities that have same attribute Entity Set Entity set is the collection of a particular entity type that are grouped into an “Entity Set.” 2.6. Should a real world object be modeled as an entity or as an attribute? Object should be an entity if a number of attributes could be associated with it for proper identification and description, either now or later. Object should be an attribute, if it has an atomic nature. For example, Color should be an attribute, unless we identify Color either as a process (e.g., painting) where a number of attributes codes are to be recorded (e.g., type, shade, gray-scale, manufacturer, or as an object with properties (e.g., car-color with details). 2.7. When composite attribute usage is preferred than set of attributes? Composite attribute is chosen when a meaningful name can be assigned to the set of attributes, e.g., data, address. Otherwise a set of simple attributes should be chosen. 2.8. Distinguish between strong and weak entity? Strong entity Weak entity Exists independently of other entities Dependent on a strong entity, cannot exist on its own Strong entity has its own unique Does not have a unique identifier identifier Represented by a single line rectangle in Represented with a double-line ER diagram rectangle in ER diagram 2.9. What is inheritance in generalization hierarchies? Inheritance is a data modeling feature that supports sharing of attributes between a supertype and a subtype. Subtype inherits attributes from their supertype. 2.10. Give an example of supertype/subtype relationship where the overlap rule applies? Overlap refers to the fact that the same entity instance may be a member of more than one subclass of the specialization. Consider the example of CRICKET PLAYER. Here CRICKET PLAYER is the supertype. The subtype can be BOWLER, BATSMAN. Review Questions 63 CRICKET PLAYER BATSMAN BOWLER O Same player can be both batsman and bowler. Hence overlap rule holds good in this example. 2.11. Give an example of supertype/subtype relationship where the disjoint rule applies? Let us consider the example of CRICKET PLAYER again. Here the super type is CRICKET PLAYER. The subtypes are BOWLER and WICKETKEEPER. We know that the same cricket player cannot be both bowler and wicket keeper hence disjoint rule applies for this example.

Comments

Popular posts from this blog

1 Centralized Data Management

Entity–Relationship Model

Structured Query Language