473,396 Members | 1,966 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,396 software developers and data experts.

Many to Many Relationships- How far is too far?

hello everybody,

i know this is a very long post, but i wanted to provide as much
detail as possible.

quick overview- i want to create a couple of many to many
relationships and am wondering how many relationships to create. i am
also trying to figure out what relationships to create.
there is one huge table that i need to breakup into several tables.

the table i need to split into multiple tables is called case.

two of the new tables i want to create are called issues and outcomes.
right now, the fields that store these data are part of the table,
case.

for example, the table, case, has the following fields-

caseid = primary key
issue1
issue2
issue3
outcome1
outcome2
outcome3
etc...

i want to replace the issue fields and the outcome fields with tables.
i'm thinking about creating a many to many relationship between case
and issue and a many to many relationship between case and outcomes.
so, i'll create a bridge table for each many to many relationship.

for example, i'll create a bridge table between the tables case and
issue named caseissue. the table, case, has caseid as a primary key,
and the table, issue, has issueid as a primary key. so, my bridge
table, caseissue, will have caseid and issueid as a double primary
key.

i'm also considering creating a bridge table between the tables case
and outcome named caseoutcome. the table, case, has caseid as a
primary key, and the table, outcome, has outcomeid as a primary key.
so, my bridge table, caseoutcome, will have caseid and outcomeid as a
double primary key.
i have a form, caseentry, that returns all of the related data, i.e.
caseid, issue1, issue2, issue3, outcome1, outcome2, outcome3, etc...
if i create these many to many relationships, i suppose that i'll have
to link them to my main form, caseentry, through 2 subforms. one
subform for the many to many relationship between case and issue and
one subform for the many to many relationship between case and
outcome.

BUT i'd like to link the table, issue, with the table, outcome.

so, do i need to create a many to many relationship between issues and
outcomes? or will my bridge tables between my many to many
relationships between case and issue and between case and outcome be
sufficient to determine which outcomes are associated with an issue or
issues?

here is an overview of what i want to do...

1. i want to have a form, caseentry, that can be used to both enter
data and display a record.

2. i want to have 3 combo boxes for the user to select an issue from.
each issue will be unique. the user can only select an issue once, but
he or she can select 3 issues or less. so, only those issues selected
will be saved in bridge table, caseissue. i also want to be able to
display the previously selected issues when a user looks at the
records. this is one of the reasons why i want to remove the multiple
issue fields from the table, case; so that only those issues selected
will be saved. in the inherited database, those extra fields in the
table, case, will be unused or blank and be a waste of memory.

3. i also want to have a similar setup for the outcomes- 3 combo boxes
that the user can select outcomes from and will display the previously
chosen outcomes.

4. i want the issues to be linked to the outcomes. for example, i can
create a query to return all of the outcomes that are associated with
a particular issue or issues.
thanks a lot for your time and effort reading my post. i look forward
to reading your suggestions. thanks again.

megan
Nov 12 '05 #1
2 2655
me**************@hotmail.com (Megan) wrote in
news:5c**************************@posting.google.c om:
hello everybody,

i know this is a very long post, but i wanted to provide as
much detail as possible.

quick overview- i want to create a couple of many to many
relationships and am wondering how many relationships to
create. i am also trying to figure out what relationships to
create.
i have a form, caseentry, that returns all of the related
data, i.e. caseid, issue1, issue2, issue3, outcome1, outcome2,
outcome3, etc... if i create these many to many relationships,
i suppose that i'll have to link them to my main form,
caseentry, through 2 subforms. one subform for the many to
many relationship between case and issue and one subform for
the many to many relationship between case and outcome.

BUT i'd like to link the table, issue, with the table,
outcome.

Actually, IMHO, you only need one table for issue and (each
issue's) outcome. In my view, every issue needs to be resolved
before a case can be closed. Therefore keeping the pair in the
same table seems to be a good way to ensure this.

so, do i need to create a many to many relationship between
issues and outcomes? or will my bridge tables between my many
to many relationships between case and issue and between case
and outcome be sufficient to determine which outcomes are
associated with an issue or issues?

I believe that one to one between issue and outcome is
sufficient. Occasionally you will close an issue by referring to
the outcome of another issue in the same case.

here is an overview of what i want to do...

1. i want to have a form, caseentry, that can be used to both
enter data and display a record.

2. i want to have 3 combo boxes for the user to select an
issue from. each issue will be unique. the user can only
select an issue once, but he or she can select 3 issues or
less. so, only those issues selected will be saved in bridge
table, caseissue. i also want to be able to display the
previously selected issues when a user looks at the records.
this is one of the reasons why i want to remove the multiple
issue fields from the table, case; so that only those issues
selected will be saved. in the inherited database, those extra
fields in the table, case, will be unused or blank and be a
waste of memory.
What if your case has four issues? So a much better way would be
to design the form with a continuous forms subform that shows all
the issues for that case, and the outcome of that issue. You will
only need a single combobox to choose the issue, not the three,

3. i also want to have a similar setup for the outcomes- 3
combo boxes that the user can select outcomes from and will
display the previously chosen outcomes.
See above.
4. i want the issues to be linked to the outcomes. for
example, i can create a query to return all of the outcomes
that are associated with a particular issue or issues.
thanks a lot for your time and effort reading my post. i look
forward to reading your suggestions. thanks again.
Good luck.
megan


Nov 12 '05 #2
RE/
quick overview- i want to create a couple of many to many
relationships and am wondering how many relationships to create. i am
also trying to figure out what relationships to create.

for example, the table, case, has the following fields-

caseid = primary key
issue1
issue2
issue3
outcome1
outcome2
outcome3
etc...


I'd think you would want a couple of one-to-many relationships.

Viz:

1 Case has
Many Issues
1 Issue has
Many Outcomes.
Put another way,
tblCase (pk=CaseID)
tblIssue (pk=IssueID, fk=CaseID)
tblOutcome (pk=OutcomeID, fk=IssueID)

In practice, maybe one Issue always has only one outcome...but it seems making
it a 1:many wouldn't cost anything and if somebody wanted many outcome records
(e.g. maybe a log of actions on an issue as they occur) it wouldn't break the
architecture.
--
PeteCresswell
Nov 12 '05 #3

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

Similar topics

0
by: Morten Gulbrandsen | last post by:
Hello, starting from some software database spesification, defined in some Enhanced entity relationship diagram, resulting in all kinds of relationships, 1:1 1:Many Many:1
3
by: Mikey | last post by:
Hi all. In the process of trying to figure this thing out, I've been doing the old "stand around in the store and read as much as possible before you look like a derelict" thing. This time, with...
1
by: ning | last post by:
It's easy to present "One - Many" relationship in XML, but how to present "Many - Many" relationship in XML?
1
by: Powell | last post by:
I have a requirement to return some information from a large number of xml files I have tried XSLT, which quickly gets overwhelmed. Found references to XQuery and it seems like it might work I...
1
by: Johnny Meredith | last post by:
Hi, I'm building a database that, once a year, generates surveys that are emailed to people in our organization. The recipients of the surveys are managers of various departments. The emails...
3
by: ChasW | last post by:
I have a database with multiple tables. I want to query all tables that have a match for a specified field value. Each of the tables may have duplicate values for this field. From what I have...
2
by: The Frog | last post by:
Hello everyone, I am trying to find way of writing an SQL query that can produce missing record combinations across a many to many type setup in Access. The three tables used are as follows:...
4
by: Jia Lu | last post by:
Hi all I see dict type can do 1-to-1 pattern, But is there any method to do 1-to-many, many-to-1 and many-to-many pattern ? What about using some Serialized objects? Thanks.
0
by: fred.flintstone | last post by:
I get warnings in the windows event viewer every few seconds.. See below. Why is this ? Event Type: Warning Event Source: DB2-0 Event Category: None Event ID: 5 Date: 22/08/2007...
6
by: Ken Gardiner | last post by:
Hi Everyone, I am working on a project that seems to need two many to many relationships. I'm having the hardest time figuring out the best way to create a form that will work well for entering...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.