Databases Ch 5

Home > Preview

The flashcards below were created by user mjweston on FreezingBlue Flashcards.


  1. Describe the two phases in designing databases
    that arise from the development of new information systems.
    • When developing new information systems, we first create a
    • data model and then transform that data model into a database design.
  2. 5.1           
    Explain how a data model is like a building blueprint.  What is the advantage of making changes
    during the data modeling stage?
    • Before a building is actually constructed, it is carefully
    • planned and designed.  That work is
    • documented in the building blueprint.  Similarly, before a database is actually created
    • in a DBMS, it needs to be carefully planned and designed.  The work of planning and designing a database
    • is documented in a data model.

    • The advantage of making changes during the data modeling
    • stage is that it is easier, simpler, faster and cheaper to make changes at that
    • stage of database development.
  3. 5.1           
    Who is the author of the entity-relationship
    data model?
    Peter P. Chen
  4. 5.1           
    Define entity. Give an example of an
    entity (other than one presented in this chapter).
    • An entity is something that the users want to track, and is
    • readily identifiable in their environment. 
    • We’ll use the example of a Real Estate Agency.  Example entities are AGENT John Smith,
    • PROPERTY 568 12th Street, CASH_RECEIPT CR2004001.
  5. 5.1           
    Explain the difference between an entity class
    and an entity instance.
    • An entity class is a collection of entities and is described
    • by the structure or format of the entities in that class.  An entity instance of an entity class is the
    • representation of a particular entity, such as AGENT John Smith; it is
    • described by the values of attributes of the entity. There are usually many
    • instances of an entity in an entity class.
  6. 5.1           
    Define attribute. Give an example attribute
    for the entity in your answer to question 5.5. 
    • Attributes describe the entity’s characteristics.  For example, in the Real Estate Agency
    • example in question 5.5, attributes for the entity AGENT are FirstName,
    • LastName, DateOfHire, and OfficePhoneNumber.
  7. 5.1           
    Define identifier. Give an example
    identifier for the entity in your answer to question 5.5. 
    • Identifiers are attributes that name, specify, locate (or
    • otherwise identify) entity instances.  For
    • example, in the Real Estate Agency example in question 5.5, an identifier for
    • the entity AGENT would be AgentID.
  8. 5.1           
    Give an example of a composite identifier.
    • Identifiers that consist of two or more attributes are
    • called composite identifiers. Examples are {AreaCode, LocalNumber},
    • {ProjectName, TaskName}, and {City, State}.
  9. 5.1           
    Define relationship.  Give an example of a relationship (other than
    one presented in this chapter). Name your relationship.
    • A relationship is an association between two or more entity
    • classes.  For example, assume you have an
    • entity class named Student and an entity class named Class.  Students enroll in a Class so you would have a
    • relationship named Enrolls In.

    • Often, a name consists of a verb or verb phrase expressed
    • from the standpoint of the parent in the relationship, followed by a slash, and
    • followed by the verb phrase expressed from the standpoint of the child.  Normally, the verb phrase from the child’s
    • view is the passive form of the verb phrase from the parent’s view.
  10. 5.1           
    Explain the difference between a relationship
    class and a relationship instance.
    • Relationship classes are associations among entity classes,
    • and relationship instances are associations among entity instances.
  11. 5.1           
    What is the degree of relationship? Give an
    example of a relationship of degree three (other than one presented in this
    chapter).
    • The number of entity classes in the relationship
    • is the degree of the
    • relationship.  For example, in the Real
    • Estate Agency example in question 5.5, there is a relationship of degree three
    • between AGENT, CLIENT and PROPERTY.  In
    • this case we are documenting the PROPERTIES that AGENTS showed to their
    • CLIENTS.
  12. 5.1           
    What is a binary relationship?
    A relationship between two entity classes
  13. 5.1           
    Explain the difference between an entity and a
    table.  Why is this difference important?
    • Formally, an entity is a database design concept while a
    • table is the implementation of that entity in an actual database.  However, the main difference is that
    • relationships between entities can be created without specifying the formal
    • mechanism – foreign keys – for implementing that relationship.  With tables in a database, the foreign keys
    • must be created to implement the relationship. 
    • This is important because it makes it easier to work with entities in a
    • less formal way, which makes database designs easier to create and change as
    • necessary during the design process.
  14. 5.1           
    What does cardinality mean?
    Cardinality means “count.”
  15. 5.1           
    Define the terms maximum cardinality and minimum
    cardinality.
    • Maximum cardinality
    • is the maximum or largest number of entities that can occur on one side of the
    • relationship.  Minimum cardinality is the minimum or smallest number of entities that
    • must participate in the relationship.
  16. 5.1           
    Give an example for
    which the maximum cardinality must be an exact number.
    • In the Real Estate Agency example in question 5.5, each
    • AGENT is required to work out of two different AGENCY_LOCATIONs each week.  The AGENT always works out of the same two
    • AGENCY_LOCATIONs, so the relationship has an exact maximum cardinality of 2 on
    • AGENCY_LOCATION.
  17. 5.1           
    What is an ID-dependent entity?  Give an example of an ID-dependent entity (other
    than one presented in this chapter). 
    • An ID-dependent entity is one in which the identifier of one
    • entity includes the identifier of another entity.
  18. 5.1           
    Explain how to determine the minimum cardinality
    of both sides of an ID-dependent relationship.
    • The ID-dependent entity (the “child”) cannot exist without
    • the entity upon which it is dependent (the “parent”).  Therefore, the minimum cardinality from the
    • ID-dependent entity to the parent is always one (1).

    • On the other hand, a parent entity may be able to exist
    • without any children.  For example, not
    • all PROPERTYs have APARTMENTs (or UNITs), and not all THEATERs have BOXes.  Therefore the minimum cardinality from the
    • parent to the ID-dependent entity depends upon database application
    • requirements.
  19. 5.1           
    What rules exist when creating an instance of an
    ID-dependent entity?  What rules exist
    when deleting the parent of an ID-dependent entity?
    • In order to create an instance of an ID-dependent entity,
    • the parent entity upon which it depends must have already been created.  If the parent of an ID-dependent entity is
    • deleted, all associated instances of the ID-dependent entity must be deleted as
    • well.
  20. 5.1           
    What is an identifying relationship? How is it
    used?
    • An identifying relationship is a special type of
    • relationship.  It is used to represent
    • ID-dependent.  Most data modeling
    • products use a solid line to represent an identifying relationship and a dashed
    • line to represent a nonidentifying relationship.
  21. 5.1           
    What is a weak entity?  How do weak entities relate to ID-dependent
    entities?
    • A weak entity is
    • an entity whose existence depends upon the existence of another entity.  All ID-dependent entities are weak
    • entities, but not all weak entities are ID-dependent.
  22. 5.1           
    What distinguishes a weak entity from a strong
    entity that has a required relationship to another entity?
    • A strong entity that has a required relationship with
    • another entity can and will exist without the presence of the other, strong
    • entity.  A weak entity cannot and does
    • not exist without the presence of the other, strong entity.
  23. 5.1           
    Define subtype and supertype. Give
    an example of a subtype–supertype relationship (other than one presented in
    this chapter).
    • A supertype is an entity that contains a set of attributes
    • common to what would otherwise be modeled as several entities.  A subtype is an entity that contains the
    • specialized, noncommon attributes from the several entities.
  24. 5.1           
    Explain the difference between exclusive
    subtypes and inclusive subtypes. Give an example of each.
    • A group of subtypes may be considered as either a set of
    • exclusive subtypes or inclusive subtypes. 
    • In a group of exclusive subtypes, the supertype is associated with at
    • most one subtype.  An example of this is
    • the Real Estate Agency example shown in the answer to review question 5.30
    • above.  In a group of inclusive subtypes,
    • the supertype can be associated with one or more of the subtypes.  An example of this for the Real Estate Agency
    • database is that a CLIENT may be included in more than one of the subtype sets
    • – HOME_BUYER, RENTER, or COMMERCIAL_BUYER.
  25. 5.1           
    What is a discriminator?
    • A discriminator is an attribute of the supertype entity that
    • indentifies the associated subtype entity. 
    • An example of this is the Real Estate Agency example shown in the answer
    • to review question 5.30 above, PropertyType is the discriminator. 
  26. 5.1           
    Explain the difference between IS-A and HAS-A relationships.
    • The relationship between a supertype and its subtypes is
    • sometimes called an IS-A relationship. 
    • Entities with an IS-A relationship should have the same identifier
    • because they represent different aspects of the same thing. Entities with HAS-A
    • relationships represent aspects of different things and thus have different
    • identifiers.  These relationships do not
    • involve subtypes.
  27. 5.1           
    What is the most important reason for using
    subtypes in a data model?
    • The most important reason for using subtypes in a data model
    • is to avoid value-inappropriate null values. 
    • In the Real Estate Agency example shown in the answer to review question
    • 5.30 above,  HOUSEs do not have
    • TotalFloorSpace or NumberOfUnits, and COMMERCIAL does not have
    • NumberOfBedrooms.  If all the attributes
    • in the subtypes appeared in the supertype, there would be null values in such
    • columns.
  28. 5.1           
    Describe the relationship between the structure
    of forms and reports and the data model.
    • The structure of forms and reports determines the structure
    • of the data model.  The reverse is also
    • true, for the structure of the data model will determine the structure of the
    • forms and reports that can be based on it.
  29. 5.1           
    Explain two ways forms and reports are used for
    data modeling.
    Forms and reports are used to:

    (1)        Determine the structure of the data model, and

    (2)        Validate the data model.
  30. 5.1           
    Describe two tests for determining if an entity
    is a strong entity.
    The two tests are:

    • (1)  Does the entity have an identifier of its
    • own?

    • (2)  Does the entity seem logically different and
    • separate from other entities?
  31. 5.1           
    Explain why two forms or reports are usually
    needed to infer maximum cardinality.
    • Each form or report only shows the maximum cardinality in
    • one direction between the entities. 
    • Therefore, to know the cardinalities in both directions requires two
    • forms or reports.
  32. 5.1           
    Name three patterns that use ID-dependent
    relationships.
    • Three patterns that use ID-dependent relationships are (1) the
    • association pattern, (2) the multivalued attribute pattern, and (3)
    • the archetype/instance pattern.
  33. 5.1           
    Explain how the association pattern differs from
    the N:M strong entity pattern. What characteristic of the report in Figure 5-21
    indicates that an association pattern is needed?
    • The association pattern differs from the N:M strong entity
    • pattern in that a new, third entity is added to hold additional attributes not
    • associated with the original two entities. 
    • In the report in Figure 5-21, the Price column is the indicator of that
    • an association pattern is needed because Price is an attribute of neither  COMPANY nor PART.
  34. 5.1           
    In general terms, explain how to differentiate
    an N:M strong entity pattern from an association pattern.
    • In general, if there are one or more additional attributes
    • associated with the relationship between two strong entities in an otherwise
    • N:M strong entity pattern, then an association pattern is needed.  In the data model, this will be shown as a
    • third, weak entity that is ID-dependent on both of the other entities.
  35. 5.1           
    Explain why two entities are needed to model
    multivalued attributes.
    • In the E-R model, all attributes must have a single
    • value.  Therefore, multivalued attributes
    • must be modeled with a second table to hold the multiple values of the
    • attribute.

Card Set Information

Author:
mjweston
ID:
175169
Filename:
Databases Ch 5
Updated:
2012-10-03 02:46:32
Tags:
Databases
Folders:

Description:
Databases Ch 5
Show Answers:

What would you like to do?

Home > Flashcards > Print Preview