6ftAndClean
Programmer
I have a 3 tables (Wards, Areas & Streets) which have the following relationship:
"Wards" "Areas" "Streets"
Ward ID ------ Ward ID Ward ID
Ward Area ID ------ Area ID
other fields Key Street Identifier
other fields
The problem is that I am trying to avoid the field 'Area ID' in the table 'Areas' being an AutoNumber primary key by which I link the group of streets occuring in that area (thus the inclusion of a seperate field 'Key'to be a primary key).
The reason for this is that there are around 20 Ward records and around 25 Area records per Ward. I would like to be able to utilise the Area ID to refer to as I input data from my mapping software. In other words for each Ward the Areas within it should be numbered 1 upwards. How can I do this and still be able to correctly select the right streets for an area? I had wondered if using some sort of concatenation of 'Ward ID' and 'Area ID' would help to form a workable primary key but I can't see how to implement this.
e.g.
"Wards" "Areas" "Streets"
Ward ID ------ Ward ID
Ward Area ID
other fields Concatenated Key -- Concatenated Key
Key Street Identifier
other fields
If 'Ward ID' = 01 and 'Area ID' = 15 'Concatenated Key' would be 0115 (Access would shorten this to 115 but that should not present any particular problems). I can easily append the concatenated number to the data as I import it to Access.
Thanks for your help.
"Wards" "Areas" "Streets"
Ward ID ------ Ward ID Ward ID
Ward Area ID ------ Area ID
other fields Key Street Identifier
other fields
The problem is that I am trying to avoid the field 'Area ID' in the table 'Areas' being an AutoNumber primary key by which I link the group of streets occuring in that area (thus the inclusion of a seperate field 'Key'to be a primary key).
The reason for this is that there are around 20 Ward records and around 25 Area records per Ward. I would like to be able to utilise the Area ID to refer to as I input data from my mapping software. In other words for each Ward the Areas within it should be numbered 1 upwards. How can I do this and still be able to correctly select the right streets for an area? I had wondered if using some sort of concatenation of 'Ward ID' and 'Area ID' would help to form a workable primary key but I can't see how to implement this.
e.g.
"Wards" "Areas" "Streets"
Ward ID ------ Ward ID
Ward Area ID
other fields Concatenated Key -- Concatenated Key
Key Street Identifier
other fields
If 'Ward ID' = 01 and 'Area ID' = 15 'Concatenated Key' would be 0115 (Access would shorten this to 115 but that should not present any particular problems). I can easily append the concatenated number to the data as I import it to Access.
Thanks for your help.