Professional Documents
Culture Documents
Database: University of Management and Technology
Database: University of Management and Technology
Spring 2020
Database Systems SE370/CS370/CC2141/CC2421W/XI533
(4 Credits Hours)
DATABASE
Assignment: 1
UNIVERSITY OF MANAGEMENT AND TECHNOLOGY
Spring 2020
Database Systems SE370/CS370/CC2141/CC2421W/XI533
(4 Credits Hours)
Q1. In the lecture, we have seen the following ways to ensure consistency in a
database: NOTNULL , UNIQUE, PRIMARYKEY , FOREIGNKEY ,
CHECK, and DEFAULT. Fill in the following grid answering which of these
applies to which use case. Mark cases that apply with an “Tick symbol”.
Explain why.
Consistency Keyword
NOT PRIMARY FOREIGN DEFAULT
UNIQUE CHECK
NULL KEY KEY
Ensure referential consis-
tency between relations.
Enforce that each row has
some attribute.
Limit the domain of values
that can be stored in an
attribute.
Enforce a constraint based
on the content of a differ-
ent table.
Enforce a constraint based
on two different attributes.
Uniquely identify records.
Q2. Are the following statements true or false? Place a checkmark in the
correct ones.
In principle a CHECK constraint could be added to a table that makes it
impossible to insert any data. ( TRUE )