Integrity Constraints

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

CASCADE

-Cascaded Delete: Deleting a customer ID in the Customer_T table will result in that value of customer ld being deleted in the Order T table -Cascaded Update: Changing a customer ID in the Customer_T table will result in that value changing in the Order_T table to match

Referential Integrity

-Rule that maintains consistency among the rows of two relations. -The rule states that if there is a foreign key in one relation, either -the foreign key must match a primary key another relation or -foreign key must be null

Foreign Key Options

>ON UPDATE, ON DELETE -RESTRICT / NO ACTION -CASCADE -SET NULL -SET DEFAULT (not supported in MySQL)

Domain Constraint

A domain definition usually consists of the following: -Attribute name -Meaning -Data type -Size -Allowable value or allowable range

SET DEFAULT (not supported in MySQL)

Delete Set Default : When customer ID is deleted from Customer_T, any customer ID in the Order_T table that matches the old customer ID is set to a predefined default value.

SET NULL

Delete. Set Null : When a customer ID is deleted in Customer_T, any customer ID in the Order_T table that matches the old customer ID is set to NULL

Integrity Constraints

Maintains accuracy and integrity of data in the database -Entity Integrity -Domain Constraint -Referential Integrity

Entity Integrity

Rule designed to ensure that every relation has a primary key

RESTRICT / NO ACTION

is the same as omitting the ON DELETE or ON UPDATE clause.


Set pelajaran terkait

Business Law I Final Exam Olivet Nazarene University

View Set

Practice Perfect Square Roots 1-625

View Set

SQL Database Fundamentals - Regional 2016

View Set

RN adult medical surgical online practice 2019 B with NGN

View Set

Study Set 3 (12, 14, 15, 18, 21)

View Set