HW #5

¡Supera tus tareas y exámenes ahora con Quizwiz!

​It is unavailable and will not be displayed in the table structure.

Once a column has been set as UNUSED, which of the following is correct?​ a. ​All DDL operations can be performed on it until it is actually dropped. b. ​It will still appear in the results of subqueries until it is dropped. c. ​It is unavailable, but will still be displayed in the table structure. d. ​It is unavailable and will not be displayed in the table structure.

True

T/F: A CHAR column cannot be resized to a width that is smaller than the data it already contains.​

True

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

True

T/F: A NOT NULL constraint can only be created at the column level.​

True

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

False

T/F: A column name can consist of up to 225 characters.​

False

T/F: The ALTER TABLE name can be used to rename a table.​

True

T/F: The CONSTRAINT keyword is required if the user is going to assign a name to a constraint.​

True

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

True

T/F: You cannot delete the last column in a table.​

False

T/F: ​The ALPHANUMERIC datatype can be used to store characters and numbers to a maximum width of 2000.

False

T/F: ​The DELETE TABLE command can be used to delete all the data stored in a table and release the storage space, yet retain the structure of the table.

ALTER TABLE

Which of the following commands can be used to make structural changes to an existing table?​

all of the above

Which of the following is displayed by the DESCRIBE command?​ a. ​not null requirements b. ​all of the above c. ​datatypes d. ​column names

Reference

Which of the following is not a constraint type in Oracle 12c?​ a. ​CHECK b. ​NOT NULL c. ​REFERENCE d. ​UNIQUE

ON DELETE CASCADE

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. ​AUTO REMOVE b. ​ON DELETE CASCADE c. ​CASCADE d. ​none of the above

7

​The column definition of NUMBER(7, 4) indicates a precision of ____.

none of the above

​What is the maximum width that can be assigned to a DATE column? a. ​8 b. ​12 c. ​1 d. ​none of the above

​In the data dictionary

​Where does the Oracle 12c server store information about objects in the database, including information about constraints?

CREATE TABLE

​Which command instructs Oracle 12c to create a new table?

MYTABLE

​Which of the following is a valid table name? a. ​SELECT b. ​MYTABLE c. ​DISTINCT d. ​CHAR

fk

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

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

Based on the structure of the ORDERITEMS table, which of the following commands was most likely used to create the table?​ a. ​CREATE TABLE orderitems (order# NUMBER (4), item# NUMBER(2), isbn VARCHAR2(10), qty NUMBER(3), PRIMARY KEY(order#), PRIMARY KEY(order#)); b. ​CREATE TABLE orderitems (order# NUMBER (4), item# NUMBER(2), isbn VARCHAR2(10), qty NUMBER(3), NOT NULL (order#, item#)); c. ​CREATE TABLE orderitems (order# NUMBER (4) PRIMARY KEY, item# NUMBER(2) PRIMARY KEY, isbn VARCHAR2(10), qty NUMBER(3)); d. ​CREATE TABLE orderitems (order# NUMBER (4), item# NUMBER(2), isbn VARCHAR2(10), qty NUMBER(3), PRIMARY KEY(order#, item#));

ALTER TABLE orderitems ENABLE CONSTRAINT orderitems_pk;

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?​ a. ALTER TABLE orderitems ENABLE PRIMARY KEY CONSTRAINT; b. ​ALTER TABLE orderitems MODIFY PRIMARY KEY CONSTRAINT ENABLE; c. ALTER TABLE orderitems ENABLE CONSTRAINT orderitems_pk; d. ALTER TABLE orderitems MODIFY PRIMARY KEY CONSTRAINT;

ALTER TABLE orderitems DROP PRIMARY KEY;

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?​ a. ​ALTER TABLE orderitems DELETE PRIMARY KEY; b. ALTER TABLE orderitems DELETE ALL CONSTRAINTS; c. ALTER TABLE orderitems DROP ALL CONSTRAINTS; d. ALTER TABLE orderitems DROP PRIMARY KEY;

DD-MON-YY

In which format does Oracle 12c display a date value?​

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

Which of the following statements about the FOREIGN KEY constraint is incorrect?​ a. ​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. 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 exists between two tables, called the parent table and the child table. d. ​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.

%

Which of the following symbols cannot be used in a table name?​ a. ​% b. ​_ c. ​# d. ​none of the above

PRIMARY KEY

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

USER_CONSTRAINTS

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


Conjuntos de estudio relacionados

C++ HANLY Ch. 3 Control Structures

View Set

AP Human Geography Unit VII Cities and Urban Land Use

View Set

Reimbursement - Final Exam Review

View Set

Assessment of Respiratory Function

View Set

Frans werkwoorden être, faire, avoir en aller.

View Set

Earth/Space Sections 23.3 and 23.4

View Set

Formation of contract: offer and acceptance

View Set