"referential-integrity" explained by outer join, subset

see posts on “unmatched prikey”

DB designers often create healthy subset relationships between Table A’s prikey and Table B’s forkey. Any forkey’s #1 purpose is a join column. Subset => outer join.

Why prikey is never a subset of forkey? Such a freak subset means one of the forkey entries is unmatched in the prikey column — breaking referential integrity.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s