| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Database Design - Relationsships
*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 - 01:04:48 CDT
![]() |
![]() |