Constraints
Constraints protect the database from errors. It puts restrictions on database state. Types of Constraints in Relational Model Domain Constraint Key Constraint Entity Integrity Constraint Referential Integrity Constraint Types of Constraints that cannot be captured in relational model Semantic Constraints (Business Rules) eg : Buy one get one free Domain Constraint Value of each attribute in a tuple must be atomic (no repeating values) and consistent with its domain(data type). It could be null if allowed. Key Constraint key constraint specifies that the values in the column declared as a primary key must be unique. Types of keys Candidate Key A relation has several keys referred to as candidate keys.but one candidate key is unique. it is called the prima...
Comments
Post a Comment