Quiz 004 CS-352-LEC-1913T

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

7/31/2019 Quiz 004


Dashboard My courses CS-352-LEC-1913T Week 7: Integrity Constraints Quiz 004


Question 1 A type constraint that uniquely identifies each record in a

Answer saved database table and can be applied on one or more column.
Marked out of
 1.00 Select one:
a. Check

b. Unique
 c. Foreign key

d. Primary key

Clear my choice

Question 2 This is used to deactivate an integrity constraint.


Answer saved

Marked out of Select one:


1.00
a. DROP CASCADE

b. DISABLE CONSTRAINT

c. ENABLE CONSTRAINT

d. ON DELETE CASCADE

Clear my choice

Question 3 It is used to ensures that data values inside a database follow


Answer saved defines rules for values, range and format
Marked out of
1.00 Select one:
a. Not Null

b. Domain Intergrity

c. Entity Itegrity

d. Referential Itegrity

Clear my choice

Question 4 A type of constraint that is used to limit the value range that
Answer saved can be placed in a column.
Marked out of
1.00 Select one:
a. Check

b. Not Null

c. Default

d. Unqiue

Clear my choice

https://blended.amauonline.com/mod/quiz/attempt.php 1/3
7/31/2019 Quiz 004

Question 5 Which of the following statement is not true about Foreign Key
Answer saved constraint.
Marked out of
1.00 Select one:

a. A foreign key in one table points to a foreign key in
another table.

b. The foreign key constraint is used to prevent actions that
 would destroy links between tables.

c. Ensures that the relationship between tables remain


 preserved as data is inserted, deleted and modified

d. The foreign key constraint also prevents invalid data from


 being inserted into the foreign key column, because it has to
be one of the values contained in the table it points to.

Clear my choice

 Question 6 Which of the following is the correct example of adding a CHECK


Answer saved constraint where CODE should start with the character ‘BS’.
Marked out of
1.00 Select one:
a. CREATE TABLE COURSE(CODE CHAR(4) PRIMARY KEY,TITLE
VARCHAR(20),CONSTRAINT CODE_ck CHECK (CODE LIKE
‘%BS%’));

b. CREATE TABLE COURSE(CODE CHAR(4) PRIMARY KEY,TITLE


VARCHAR(20),
CONSTRAINT CODE_ck CHECK (CODE LIKE ‘BS%’));

c. CREATE TABLE COURSE(CODE CHAR(4) PRIMARY KEY,TITLE


VARCHAR(20),CONSTRAINT CODE_ck CHECK (CODE LIKE ‘%BS’));

d. CREATE TABLE COURSE(CODE CHAR(4) PRIMARY KEY,TITLE


VARCHAR(20),CONSTRAINT CODE_ck CHECK (CODE = ‘BS’));

Clear my choice

Question 7 This is used to delete child row when a parent key is deleted.
Answer saved

Marked out of Select one:


1.00
a. DROP CASCADE

b. DISABLE CONSTRAINT

c. ON DELETE CASCADE

d. ENABLE CONSTRAINT

Clear my choice

Question 8 This is used to delete a primary key constraint in a parent table


Answer saved and will automatically drop the foreign key constraint in the
Marked out of child table.
1.00

Select one:
a. DISABLE CONSTRAINT

b. ENABLE CONSTRAINT

c. DROP CASCADE

d. ON DELETE CASCADE

Clear my choice

https://blended.amauonline.com/mod/quiz/attempt.php 2/3
7/31/2019 Quiz 004

Question 9 A type of constraint that is used to insert a default value into a


Answer saved column.
Marked out of
1.00 Select one:

a. Default

 b. Check

c. Unqiue

d. Not Null

 Clear my choice


Question 10 Which of the following is the correct example of disabling an
 Answer saved integrity constraint?
Marked out of
 1.00 Select one:
a. ALTER TABLE STUDENTS
 DISABLE CONSTRAINT usn_pk;

b. ALTER TABLE STUDENTS


DISABLE usn_pk;

c. ALTER TABLE STUDENTS


MODIFY CONSTRAINT DISABLE usn_pk;

d. ALTER TABLE STUDENTS


DROP CONSTRAINT usn_pk;

Clear my choice

Stay in touch
AMA EDUCATION SYSTEM
 https://blended.amauonline.com/helpdesk

https://blended.amauonline.com/mod/quiz/attempt.php 3/3

You might also like