Database Design - Relationsships
From: Patrik <patrike_at_tigerline.com>
Date: 19 Sep 2002 23:04:48 -0700
Message-ID: <1b8a7ffa.0209192204.224fc758_at_posting.google.com>
*Primary Key
Date: 19 Sep 2002 23:04:48 -0700
Message-ID: <1b8a7ffa.0209192204.224fc758_at_posting.google.com>
*Primary Key
TimeLog Customers Projects --------- -------- -----
*TimeLogID *CustomerID *ProjectID
CustomerID ProjectNo ProjectID CustomerID
You can enter a record in the timelog table without having a project e.g. an employee may do a job for a customer that does not have any project numbers.
I want to make sure if the user picks a project it is a project that has the same customerid as the entered customerid in other words: a Time log entry should not be able to have one customerid and a project with another customerid. I know how to prevent this in the GUI but I want to prevent it in the database design.
How should these tables be structured?
/Patrik Received on Fri Sep 20 2002 - 08:04:48 CEST