| re: Relationship question
In message <2k1868F17akosU1@uni-berlin.de>, Rick Brandt
<rickbrandt2@hotmail.com> writes[color=blue]
>"Phil" <p.mentz@comcast.net> wrote in message
>news:ojJCc.176790$Ly.56856@attbi_s01...[color=green]
>> I am learning Access, and have one question on relationships. How does one
>> handle establishing a relationship that could be one-to-many, going either
>> way between two tables? Example: One table lists home addresses. Another
>> table lists kinds of correspondence (letters sent). There is a 3rd table
>> with letter information (date, topic, etc.). There could be 100 addresses
>> in one table and 10 kinds of letters in another table. There could be one
>> kind of letter going to many addresses, or, one address receiving many kinds
>> of letters. How is this dealt with? Or is this problem evidence that
>> something is not set up right with the tables?[/color]
>
>What you're describing is a Many-To-Many relationship and it requires a third
>table where each record is a combination of Primary Keys from your current
>tables.[/color]
When you need to create a link table it's worth taking some time to look
closely at the data structure. Quite often those link tables correspond
to some real-world object and you find that they need more fields than
just the keys of the other tables involved.
--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money. |