Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2004
    Posts
    3

    Question Relational Database Design?

    I have attached a file containing bmps of a DB Model that I need to design.

    There are three scenarios ie Initial Model, Scenario 1 Model and Scenario 2 Model. The models is schematic but would give a good understanding of the problem.

    Can anyone confirm which of Scenario 1 or Scenario 2 is the best method to use.

    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2003
    Location
    Massachusetts, USA
    Posts
    106
    Scenario 2 but there should be an association table between reports and store/client, that way the same report can be used for multiple stores (if there is more to be defined about a report other than date).

  3. #3
    Join Date
    Jun 2004
    Posts
    3
    Thanks for the help.

    Does this also mean that any tables referencing the reports table will aslo carry a similar composite key?

    The reports table is in actual fact a checklist of items that gets checked in the store on a specific date

  4. #4
    Join Date
    Aug 2003
    Location
    Massachusetts, USA
    Posts
    106
    I misinterpreted TestReport to be a table that holds report templates. My thinking was that there would be TestClientReport (testclientid, teststoreid, testreportid) and TestReport would have (testreportid, testreportdate....). Doesn't change the vote for Scenario 2.

  5. #5
    Join Date
    Jun 2004
    Posts
    3
    Thanks once again. As I am stil new at this I stil have a few questions. If I have tables referencing the TestReport table in a 1 to many relationship I find that now I need to carry the key from TestReport + additional in for instance the TestProduct table and this compounds to (testclientid, teststoreid, testreportdate + testproductid).
    When I analize this the software complains about to many fields in the key. Does Scenario 1 then not give a less complicated solution?

Posting Permissions

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