Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2006
    Posts
    1

    Question Shared Database and extending tables

    I have a shared database with different applications needing the same base data but also additional data. Without creating a giant master table with all possibilities and without creating 1:1 relationships, how do I model the data?

    e.g.

    MasterOfficeTable
    officeID (PK)
    name
    phoneNumber

    Application 1 keeps track of supplies per office and needs office data with supplies information (# of pencils, pens, etc) for reports.

    SupplyOfficeTable
    supplyID (PK)
    officeID (FK)
    supplies

    Application 2 keeps track of energy usage per office and needs office data with energy usage information for reports.

    EnergyOfficeTable
    energyID (PK)
    officeID (FK)
    energyUsage

    Application 1 does not care about energy and Application 2 does not care about supplies.

    How do I use data from MasterOfficeTable to supplement the office details for the supplies and energy data?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    I don't quite follow. Surely your "supplies" data doesn't have a 1:1 relationship with "office", and nor does "energy usage"? Why don't you just have the 3 tables as shown, with office as the master of both supplies and energy usage tables?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •