If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Relational Database Design?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-25-04, 05:00
hannesw hannesw is offline
Registered User
 
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
File Type: zip Test Model.zip (39.0 KB, 34 views)
Reply With Quote
  #2 (permalink)  
Old 06-25-04, 11:24
dmmac dmmac is offline
Registered User
 
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).
Reply With Quote
  #3 (permalink)  
Old 06-28-04, 01:09
hannesw hannesw is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 06-28-04, 13:37
dmmac dmmac is offline
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old 06-29-04, 01:22
hannesw hannesw is offline
Registered User
 
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?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On