A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

2 tables with referential integrity



 
 
Thread Tools Display Modes
  #11  
Old May 3rd, 2009, 01:21 AM posted to microsoft.public.access.tablesdbdesign
Angela
external usenet poster
 
Posts: 232
Default 2 tables with referential integrity

If you choose a one-to-many relationship and select the join property
"Include ALL records from Contacts and only those records from Orgs where the
joined fields are equal", wouldn't that allow you to have records in Contacts
without corresponding records in Orgs? Are you saying that if you choose
"Only include records where the joined fields in both tables are equal", but
there are null entries in the joined field in Contacts, you can avoid having
a related record in Orgs?

And I have a general "newbie" question: If one doesn't need to enforce
referential integrity, is there any benefit to creating these table
relationships?

"Jeff Boyce" wrote:

Jacquie

I believe that if you tell Access to enforce referential integrity between
those two, you're telling it that you cannot have a Contact record without a
corresponding Org record.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jacquie" wrote in message
...
I have 2 tables with referential integrity: contacts and orgs. it's a
many-to-one, with many contacts connected to one org. however, I also have
some contacts with no org, but when I try to add them, access tells me I
have
to have an org to proceed. BUT THERE IS NO ORG!! org is not required in
the
contacts table. what do I have to do? Thanks!!




  #12  
Old May 3rd, 2009, 12:12 PM posted to microsoft.public.access.tablesdbdesign
Graham Mandeno
external usenet poster
 
Posts: 593
Default 2 tables with referential integrity

Hi Angela

As far as I know, changing the join property to "Include ALL the records
from..." has no effect whatsoever on the actual relationship or on
relational integrity. It simply means that whenever you add those two
tables to a query in design view, the join is created, by default, as an
OUTER join (with an arrow on one end), not as an INNER join.

As I said in another post, RI does not prevent you having a null value in
the foreign key of the many-side table, no matter what the join type.

And for your "newbie" question, I believe you would gain some advantage in
speed of queries with a non-RI relationship, but I can't confirm that for
certain. Personally, I find that relationships where RI is not appropriate
are *extremely* rare.

--
Good Luck :-)

Graham Mandeno [Access MVP]
Auckland, New Zealand

"Angela" wrote in message
...
If you choose a one-to-many relationship and select the join property
"Include ALL records from Contacts and only those records from Orgs where
the
joined fields are equal", wouldn't that allow you to have records in
Contacts
without corresponding records in Orgs? Are you saying that if you choose
"Only include records where the joined fields in both tables are equal",
but
there are null entries in the joined field in Contacts, you can avoid
having
a related record in Orgs?

And I have a general "newbie" question: If one doesn't need to enforce
referential integrity, is there any benefit to creating these table
relationships?

"Jeff Boyce" wrote:

Jacquie

I believe that if you tell Access to enforce referential integrity
between
those two, you're telling it that you cannot have a Contact record
without a
corresponding Org record.

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Jacquie" wrote in message
...
I have 2 tables with referential integrity: contacts and orgs. it's a
many-to-one, with many contacts connected to one org. however, I also
have
some contacts with no org, but when I try to add them, access tells me
I
have
to have an org to proceed. BUT THERE IS NO ORG!! org is not required in
the
contacts table. what do I have to do? Thanks!!






  #13  
Old May 4th, 2009, 02:30 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default 2 tables with referential integrity

About once a month I get an intelligent thought and that just happenned to be
the day. My thinking originally got derailed by accepting the "can't add
records due to referential integrity" premise as categorically true.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.