IM ERD & EERD

Cards (39)

  • Business Rules - A business rule is a statement that defines or constrains some aspect of the business
  • Data Modeling - Documenting rules and policies of an organization that govern the data.
  • Data Model - Graphical representation of the database system.
  • Entity-Relationship Diagram (ERD) – most popular data modeling tool
  • entity-relationship model (E-R model) - is a detailed, logical representation of the data for an organization or for a business area. This is done during the conceptual data modeling phase.
  • Basic Constructs of an E-R Model
    1. Entity2. Relationship
    3. Attribute
  • Entities - is a person, place, object, event, or concept in the user environment which the organization wishes to maintain data.
  • Entity Type - is a collection of entities that share common properties.
  • Relationship - Association representing an interaction among the entity types
  • Relationship type – meaningful association between (or among) entity types.
  • Degree of a Relationship - It is the number of entity types that participate in it
  • Cardinality Constraints - the number of instances of one entity that can or must be associated with each instance of another entity.
  • Minimum Cardinality - the minimum number of instances of entity B that may be associated with each instance of entity A.
    If the minimum cardinality is zero (0), participation is optional
    If the minimum cardinality is one (1), participation is mandatory
  • Strong Entities
    ● exist independently of other types of entities
    ● has its own unique identifier
    ● represented with single-line rectangle
  • Weak Entity
    ● dependent on a strong entity...cannot exist on its own
    ● Does not have a unique identifier
    ● represented with double-line rectangle
  • Associative Entity
    ● The presence of one or more attributes on a relationship suggests that the relationship should perhaps be represented as an entity type.
  • When to convert a relationship to an associative entity
    type?
    1. All the relationships for the participating entity types
    are “many” relationships
    2. The resulting entity type has an independent meaning
    to end users
    3. The associative entity has one or more attributes in
    addition to the identifier
    4. The associative entity participates in one or more
    relationships independent of the entities related in the
    associated relationship
  • Enhance entity relationship (EER) model was introduced because of more complex business data now.
  • Supertype
    – general entity type that has a relationship with one or more
    subtypes
  • Subtype
    – specialized entity types to which the supertype is subdivided;
    subgrouping of the entities in an entity type
  • Attribute Inheritance
    Property by which subtype entities inherit values of all attributes and instance of all relationships of the supertype
  • When to Use Supertype/Subtype Relationships
    1. There are attributes that apply to some (but not all) instances of an entity type
    2. The instances of a subtype participate in a relationship unique to that subtype (a subtype has an attribute unique to that subtype)
  • Two Processes Used in Developing Supertype/Subtype relationships
    1. Generalization – defines more general entity type from a set of more specialized entity types; bottom up process
    2. Specialization - Direct reverse of generalization; top down process
  • Constraints in Supertype/Subtype relationships
    1. Completeness Constraint
    2. Disjointness Constraint
    1. Completeness Constraint – Addresses the question of whether an instance of a supertype must also be a member of at least one subtype
    Two Rules
    1.1 Total specialization rule – specifies that each entity instance of the supertype must be a member of some subtype in the relationship
    1.2 Partial specialization rule – specifies that an entity instance of the supertype may not belong to any subtype (pwedeng not either of the subtype so wala siya don)
  • Disjointness Constraint - Addresses whether an instance of a supertype may simultaneously be a member of two (or more) subtypes
    Two Rules
    2.1 Disjoint Rule – specifies that if an entity instance (of a supertype) is a member of one subtype, it cannot simultaneously be a member of any other subtype
    2.2 Overlap Rule – specifies that an entity instance can simultaneously be a member of two (or more) subtypes
  • Disjoint rule - isa lang membership
    Overlap - pwede kahit dalawa or tatlo or depende sa subtype
  • Disjoint addresses whether the instance of supertype can be a member or one or more subtype
    tas sa completeness constraint - if the instance of supertype can be a member or not of the subtype
  • total specialization - double line ibig sabihin yung instance ng supertype ay member ng some sbtype
  • A subtype discriminator is an attribute of a supertype whose values determine the target subtype or subtypes
  • Summary of Supertype/Subtype Hierarchies
    1. Attributes are assigned at the highest logical level that is possible in the hierarchy
    2. Subtypes that are lower in hierarchy inherit attributes not only from their immediate supertype, but from all supertypes higher in the hierarchy, up to the root
  • Supertype/subtype hierarchy is a hierarchical arrangement of supertypes and subtypes where each subtype has only one supertype.
  • Subtype - subset of a supertype
  • Overlap Rule - contraint saying that an entity belongs to two subtypes
  • Attribute Inheritance - subtype gets supertype attributes
  • Total specialization rule - supertype instance must belong to a subtype
  • Supertype - is the generalized entity type
  • Specialization - creating subtypes for an entity type
  • Subtype Discriminator - locates target subtypes for an entity