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

Chapter 7 - Database Design with Semantic Object Models

  1. Transformation of Semantic Objects into Relational Database Designs
    1. Simple Objects - contains only single-valued, nonobject attributes (ex. EQUIPMENT)
      EQUIPMENT
      ID  EquipmentNumber
            Description
            AcquisitionDate
            PurchaseCost

      EQUIPMENT
      EquipmentNumberDescription, AcquisitionDate, PurchaseCost

    2. Composite Objects - contains one or more multivalued nonobject attributes (ex. HOTEL-BILL)
      HOTEL-BILL
      ID  InvoiceNumber
            ArrivalDate
            CustomerName
            TotalDue
          DailyCharge
      ID  ChargeDate
            RoomCharge
            FoodCharge
            PhoneCharge
          MiscCharge
          TaxCharge

      HOTEL-BILL
      InvoiceNumberArrivalDate, CustomerName, TotalDue
      DAILY-CHARGE
      InvoiceNumber, ChargeDateRoomCharge, FoodCharge, PhoneCharge, MiscCharge, TaxCharge

    3. Compound Objects - contains at least one object attribute (ex. COLLEGE)

      Four Types of Compound Objects
      Object2
      Can
      Contain
      Object1 Can Contain
      One Many
      One 1:1 1:N
      Many M:1 M:N

    4. Representing One-to-One Compound Objects

      MEMBER
      ID  MemberNumber
            Name
            Address
            City
          State
          Zip
          LOCKER1.1
      LOCKER
      ID  LockerNumber
            Type
            Combination
            Location
          MEMBER0.1

      MEMBER
      MemberNumberName, Address, City, State, Zip, LockerNumber
      LOCKER
      LockerNumberType, Combination, Location

    5. Representing One-to-Many Compound Objects
      EQUIPMENT
      ID  SerialNumber
            Type
            Model
            AcquisitionDate
          AcquistionCost
          Location
          REPAIR0.N
      REPAIR
      ID  InvoiceNumber
            Date
            Description
            Cost
          EQUIPMENT1.1

      EQUIPMENT
      SerialNumberType, Model, AcquisitionDate, AcquistionCost, Location
      REPAIR
      InvoiceNumberDate, Description, Cost, SerialNumber

    6. Representing Many-to-Many Compound Objects
      BOOK
      ID  ISBN
            Title
            CallNumber
          AUTHOR1.N
      AUTHOR
      ID  SocialSecurityNumber
            Name
            Phone
          BOOK0.N

      BOOK
      ISBNTitle, CallNumber
      AUTHOR
      SocialSecurityNumberName, Phone
      BOOK-AUTHOR-INT
      ISBN, SocialSecurityNumber

    7. Hybrid Objects - combinations of objects of two types (semantic object with at least one multivalued group attribute that includes a semantic object attribute)
      SALES-ORDER
      ID  SalesOrderNumber
            Date
          CUSTOMER1.1
          SALESPERSON1.1
          LineItem1.N
            Quantity
      ID  ITEM1.1
            ExtendedPrice1.1
          Subtotal1.1
          Tax1.1
          Total1.1
      ITEM
      ID  ItemNumber
            ItemDescription
            UnitPrice1.1
          SALES-ORDER0.N
      CUSTOMER
      ID  CustomerName
            Address
            City
            State
            Zip
      ID    Phone
          SALES-ORDER0.N
      SALESPERSON
      ID  SalesPersonName
            SalesPersonCode1.1
          SALES-ORDER0.N

      SALES-ORDER
      SalesOrderNumberDate, Subtotal, Tax, Total, Phone, SalespersonName
      CUSTOMER
      CustomerName, Address, City, State, ZipPhone
      SALESPERSON
      SalesPersonNameSalesPersonCode
      LINE-ITEM
      SalesOrderNumber, ItemNumberQuantity, ExtendedPrice
      ITEM
      ItemNumberItemDescription, UnitPrice

    8. Association Objects - object that relates two (or more) objects and stores data that are peculiar to that relationship [ex. FLIGHT is an association object that associates AIRPLANE and PILOT objects
      AIRPLANE
      ID  TailNumber
            Type
            Hours
          FLIGHT0.N
      PILOT
      ID  PilotNumber
            Name
            Phone
          FLIGHT0.N
      FLIGHT
      ID  FlightID
               FlightName
               Date
            OriginationCity
            DestinationCity
          AIRPLANE1.1
          PILOT1.1

      AIRPLANE
      TailNumberTypeHours
      PILOT
      PilotNumberName, Phone
      FLIGHT
      FlightNumber, DateOriginationCity, DestinationCity, TailNumber, PilotNumber

    9. Parent/Subtype Objects - the subtype inherits all of the attributes of its parent [ex. MANAGER / EMPLOYEE where a manager is also an employee]
      PERSON
      ID  SocialSecurityNumber
            PersonName
            Phone
          STUDENT0.ST
          PROFESSOR0.ST
      0.1.1
      STUDENT
      ID  PERSONP
            DateofBirth
            GPA

      PROFESSOR
      ID  PERSONP
            Title
            Department

      PERSON
      SocialSecurityNumberPersonName, Phone
      STUDENT
      SocialSecurityNumberDateofBirth, GPA
      PROFESSOR
      SocialSecurityNumberTitle, Department

      PERSON1
      SocialSecurityNumberPersonName, Phone, PersonType
      PERSON2
      SocialSecurityNumberPersonName, Phone, StudentType, ProfessorType

    10. ArchType/Version Objects - produces other semantic objects that represent versions, releases, or editions of the archetype [ex. TEXTBOOK produces EDITIONs]
      PRODUCT
      ID  Name
            Description
            TotalSales
          RELEASE0.N
      RELEASE
      ID  Release-ID1.1
            PRODUCT1.1
            ReleaseNumber1.1
          ReleaseDate
          ReleaseSales

      PRODUCT
      NameDescription, TotalSales
      RELEASE
      Name, ReleaseNumberReleaseDate, ReleaseSales

  2. Sample Objects
    1. Subscription Form
      SUBSCRIPTION
      ID  SubNumber
            StartDate
            EndDate
            AmtDue
            Name
            Address
            City
            State
            Zip
            PayCode

      SUBSCRIPTION
      SubNumberStartDate, EndDate, AmtDue, Name, Address, City, State, Zip, PayCode

      CUSTOMER
      ID  CustomerNumber
            Name
            Address
            City
            State
            Zip
          SUBSCRIPTION0.N
      SUBSCRIPTION
      ID  SubNumber
            StartDate
            EndDate
            AmtDue
            PayCode     CUSTOMER1.1

      CUSTOMER
      CustomerNumberName, Address, City, State, Zip

      SUBSCRIPTION
      SubNumberStartDate, EndDate, AmtDue, PayCode

    2. Product Description
      CEREAL-PRODUCT
      ID  Name
            ServingSize
            NumberServings
            Nutrient
          ID  NutrientName
              CerealOnlyAmount
              WithMilkAmt
            USDARecDailyAllow
          ID  VitaminName
              CerealOnlyPercent
              WithMilkPercent
            Ingredient
            VitaminIron

    3. Traffic-Warning Citation - see pg. 181

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