D
dippy_x
Hi,
I've got a database design dilemma and was wondering if I could get
some thoughts on it.
I have a Goods table that tracks items that are imported from a country
and exported.
for Example a typical record reads:
[Import Country] -> [Export Country] -> [Description]
Britain -> USA -> Woodenbox
I have a table called country which lists all available country choices
and country codes.
I have [Import Country] set as the foreign Key / linked to the primary
key of the Country table. This works fine, as expected and as required.
My Dilemma comes from the [Export Country] field. The choices of
which are the exact same as the [Import Country] but access wont allow
me to define two relationships to the primary key of the country table
linking to different fields in the goods table. Only one or the other.
Whats the best way around this? Have a table each, ImportCountryList
and
ExportCountryList? It could be a nightmare keeping the tables the same
as when a new record's inserted into one I have to ensure its inserted
into the other etc. This leads to data repetition (bad) etc which is
making me think I'm going about this the wrong way. Ideally I would
like referential Integrity for both field in the Goods table (Import
Country and Export Country).
I'm hoping there's something simple I'm overlooking...
Thanks
Asi
I've got a database design dilemma and was wondering if I could get
some thoughts on it.
I have a Goods table that tracks items that are imported from a country
and exported.
for Example a typical record reads:
[Import Country] -> [Export Country] -> [Description]
Britain -> USA -> Woodenbox
I have a table called country which lists all available country choices
and country codes.
I have [Import Country] set as the foreign Key / linked to the primary
key of the Country table. This works fine, as expected and as required.
My Dilemma comes from the [Export Country] field. The choices of
which are the exact same as the [Import Country] but access wont allow
me to define two relationships to the primary key of the country table
linking to different fields in the goods table. Only one or the other.
Whats the best way around this? Have a table each, ImportCountryList
and
ExportCountryList? It could be a nightmare keeping the tables the same
as when a new record's inserted into one I have to ensure its inserted
into the other etc. This leads to data repetition (bad) etc which is
making me think I'm going about this the wrong way. Ideally I would
like referential Integrity for both field in the Goods table (Import
Country and Export Country).
I'm hoping there's something simple I'm overlooking...
Thanks
Asi