473,394 Members | 1,642 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Relationship question

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?

Thank you,

- Phil
Nov 13 '05 #1
2 1368
"Phil" <p.*****@comcast.net> wrote in message
news:ojJCc.176790$Ly.56856@attbi_s01...
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?


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.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
In message <2k*************@uni-berlin.de>, Rick Brandt
<ri*********@hotmail.com> writes
"Phil" <p.*****@comcast.net> wrote in message
news:ojJCc.176790$Ly.56856@attbi_s01...
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?


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.


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.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: H Cohen | last post by:
Hi, I have a corporate database with about 60 different tables that spans manufacturing, accounting, marketing, etc. It is possible, but unwieldy, to establish a relationship for each table...
2
by: Stewart Johnson | last post by:
Hey All - I'm stuck while trying to write a schema, hoping someone can provide me with a flash of inspiration. One of the elements I'm writing has two attributes, both of which are optional....
8
by: Andante.in.Blue | last post by:
Hello, I have just inherited a legacy Access 97 database. While going through it, I noticed something strange... its Relationships window (the one accessed by Tools --> Relationships) is almost...
2
by: William Bradley | last post by:
Some help with relationships would be appreciated. I have read up on them but am still a bit vague ... The tables are as follows: 1. Main table -- this holds information about a product we...
2
by: Larry R Harrison Jr | last post by:
I have an Access 97 database with 2 tables that have a one-many relationship. I have a SQL statement in the "one" table which I want to execute and insert 7 records into the "many" table, and I...
2
by: Marco Simone | last post by:
Hi, I have 4 tables, tblCompany, tblA, tblB and tblC. tblA, tblB and tblC contain same type of data, they should be in one table, but since there are many fields, I split it into 3 tables. Each...
3
by: Mason | last post by:
I have a table consisting of people and their attributes. I would like to create a relationship matrix table that records the relationships between the people. So the two tables would look...
1
by: Michael D. Reed | last post by:
I have two tables in an Access database with a Many-to-Many relationship, there is a connection table. The tables are , , and the connection table is this is a standard Many-to-Many relationship...
2
by: cspowart | last post by:
Consider first, table "A" : Plate Make Model ===================== ABC123 Ford F150 XYZ789 Dodge 1500 IJK444 Chev Silverado Then consider, table "B";
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.