Oracle12c Lab Chapter 4 Quiz

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Only one ____ constraint can exist for each table.

PRIMARY KEY

Which of the following types of constraints will not allow NULL values?

PRIMARY KEY

"In the USER_CONSTRAINTS view, the value displayed in the CONSTRAINT_TYPE column will be a(n) ____ for a FOREIGN KEY constraint."

R

Which of the following is not a constraint type in Oracle 12c ?

REFERENCE

What is the syntax for the default constraint name provided by the Oracle 12c server?

SYS_Cn

Which of the following statements about creating constraints is incorrect?

The NOT NULL constraint can be created at either the column levelor the table level.

The UNIQUE constraint differs from the PRIMARY KEY constraint in what way?

The UNIQUE constraint allows NULL values.

"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."

UNIQUE

Which view will display the names of all the constraints that you own?

USER_CONSTRAINTS

A PRIMARY KEY that consists of more than one column is called a(n) ____ key.

composite

Which of the following are used to enforce business rules?

constraints

Which of the following is the standard abbreviation for the constraint FOREIGN KEY?

fky

"Where does the Oracle12c server store information about objects in the database, including information about constraints?"

in the data dictionary

Which of the following is the standard abbreviation for the constraint NOT NULL?

nn

A FOREIGN KEY constraint can only reference a column in another table that as been assigned a(n) ____ constraint.

none of the above

Structure of the ORDERITEMS table "Based on the structure of the ORDERITEMS table, which of the following commands will add a NOT NULL constraint to the ISBN column?"

none of the above

"When used with a FOREIGN KEY, the keyword REFERENCES refers to what?"

referential integrity

Constraints are always enforced at the ____ level.

row

"If a constraint applies to more than one column, the constraint must be created at the ____ level."

table

Which of the following statements about creating constraints is incorrect?

"If you do not provide a name for a constraint, the Oracle11gserver will issue an error message."

Which of the following statements about a PRIMARY KEY is incorrect?

"It can be NULL, as long as the FOREIGN KEY contains a value."

Which of the following statements about the FOREIGN KEY constraint is incorrect?

"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."

A PRIMARY KEY constraint can be added to an existing table by using the ____ clause of the ALTER TABLE command.

ADD

Structure of the ORDERITEMS table "Based on the structure of the ORDERITEMS table, which of the following commands will make certain that the ISBN entered actually exists in the ISBN column of the BOOKS table?"

ALTER TABLE orderitems ADD FOREIGN KEY (isbn) REFERENCES books(isbn);

Structure of the ORDERITEMS table "If a PRIMARY KEY constraint, named ORDERITEMS_PK, exists for the ORDER# and ITEM# columns of the ORDERITEMS table, which of the following commands will disable the constraint?"

ALTER TABLE orderitems DISABLE CONSTRAINT orderitems_pk;

Structure of the ORDERITEMS table "If a PRIMARY KEY constraint, named ORDERITEMS_PK, exists for the ORDER# and ITEM# columns of the ORDERITEMS table, which of the following commands will drop the constraint?"

ALTER TABLE orderitems DROP PRIMARY KEY;

Structure of the ORDERITEMS table "If the constraints on the ORDER# and ITEM# columns of the ORDERITEMS table were created as a PRIMARY constraint, and the actual constraint name is not known, which of the following commands can be used to delete the constraint?"

ALTER TABLE orderitems DROP PRIMARY KEY;

Structure of the ORDERITEMS table "If a PRIMARY KEY constraint, named ORDERITEMS_PK, for the ORDER# and ITEM# columns of the ORDERITEMS table have been disabled, which of the following commands will enable the constraint."

ALTER TABLE orderitems ENABLE CONSTRAINT orderitems_pk;

Structure of the PROMOTION table Which of the following commands will add a UNIQUE constraint to the MINRETAIL column of the PROMOTION table?

ALTER TABLE promotion ADD CONSTRAINT orderitems_minretail_uk UNIQUE (minretail);

Structure of the PROMOTION table Based on the structure of the PROMOTION table, which of the following commands will add a PRIMARY KEY constraint to the GIFT column?"

ALTER TABLE promotion ADD PRIMARY KEY(gift);

Structure of the PROMOTION table "Based on the structure of the PROMOTION table, which of the following commands will ensure that the value entered for the MINRETAIL column is less than the value entered for the MAXRETAIL column?"

ALTER TABLE promotionADD CHECK ( minretail < maxretail);

"In the USER_CONSTRAINTS view, the value displayed in the CONSTRAINT_TYPE column will be a(n) ____ for a CHECK constraint."

C

"In the USER_CONSTRAINTS view, the value displayed in the CONSTRAINT_TYPE column will be a(n) ____ for a NOT NULL constraint."

C

The ____ constraint requires that a specific condition be met before a record can be added to a table.

CHECK

"If the ____ keyword is included when a constraint is created, a constraint name must be provided by the user."

CONSTRAINT

Structure of the ORDERITEMS table "Based on the structure of the ORDERITEMS table, which of the following commands was most likely used to create the table?"

CREATE TABLE orderitems (order# NUMBER (4), item# NUMBER(2), isbn VARCHAR2(10), qty NUMBER(3), PRIMARY KEY(order#, item#));

Which command can be used to determine whether or not a column is allowed to contain a NULL value?

DESCRIBE

Which clause will allow you to disable a constraint?

DISABLE

Which clause will allow you to delete a constraint?

DROP

"In a ""one-to-many"" relationship, which constraint is usually added to the ""many"" table?"

FOREIGN KEY

"Which keywords identify a column that, if it contains a value, it must match data contained in another table"

FOREIGN KEY

Which of the following types of constraints is used to enforce referential integrity?

FOREIGN KEY

The ____ constraint prevents the user from adding a NULL value in the specified column.

NOT NULL

Which of the following constraints cannot be added to an existing table with the ADD clause of the ALTER TABLE command?

NOT NULL

"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?"

ON DELETE CASCADE

"When a constraint is created at the table level, the constraint definition is provided ____ the column definition list."

after

Which of the following is a valid statement?

all of the above

How can constraints be added to a table?

as part of the CREATE TABLE command as part of the ALTER TABLE command (both a and b)

"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."

column

The NOT NULL constraint can only be created at the ____ level.

column


संबंधित स्टडी सेट्स

Lab 17-2: Scanning a Network for Connected Devices

View Set

Musculoskeletal Problems-Chapter 16-Dunphy

View Set

Chapter 12 Vocab Child development

View Set

European absolutism practice test (60 questions) 1-4

View Set

North Carolina Insurance Laws and Rules

View Set