Relational model: Difference between revisions

Content deleted Content added
Line 38:
 
==== Foreign keys ====
{{main|Foreign key}}
 
A ''foreign key'' is a subset of attributes ''{A}'' in a relation ''R<sub>1</sub>'' that corresponds with a key of another relation ''R<sub>2</sub>'', with the property that the [[Projection (relational algebra)|projection]] of ''R<sub>1</sub>'' on ''{A}'' is a subset of the projection of ''R<sub>2</sub>'' on ''{A}''. In other words, if a tuple in ''R<sub>1</sub>'' contains values for a foreign key, there must be a corresponding tuple in ''R<sub>2</sub>'' containing the same values for the corresponding key.<ref name="professionals"/>{{rp|34}}