Referential integrity control attributes in a table - Database

Q.  What relationships does Referential integrity control?
- Published on 27 Aug 15

a. Attributes in a table
b. Operations of an object
c. Instances of a class
d. Tables in a database

ANSWER: Attributes in a table
 

    Discussion

  • Nirja Shah   -Posted on 02 Nov 15
    - Different tables in a relational database can be related by common columns, and the rules that govern the relationship of the columns must be maintained.

    - Referential integrity rules guarantee that these relationships are preserved.

    - The following terms are associated with referential integrity constraints.

    - Foreign key
    The column or set of columns included in the definition of the referential integrity constraint that reference a referenced key.

    - Referenced key
    The unique key or primary key of the same or different table that is referenced by a foreign key.

    - Dependent or child table
    The table that includes the foreign key. Therefore, it is the table that is dependent on the values present in the referenced unique or primary key.

    - Referenced or parent table
    The table that is referenced by the child table's foreign key. It is this table's referenced key that determines whether specific inserts or updates are allowed in the child table.

    - A referential integrity constraint requires that for each row of a table, the value in the foreign key matches a value in a parent key.

    - Foreign keys can be defined as multiple columns.

    - However, a composite foreign key must reference a composite primary or unique key with the same number of columns and the same datatypes.

    - Because composite primary and unique keys are limited to 32 columns, a composite foreign key is also limited to 32 columns.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)