To Previous Chapter To Table of Contents To Bottom of Page To Next Chapter

Chapter 8 - Database Application Design

  1. Case Application: View Ridge Gallery
    1. Application Requirements
      • track customers and their purchasing interests
      • record customers' art purchases
      • record gallery's purchases
      • list artists and their works that have appeared in the gallery
      • report how fast an artist's works have sold and at what margin
      • list current inventory
      • list product reports to be used by the gallery's bookkeeper/accountant
    2. Database Design
      CUSTOMER
      ID  Name
            Phone
            Address
              Street
              City
              State
              Zip
          WORK0.N
          ARTIST0.N
      WORK
      ID  WorkID
              ARTIST0.N
              Title
              Copy
            Description
            Transaction
          ID  DateAcquired
              Acquisition Price
              PurchaseDate
          CUSTOMER1.1
            SalesPrice
      ARTIST
      ID  Name
            Nationality
            Dates
              Birth
              Death
          WORK0.N
              CUSTOMER0.N

  2. Characteristics of Database Applications
    1. Create, Update, Delete, and Display Objects
      objects are transformed and stored as sets of relations; need to materialize objects from the relations
    2. Provide Facilities for Controlling Processing
      • command driven interface (SQL)
      • menus
      • GUIs
    3. Protect Security and Integrity
    4. A Continuum of Applications
      Unrestricted Use of Command Language on Relations (e.g. SQL) -> Controlled Access to Relations -> Uncontrolled Access to Objects -> Secure and Controlled Access to Object Views
      Low <--- Increasing Degree of Application Support
      An Application Continuum
      ---> High
    5. Materializing Objects (generate an object from underlying relations)
    6. Object Views user views

  3. Form Design (screen display used for data entry and edit)
    1. The Form Structure Should Reflect the Object Structure
    2. The Semantics of the Data Should be Graphically Evident (spacing between attributes)
    3. The Form Structure Should Encourage Appropriate Action
    4. Forms in a GUI Environment
      • Drop-down List Boxes
      • Radio (option) buttons
      • Check boxes
    5. Cursor Movement and Pervasive Keys (function keys should be consistent in use)

  4. Report Design
    1. Report Structure
      structure of a report should reflect the structure of the underlying object
    2. Implied Object (collections of objects)
      • Sorted by Object Identifier
      • Sorted by NonIdentifier, Nonobject Attributes
      • Sorted by Attributes Contained in Object Attributes

  5. Application Program Design
    1. The Structure of Application Program Logic (pseudocode)
      structure of a program should mirror the structure of the data that it processes
    2. Relationship Constaint Checking
      fragment - row that exists inappropriately without a required parent or child
      orphan - child row that exists without a mandatory parent
      • Types of Relationship Constraint for 1-1 and 1-M relationships
        • mandatory-to-mandatory (M-M) (ex. HOTEL-BILL / DAILY-CHARGE)
        • mandatory-to-optional (M-O) (ex. PROFESSOR / STUDENT)
        • optional-to-mandatory (O-M) (ex. CLUB / STUDENT)
        • optional-to-optional (O-O) (ex. PROJECT / EMPLOYEE)
      • Restrictions on Updates to Parent Rows
        Proposed Action on Parent
        InsertModify(key)Delete
        M-MCreate at least one childChange matching keys of all childrenDelete all children OR reassign all children
        M-OOK Change matching keys of all childrenDelete all children OR Reassign all children
        O-MInsert new child OR Appropriate child existsChange key of at least one child OR Appropriate child existsOK
        O-OOK OK OK

      • Restrictions on Updating Child Rows
        Proposed Action on Child
        InsertModify(key)Delete
        M-MParent Exists OR Create parentParent with new value exists (or create one) AND Sibling existsSibling exists
        M-OParent Exists OR Create parentParent with new value exists OR Create parentOK
        O-MOK Sibling existsSibling exists
        O-OOK OK OK

    3. Other Types of Constraint Checking (uniqueness, null or unknown values
    4. The Use of Application Programs in Backup and Recovery atomicity - logical units of work

To Previous Chapter To Table of Contents To top of page To Next Chapter