Referential Integrity

B

Bryan

What happens when you enable referential integrity, but don't enable cascade
update or delete?
 
K

Ken Sheridan

You cannot insert a row into the referencing (man-side) table unless a
matching row exists in the referenced (On-side) table. Conversely you can't
delete a row from the referenced table until all matching rows have first
been deleted from the referencing table.

If you use 'natural' keys rather than a surrogate autonumber primary key for
the referenced table then you can't change the value of the key column in a
row in the referenced table if there are any matching rows in the referencing
table.

Ken Sheridan
Stafford, England
 
T

Tony Toews [MVP]

Bryan said:
What happens when you enable referential integrity, but don't enable cascade
update or delete?

To add to Ken's comment if you use autonumber primary keys, which I
always do then cascade update makes no sense as the primary key will
never change.

I have an intense dislike for cascade deletes in Microsoft Access.
And I don't like cascade updates.
http://www.granite.ab.ca/access/cascadeupdatedelete.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
A

aaron.kempf

RI doesn't work in Jet.. because you can't specify RI between front
end and back end, or with multple backends.

Move to SQL Server if you want RI.. and if there's something that RI
won't do, then move to TSQL triggers
 
A

aaron.kempf

Tony;

you have an intense dislike for anyone that has any different opinion
than you.

You're egocentric and obsolete... and you're uneducated.

so so so so sorry that the one upsizing you attempted didn't work out
for you.. Maybe you should have grown a backbone and learned to use
SQL Server.. instead of remaining stuck in the first grade of the
database world. (and insisting that everyone else in the whole wide
world remains stuck with you in the first grade also).

**** YOU AND JET.

I use ADP, SQL Server kicks ass.. it never corrupts.. and I can
automate code via SQL Agent.
Better yet-- I can put logic in QUERIES, including .NET-- and with
Jet, you can't even call VBA from a webpage

-Aaron
 
T

Tony Toews [MVP]

RI doesn't work in Jet.. because you can't specify RI between front
end and back end,

Why on earth would you want RI between a FE and a BE? You don't put
any tables in a FE. Also a FE, obviously, respects the RI already
present in the BE.
or with multple backends.

Multiple BEs are very, very seldom required so that part of your
answer is also quite useless.
Move to SQL Server if you want RI.. and if there's something that RI
won't do, then move to TSQL triggers

Nonsense.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

you have an intense dislike for anyone that has any different opinion
than you.

Not at all.
You're egocentric and obsolete...
No.

and you're uneducated.

That is true. I do not have a degree or college certificate of any kind. I do have
one year of university which doesn't count as I already knew the material in the
first year computer course better than the instructor. I've taken, umm, maybe two
three day courses in my professional career.
so so so so sorry that the one upsizing you attempted didn't work out
for you..

You still repeating that lie?
F*** YOU AND JET.

BTW my page on why I dislike cascading deletes and updates is completely valid in SQL
Server as well. Assuming you are using autonumber of course. Identity column in SQL
Server.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top