Data Models into Database Designs - Technical MCQs

Q1:

Which of the following data constraints would be used to specify that the value of a cell in one column must be less than the value of a cell in another column in the same row of the same table?

A A domain constraint

B A range constraint

C An intrarelation constraint

D An interrelation constraint

ANS:C - An intrarelation constraint

An intrarelation constraint limits the values of a column by a comparison to the values of another column in the same table. For example, a column named ProjectEndDate could be limited to a date that is later than the value of ProjectStartDate in the same row.

An interrelation constraint limits the values of a column by a comparison to the values of another column in a different table. For example, a column named WorkerOnProjectStartDate in the WORKER-ASSIGNMENT table could be limited to a date that is later than the value of ProjectStartDate in the PROJECT table for the corresponding project.