473,587 Members | 2,527 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error 3386: Relationships Must Be on Same Number of Fields

Hi Everybody-

I know that this is a really, really long post, but I wanted to try to
give you as much background as possible.

So here's a quick overview of the issues I'm asking for help with:

1.) I'm trying to create a many to many relationship, and I get the
following Error when I try to enforce referential integrity.

Error 3386: Relationships must be on the same number of fields with
the same data types.

2.) I need some advice on creating some Tables and Relationships.
Each CASE can have one or more ISSUES. Therefore, I created a Bridge
Entity/ Table called CASE_ISSUE.
Each ISSUE can have one and only one DECISION.
But each DECISION can be associated with one or more ISSUES.
So, I created a Bridge Entity/ Table called ISSUE_DECISION.

For example:

A CASE can have the ISSUEs, Age Discrimination and Illegal Drug Use.

A CASE can have the ISSUE, Sexual Harassment.
The ISSUE, Age Discrimination, can have the DECISION, Guilty or Not
Guilty.

The ISSUE, Illegal Drug Use, can have the DECISION, Guilty or Not
Guilty.

The ISSUE, Sexual Harassment, can have the DECISION, Guilty or Not
Guilty.
The DECISION, Guilty or Not Guilty, can be associated with any of the
ISSUEs, Age Discrimination, Illegal Drug Use, or Sexual Harassment.
Each ISSUE has one DECISION. But a DECISION can be associated with one
or more ISSUES.

Right now, I've got a table, ISSUE, listing over 100 different issues.
I've also got a table, DECISION, that lists the 20 decisions that can
be applied to those issues.

Maybe I've got my relationships messed up. Right now, I've got a many
to many relationship between ISSUE and DECISION with the bridge table,
ISSUE_DECISION.

Maybe I need a one to many relationship between DECISION and ISSUE?
But if I do that, then I'll need to add the attribute, DecisionID, to
the ISSUE table, right?

BUT...I'm using combo-boxes to display the descriptions of the Issues
and Decisions. These combo-boxes are linked to the tables, ISSUE and
DECISION, to retrieve the descriptions.

Here's where I'm going...

CASE table:
CaseID (Autonumber & Primary Key)
LastName
FirstName
Other attributes...

CASE_ISSUE
CaseID (Number & Primary Key)
IssueID (Number & Primary Key)
NOTE: I'm thinking about creating a New Primary Key called
"Case_Issue " instead of having CaseID and and IssueID as the Composite
Primary Key (Is this the correct term?)

ISSUE table:
IssueID (Number & Primary KEY)
IssueDescriptio n (Text)

DECISION table:
DecisionID (Number & Primary Key)
DecisionDescrip tion (Text)

ISSUE_DECISION table:
IssueDecisionID (Autonumber & Primary Key)
CaseID
IssueID (Foreign Key to ISSUE table)
DecisionID (Foreign Key to DECISION table)

When I try to create a one to many relationship between the ISSUE
table and ISSUE_DECISION table by dragging "IssueID" from
ISSUE_DECISION to ISSUE, I get "ERROR 3386: Relationships must be on
the same number of fields with the same data types."

Well, maybe I should give you some examples of what the tables look
like with sample data in them.

*************** *************** *************** *************** *************** **

CASE table:

*CaseID* LastName FirstName
100 Simpson Jessica
200 Lachey Nick
300 Trump Donald

ISSUE table:

*IssueID* IssueDescriptio n
1 Age
2 Sexual Harassment
3 Drugs

CASE_ISSUE table:

*CaseID* *IssueID*
100 1
100 3
300 2
300 3

DECISION table:

*DecisionID* DecisionDescrip tion
10 Guilty
20 Not Guilty
30 Compliance
40 Non-Compliance

ISSUE_DECISION table

*IssueDecisionI D* CaseID IssueID DecisionID
1 100 1 20
2 100 3 30
3 300 2 10
4 300 3 40

*************** *************** *************** *************** *************** **

NOTE: I have a many to many relationship between the tables, CASE and
ISSUE, with the Bridge table, CASE_ISSUE. I CAN create the one to many
relationships here.

When I drag CASE_ISSUE.Case ID to CASE.CaseID, I CAN click "Enforce
Referential Integrity," and when I drag CASE_ISSUE.Issu eID to
ISSUE.IssueID, I CAN ALSO click "Enforce Referential Integrity."

BUT When I try to drag ISSUE_DECISION. IssueID to ISSUE.IssueID and
click "Enforce Referential Integrity", I get the "ERROR 3386:
Relationships must be on the same number of fields with the same data
type."

OR when I try to drag ISSUE_DECISION. DecisionID to DECISION.Decisi onID
and click "Enforce Referential Integrity", I get the "ERROR 3386:
Relationships must be on the same number of fields with the same data
type."

Questions:

1.) Do I need to create the Relationships before I populate the Tables
with data? But my tables: CASE, ISSUE, and CASE_ISSUE have data in
them, and I can create the relationships and "Enforce Referential
Integrity>"

2.) Why do I get this Error in some circumstances and not others?

3.) What kind of relationship should I create between ISSUE and
DECISION? Right now, each table provides the data for combo-boxes that
the user can select the Issue and Decision from.

Thanks for reading this post!!! I know it is really, really long! I
just wanted to try to give you as much background as possible.

I truly appreciate your TIME and EFFORT!

Megan
Nov 12 '05 #1
0 5467

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

Similar topics

0
2721
by: Frances | last post by:
Hi All, I'm having a problem trying to add a record to a simple Access 2000 db (db is very similar to an address book but with more info than the usual address, phone, etc.). The database is one table, 36 fields. The record_id field is an autonumber field (long int) and primary key. The rest of the fields comprise of 30 text fields, 3...
6
1945
by: Chuck Van Den Corput | last post by:
I have an application with one main table with a jillion attributes. There are numerous other tables, but these are either children of the main table or lookup tables. I am finding that I am using up all my indices on the main table to support the relationships with all the child and lookup tables. My question is this: would anyone...
0
1481
by: Megan | last post by:
Hi Everybody- I know that this is a really, really long post, but I wanted to try to give you as much background as possible. So here's a quick overview of the issues I'm asking for help with: 1.) I'm trying to create a many to many relationship, and I get the following Error when I try to enforce referential integrity.
2
4125
by: Max | last post by:
Hi. I really hope someone can help me. Going slowly insane with this problem. I have a two Access 2000 databases. One is the backend containing tables and some admin queries. The other is the front end with forms / queries and links to the tables in the back end. From the Relationships window I selected File / Print Relationships. The...
4
2130
by: Bri | last post by:
Hi, First let me explain the process I have going on, then I'll address the problems I'm having: 1) Insert records in a temp table using a query 2) Using a query that joins the temp table with TableA Insert records into TableB 3) Delete records from temp Table 4) Table specs; temp Table - 4 fields, 3 indexes, gets 100-4500 records...
7
2120
by: davegb | last post by:
I'm totally new to relational database design. My boss has asked me to create a database of information on the employees in our group. Seemed to me like a simple application to learn the ropes. A couple of things are confusing me. The first is "Relationships" and "Joins". Are they different names for the same thing? If not, what is the...
5
1855
by: Kosmos | last post by:
Hey :) hopefully someone can help me with this...I decided to take on the task of programming an access database for my legal co-op/internship...I'm studying law and music production on the side...most of the background I have in programming has to do with music production... The program I'm creating pulls data from an excel sheet (with...
2
3397
by: HNewt | last post by:
Access Error #2335 Access 2003. OS: Win XP Pro For a client I have created a database to track customers details and purchases. I have designed a form for data entry, the form is tabbed, the first tab is Clients Details, the second is purchase details. I have used one subforms to allow entry of date and amount, and to show the history...
3
2072
ebs57
by: ebs57 | last post by:
I am looking for some basic help in understanding and setting up table relationships in Access. I've created one table called PROJECTS and it has the field JobNo which I've declared as the key field. It also contains such fields as Rep, Date, Descrip and so on. I also have another table called DETAILS and it contains the following fields: ...
1
1230
by: David Fairbrother | last post by:
Hiya folks, I'm trying to put together a database for student involvement in school sport activities. I'm not exactly what you'd call "proficent" in Access, so my apologies if I'm making some very stupid or obvious error. I have three tables. I have Students2, which contains the fields: Student No (primary key) Surname
0
7920
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7849
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8347
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7973
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3844
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.