Hi,
I have searched on this forum about a solution to this and found out that 3 part compound keys are unwise although they are legal. Now, I am not sure how to design this database!
Basically, I need to store information about site (a big part of land), phase (a portion of site) and Plot (a portion of phase). Each record should represent a unique value of this three part combination. For example:
Record 1:
Site = Site1
Phase = 1
plot= 1
Record 2:
Site = Site1
Phase = 1
plot= 2
Record 3:
Site = Site1
Phase = 2
plot= 1
I have desinged three different tables since I need quite a number of relevant fields for each table. One table for site, another for phase and another one for plot.
I am thinking to have:
Site table -
siteName -> PK
Phase table -
siteName and PhaseNo -> compound PK
siteName -> FK
Plot table -
siteName, PhaseNo, PlotNo -> compound PK
siteName and PhaseNo -> FK
My concern is how to do their indexes and not allow duplicates of a whole compound key in access! Can access do it and how?
Any suggestions will be very much appreciated.
B
I have searched on this forum about a solution to this and found out that 3 part compound keys are unwise although they are legal. Now, I am not sure how to design this database!
Basically, I need to store information about site (a big part of land), phase (a portion of site) and Plot (a portion of phase). Each record should represent a unique value of this three part combination. For example:
Record 1:
Site = Site1
Phase = 1
plot= 1
Record 2:
Site = Site1
Phase = 1
plot= 2
Record 3:
Site = Site1
Phase = 2
plot= 1
I have desinged three different tables since I need quite a number of relevant fields for each table. One table for site, another for phase and another one for plot.
I am thinking to have:
Site table -
siteName -> PK
Phase table -
siteName and PhaseNo -> compound PK
siteName -> FK
Plot table -
siteName, PhaseNo, PlotNo -> compound PK
siteName and PhaseNo -> FK
My concern is how to do their indexes and not allow duplicates of a whole compound key in access! Can access do it and how?
Any suggestions will be very much appreciated.
B