Oracle 11G SQL 2nd Edition By Joan Casteel – Test bank

 

 

To Purchase this Complete Test Bank with Answers Click the link Below

 

https://tbzuiqe.com/product/oracle-11g-sql-2nd-edition-by-joan-casteel-test-bank/

 

If face any problem or Further information contact us At tbzuiqe@gmail.com

 

Sample Questions

 

 

Chapter 4: Constraints
TRUE/FALSE
1. Constraints are rules used to enforce business rules, practices, and policies.
ANS: T

PTS: 1

REF: 100

2. Constraints are used to ensure the accuracy and integrity of the data contained in the database.
ANS: T

PTS: 1

REF: 100

3. A constraint can only be created as part of the CREATE TABLE command.
ANS: F

PTS: 1

REF: 102

4. A constraint name can consist of up to 10 characters.
ANS: F

PTS: 1

REF: 101

5. A primary key is usually given the abbreviation _pk in the constraint name if the name is assigned
by the user.
ANS: T

PTS: 1

REF: 101

6. Any constraint can be created at the table or the column level.
ANS: F

PTS: 1

REF: 102

7. A foreign key constraint can only be created at the column level.
ANS: F

PTS: 1

REF: 102

8. A NOT NULL constraint can only be created at the column level.
ANS: T

PTS: 1

REF: 102

9. A constraint for a composite primary key must be created at the table level.
ANS: T

PTS: 1

REF: 103

10. The CONSTRAINT keyword is required if the user is going to assign a name to a constraint.
ANS: T

PTS: 1

REF: 102

11. A constraint is always enforced at the table level.
ANS: T

PTS: 1

REF: 102

12. The table level approach can be used to create any constraint, except a CHECK constraint.
ANS: F

PTS: 1

REF: 102

1

13. A PRIMARY KEY constraint will make certain the column designated as the primary key does
not contain a NULL value.
ANS: T

PTS: 1

REF: 103

14. The MODIFY clause is used with the ALTER TABLE command to add a PRIMARY KEY
constraint to an existing table.
ANS: F

PTS: 1

REF: 103

15. Only one PRIMARY KEY constraint can exist for each table.
ANS: T

PTS: 1

REF: 103

16. A FOREIGN KEY constraint can be added to the column of a table to ensure that the referenced
data value actually exists in the other table.
ANS: T

PTS: 1

REF: 106

17. If a FOREIGN KEY constraint exists, then a record cannot be deleted from the parent table if that
row is referenced by an entry in the child table.
ANS: T

PTS: 1

REF: 108

18. A FOREIGN KEY constraint will not allow a row containing a NULL value in the foreign key
column to be added to the table.
ANS: F

PTS: 1

REF: 106

19. A UNIQUE constraint is the same as a PRIMARY KEY constraint, except that it will accept
NULL values.
ANS: T

PTS: 1

REF: 111

20. A CHECK constraint requires that a data value meet a certain condition before the record is added
to the database table.
ANS: T

PTS: 1

REF: 112

21. The SYSDATE can be used as a condition in a CHECK constraint.
ANS: F

PTS: 1

REF: 112

22. A constraint can be added to a table after the table has been populated with data even if the
existing data violates the constraint.
ANS: F

PTS: 1

REF: 113

23. A NOT NULL constraint is a special FOREIGN KEY constraint.
ANS: F

PTS: 1

REF: 114

2

24. With the exception of the NOT NULL constraint, constraints can be added to a table using the
ADD clause of the ALTER TABLE command.
ANS: T

PTS: 1

REF: 102

25. Each column can only be included in one constraint.
ANS: F

PTS: 1

REF: 120

26. In the USER_CONSTRAINTS view, the constraint type for a PRIMARY KEY constraint will be
listed as PK.
ANS: F

PTS: 1

REF: 120

27. The ALTER TABLE command can be used to disable a constraint.
ANS: T

PTS: 1

REF: 122

28. The ALTER TABLE command with the ENABLE clause can be used to enable a constraint.
ANS: T

PTS: 1

REF: 122

29. A constraint can be renamed using the ALTER TABLE command.
ANS: F

PTS: 1

REF: 124

30. When dropping a constraint, the user is always required to specify the name of the constraint
being dropped.
ANS: F

PTS: 1

REF: 124

MODIFIED TRUE/FALSE
1. A Datatype is a rule used to ensure the accuracy of data stored in a database.
_________________________
ANS: F, Constraint
PTS: 1

REF: 100

2. A(n) constraint can be created during the creation of a database table or added to a table
afterwards. _________________________
ANS: T

PTS: 1

REF: 100

3. A constraint name can consist of up to 25 characters and numbers. _________________________
ANS: F
30
thirty
PTS: 1

REF: 101

3

4. The default name for a constraint is SYS Cn where n consists of a number that will make the name
unique within the database. _________________________
ANS: T

PTS: 1

REF: 101

5. A NOT NULL constraint can only be created at the table level. _________________________
ANS: F, column
PTS: 1

REF: 102

6. Any type of constraint for a single column can be created at the column level.
_________________________
ANS: T

PTS: 1

REF: 102

7. If a data value violates a(n) constraint, the entire row is prevented from being added to the table.
_________________________
ANS: T

PTS: 1

REF: 102

8. If a(n) FOREIGN KEY constraint has been created for a table, it means the data values in that
column must be unique and cannot contain NULL values. _________________________
ANS: F
PRIMARY
PRIMARY KEY
PTS: 1

REF: 106

9. The ADD clause of the ALTER TABLE command is used to add a PRIMARY KEY constraint to
an existing table. _________________________
ANS: T

PTS: 1

REF: 103

10. A(n) FOREIGN KEY constraint is used to ensure that referential integrity exists between tables.
_________________________
ANS: T

PTS: 1

REF: 106

11. When a FOREIGN KEY constraint is being created, the REFERENTIAL keyword is used to
indicate the table being referenced. _________________________
ANS: F, REFERENCES
PTS: 1

REF: 106

12. The FOREIGN KEY constraint is usually placed on the “one” side of a one-to-many relationship.
_________________________
ANS: F, many
PTS: 1

REF: 106

4

13. If the ON DELETE CASCADE keywords are included when a(n) PRIMARY KEY constraint is
created, then if a row is deleted from the parent table, any corresponding records in the child table
are also deleted. _________________________
ANS: F
FOREIGN
FOREIGN KEY
PTS: 1

REF: 108

14. A(n) FOREIGN KEY constraint can only reference a column in the parent table that has been
designated as the primary key for that table. _________________________
ANS: T

PTS: 1

REF: 106

15. A(n) UNIQUE constraint will allow NULL values to be stored in the designated column.
_________________________
ANS: T

PTS: 1

REF: 111

16. The REFERENCE constraint is used to ensure that a data value meets a specified condition before
a record is added to a table. _________________________
ANS: F, CHECK
PTS: 1

REF: 112

17. A(n) NOT NULL constraint is a special CHECK constraint with the condition of IS NOT NULL.
_________________________
ANS: T

PTS: 1

REF: 114

18. A NOT NULL constraint can only be added to an existing table by using the ADD clause with the
ALTER TABLE command. _________________________
ANS: F, MODIFY
PTS: 1

REF: 114

19. Both the table-level and column-level approaches to creating a constraint can be included in the
same command. _________________________
ANS: T

PTS: 1

REF: 116

20. The data warehouse contains information about objects included in the database.
_________________________
ANS: F, dictionary
PTS: 1

REF: 120

5

21. In the USER_CONSTRAINTS view, the constraint type for a NOT NULL constraint will be listed
as N. _________________________
ANS: F, C
PTS: 1

REF: 120

22. The ALTER TABLE command with the MODIFY clause can be used to disable a constraint.
_________________________
ANS: F, DISABLE
PTS: 1

REF: 122

23. The ALTER TABLE command can be used to delete an existing constraint.
_________________________
ANS: T

PTS: 1

REF: 124

24. When dropping a(n) PRIMARY KEY constraint, the name of the column does not need to be
included in the ALTER TABLE command. _________________________
ANS: T

PTS: 1

REF: 124

MULTIPLE CHOICE
1. Which of the following is a valid statement?
a. Constraints are rules used to enforce business rules, practices, and policies.
b. Constraints prevent errors by not allowing data to be added to tables if the data violates
specific rules.
c. Constraints ensure the accuracy and integrity of data.
d. all of the above
ANS: D

PTS: 1

REF: 100

2. Which of the following are used to enforce business rules?
a. syntax
c. constraints
b. functions
d. enforcers
ANS: C

PTS: 1

REF: 100

3. Which of the following statements about a PRIMARY KEY is incorrect?
a. It identifies which column(s) uniquely identify each record.
b. It can be NULL, as long as the FOREIGN KEY contains a value.
c. Each data value must be unique.
d. none of the above
ANS: B

PTS: 1

REF: 103

4. In a “one-to-many” relationship, which constraint is usually added to the “many” table?
a. UNIQUE
c. FOREIGN KEY
b. PRIMARY KEY
d. NOT NULL
ANS: C

PTS: 1

REF: 106

6

5. The UNIQUE constraint differs from the PRIMARY KEY constraint in what way?
a. The UNIQUE constraint does not allow NULL values.
b. The UNIQUE constraint can be created at either the column level or the table level.
c. The UNIQUE constraint allows NULL values.
d. The UNIQUE constraint ensures that a specific condition is true before a data value is
added to a table.
ANS: C

PTS: 1

REF: 111

6. How can constraints be added to a table?
a. as part of the CREATE TABLE command
b. as part of the ALTER TABLE command
c. as part of the PRIMARY KEY command
d. both a and b
ANS: D

PTS: 1

REF: 101

7. Which of the following statements about creating constraints is incorrect?
a. If you do not provide a name for a constraint, the Oracle11g server will issue an error
message.
b. There are two approaches for creating constraints: at the column level or the table level.
c. One industry convention is to use the format tablename_columnname_constraint type for
the constraint name.
d. none of the above
ANS: A

PTS: 1

REF: 101

8. Which of the following is the standard abbreviation for the constraint FOREIGN KEY?
a. fkey
c. fky
b. fk
d. frk
ANS: B

PTS: 1

REF: 101

9. Which of the following is the standard abbreviation for the constraint NOT NULL?
a. nn
c. nv
b. nl
d. nnv
ANS: A

PTS: 1

REF: 101

10. Which of the following is not a constraint type in Oracle11g?
a. CHECK
c. NOT NULL
b. UNIQUE
d. REFERENCE
ANS: D

PTS: 1

REF: 102

11. When a constraint is created at the ____ level with the CREATE TABLE command, the constraint
definition is simply included as part of the column definition.
a. table
c. database
b. column
d. row
ANS: B

PTS: 1

REF: 102

12. The NOT NULL constraint can only be created at the ____ level.
a. table
c. database
b. column
d. both a and b
ANS: B

PTS: 1

REF: 102

7

13. If a constraint applies to more than one column, the constraint must be created at the ____ level.
a. column
c. row
b. table
d. database
ANS: B

PTS: 1

REF: 102

14. Which of the following statements about creating constraints is incorrect?
a. If a constraint applies to more than one column, the constraint must be created at the
table level.
b. Using the column level approach, the definition of the constraint is included as part of
the column definition.
c. When you create constraints at the column level, the constraint being created applies to
the column specified.
d. The NOT NULL constraint can be created at either the column level or the table level.
ANS: D

PTS: 1

REF: 102

15. If the ____ keyword is included when a constraint is created, a constraint name must be provided
by the user.
a. CONST
c. CONSTRAINT
b. CONSTRAIN
d. none of the above
ANS: C

PTS: 1

REF: 101

16. Constraints are always enforced at the ____ level.
a. table
c. row
b. column
d. database
ANS: A

PTS: 1

REF: 102

17. When a constraint is created at the table level, the constraint definition is provided ____ the
column definition list.
a. before
c. in the middle of
b. after
d. between columns in
ANS: B

PTS: 1

REF: 102

18. Only one ____ constraint can exist for each table.
a. PRIMARY KEY
c.
b. FOREIGN KEY
d.
ANS: A

PTS: 1

UNIQUE
CHECK

REF: 103

19. A PRIMARY KEY constraint can be added to an existing table by using the ____ clause of the
ALTER TABLE command.
a. MODIFY
c. CONSTRAINT
b. ADD
d. none of the above
ANS: B

PTS: 1

REF: 103

20. A PRIMARY KEY that consists of more than one column is called a(n) ____ key.
a. multiple
c. comprehensive
b. composite
d. coherent
ANS: B

PTS: 1

REF: 103

8

21. Which view will display the names of all the constraints that you own?
a. DISPLAY_CONSTRAINTS
c. USER_CONSTRAINTS
b. ALL_CONSTRAINTS
d. TABLE_CONSTRAINTS
ANS: C

PTS: 1

REF: 120

22. What is the syntax for the default constraint name provided by the Oracle11g server?
a. SYS_Cn
c. ORA_Cn
b. PK_Cn
d. DEF_Cn
ANS: A

PTS: 1

REF: 101

23. Which keywords identify a column that, if it contains a value, it must match data contained in
another table?
a. FOREIGN KEY
c. CHECK
b. PRIMARY KEY
d. UNIQUE
ANS: A

PTS: 1

REF: 106

24. Which of the following types of constraints is used to enforce referential integrity?
a. UNIQUE
c. FOREIGN KEY
b. REFERS
d. CHECK
ANS: C

PTS: 1

REF: 106

25. When used with a FOREIGN KEY, the keyword REFERENCES refers to what?
a. reference integrity
c. referential integrity
b. relational integrity
d. relational constraint
ANS: C

PTS: 1

REF: 106

26. Which of the following statements about the FOREIGN KEY constraint is incorrect?
a. The constraint exists between two tables, called the parent table and the child table.
b. When the constraint exists, by default a record cannot be deleted from the parent table if
matching entries exist in the child table.
c. The constraint can reference any column in another table, even a column that has not been
designated as the primary key for the referenced table.
d. When the keywords ON DELETE CASCADE are included in the constraint definition, a
corresponding child record will automatically be deleted when the parent record is deleted.
ANS: C

PTS: 1

REF: 106

27. Which of the following keywords must have been included during the creation of a FOREIGN
KEY constraint to allow a row from the parent table to be deleted, even if it is referenced by a row
in the child table?
a. CASCADE
c. ON DELETE CASCADE
b. AUTO REMOVE
d. none of the above
ANS: C

PTS: 1

REF: 108

28. A FOREIGN KEY constraint can only reference a column in another table that has been assigned
a(n) ____ constraint.
a. NOT NULL
c. CHECK
b. UNIQUE
d. none of the above
ANS: D

PTS: 1

REF: 106

9

29. The purpose of the ____ constraint is to ensure that two records do not have the same value stored in
the same column. However, it can contain NULL values.
a. PRIMARY KEY
c. CHECK
b. UNIQUE
d. FOREIGN KEY
ANS: B

PTS: 1

REF: 111

30. Which of the following types of constraints will not allow NULL values?
a. UNIQUE
c. PRIMARY KEY
b. FOREIGN KEY
d. all of the above
ANS: C

PTS: 1

REF: 103

31. The ____ constraint requires that a specific condition be met before a record can be added to a table.
a. UNIQUE
c. CONDITION
b. REFERENCE
d. CHECK
ANS: D

PTS: 1

REF: 112

 

 

Comments

Popular posts from this blog

Pharmacology For Canadian Health Care Practice 3rd Edition By Linda Lane Lilley – Test Bank

Memory Foundations And Applications 2nd Edition By Bennett L. Schwartz – Test Bank

Operations And Supply Chain Management 14 Edition By Jacobs – Test Bank