uLesson 2_ ER-Modeling.docx - Lesson 2 ER-Modeling...

This preview shows page 1 - 3 out of 7 pages.

Lesson 2: ER-ModelingObjectives covered:Determine appropriate Database Relationships including Binary, Unary, Ternary with their Cardinality and Modality.Create an E-R Model.Define Attributes associated with an Entity.Apply Referential Integrity to an E-R Model.Create a Table Structure from a Conceptual Model.Explain the concept of Normalization.Define Primary and Foreign Keys for a Table Structure.Determine Attributes that map to columns in a Table Structure2.1 The Entity Relationship Model (ERM)An entityactually refers to the entity set and not to a single entity occurrence. Recall that an entity is an object of interest to the end user.Attributes are characteristics of entities. Crow's Foot notation, the attributes are written in the attribute box below the entity rectangle. (See Figure 2.1.) Because the Chen representation consumes more space, software vendors have adopted the Crow's Foot attribute display.A required attributeis an attribute that must have a value; in other words, it cannot be left empty. An optional attributeis an attribute that does not require a value; therefore, it can be left empty.Domains:Attributes have a domain. As you learned in Lesson 1, Conceptual Models, a domain is the set of possible values for a given attribute. Attributes may share a domain. Identifiers (Primary Keys): The ERM uses identifiers—one or more attributes that uniquely identify each entity instance. In the relational model, entities are mapped to tables, and the entity identifier is mapped as the table's primary key (PK). Identifiers are underlined in the ERD. Key attributes are also underlined in a frequently used shorthand notation for the table structure, called a relational schema,that uses the following format:Composite Identifiers: Ideally, an entity identifier is composed of only a single attribute. a primary key composed of more than one attribute.Composite and Simple Attributes:Attributes are classified as simple or composite. A composite attribute, not to be confused with a composite key, is an attribute that can be further subdivided to yield additional attributes.Single-Valued Attributes:A single-valued attribute is an attribute that can have only a single value. Multivalued Attributes:Multivalued attributes are attributes that can have many values.Implementing Multivalued Attributes: Although the conceptual model can handle M:N relationships and multivalued attributes, you should not implement them in the RDBMS.Derived Attributes: Finally, a derived attribute is an attribute whose value is calculated (derived) from other attributes. The derived attribute need not be physically stored within the database; instead, it can be derived byusing an algorithm. Derived attributes are sometimes referred to as computed attributes. Computing a derived
attribute can be as simple as adding two attribute values located on the same row, or it can be the result of aggregating the sum of values located on many table rows (from the same table or from a different table). The

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture