BMGT 402 Lecture Notes - Lecture 4: Data Domain, Referential Integrity, Data Integrity

176 views2 pages

Document Summary

Most used: char, varchar, integer, decimal, float, single, double, date. 5 types of integrity constraints: required data, domain constraints, entity integrity, referential integrity, general constraints. Drop domain domainname [restrict | cascade] restrict = no action. Pk of a table must contain a unique and non-null value for each row. Definition of a pk w/primary key clause in create table statements: Primary key (clientno, propertyno) 1 key with 2 attributes. Can only have 1 primary key clause per table. But alternate keys aks can still be unique using unique: Foreign key (fk) is column or columns that links each row in the child table to a row of parent table containing the matching pk | ak. If fk contains a value, that value must refer to an existing row in a parent table! If the foreign key and primary key are the same name then you can omit the second one.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents