DB2 will no longer allow updating the value of IDCOL1 in TABLE1.
When inserting a row in TABLE2, the only values that DB2 will allow for IDCOL2 are the existing values of IDCOL1.
When inserting a row in TABLE2, DB2 will only allow foreign values for IDCOL2, that is values which do not exist in IDCOL1.
When a SELECT statement joins TABLE1 with TABLE2, DB2 will automatically add the condition TABLE1.IDCOL1=TABLE2.IDCOL2 if not specified in the statement.
第1题:
A.DB2 will no longer allow updating the value of IDCOL1 in TABLE1.
B.When inserting a row in TABLE2, the only values that DB2 will allow for IDCOL2 are the existing values of IDCOL1.
C.When inserting a row in TABLE2, DB2 will only allow foreign values for IDCOL2, that is values which do not exist in IDCOL1.
D.When a SELECT statement joins TABLE1 with TABLE2, DB2 will automatically add the condition TABLE1.IDCOL1=TABLE2.IDCOL2 if not specified in the statement.
第2题:
You work in a company which uses SQL Server 2008. You are the administrator of the company database. Now you are in charge of a SQL Server 2008 instance. There is a database named named Dworks in the instance. The Dworks table has a table named BillDetails which has a clustered primary key named BillId on the BillId column. The BillDetails table has a single XML column named GoodsDetails. The XML column has an XML index and XML data are stored in this XML column. A new column named GoodsID is added to the BillDetails table. GoodsID must be included in the primary key. So what action should you perform to achieve this goal?()
第3题:
Which of the following will be a consequence of defining the column IDCOL2 in TABLE2 as a foreign key referencing the primary key (IDCOL1) of TABLE1?()
第4题:
When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()
第5题:
Which two statements are true about constraints? ()
第6题:
Which statement describes the effect on an index, when the indexed column for the rows is updatedin the base table()
第7题:
Examine the command: ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS; What does the command accomplish?()
第8题:
Creates an additional copy of the database online redo log files.
Stores the primary key column values of each row involved in a DML operation in the online redo log files.
Stores the primary key column values of each row involved in a DML operation in the supplemental log files.
Stores the old and new primary key column values of each row involved in a DML operation only when the primary key is modified in the online redo log files.
第9题:
You should drop the XML index on the table. Modify the primary key. Recreate the XML index
You should alter the XML index and set the ALLOW_ROW_LOCKS = OFF option. Alter the primary key and set the ALLOW_ROW_LOCKS = ON option.
You should move the XML data to a temporary table. Clear the XML data from the original table by setting the GoodsDetails column to NULL. Modify the primary key. Repopulate the ProductSpecs column.
You should disable the XML index on the GoodsDetails column. Modify the primary key.Enable the XML index on the ProductSpecs column.
第10题:
CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN ('C','H','N')), );
CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES ('C','H','N') );
CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN ('C','H','N')), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );
CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN ('C','H','N')) );
第11题:
Define the column MAINID as NOT UPDATABLE
Define the column MAINID as a PRIMARY KEY
Define the column MAINID as a FOREIGN KEY
Define an UPDATE trigger on table TABLEX
第12题:
The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.
The list of column names in the FOREIGN KEY clause can be a subset of the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.
The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T2 or a UNIQUE constraint that exists on T2.
The list of column names in the FOREIGN KEY clause must be identical to the list of column names in the primary key of T1 or a UNIQUE constraint that exists on T1.
第13题:
Which of the following scenarios will ensure that the value of the NEXT_STEPNO column in a given row of table TABLEX exists as a value of column STEPNO (usually in another row) in the same table?()
第14题:
What type of constraint is used to ensure that each row inserted into the EMPLOYEE table with a value in the WORKDEPT column has a row with a corresponding value in the DEPTNO column of the DEPARTMENT table?()
第15题:
Which of the following can be used to ensure that once a row has been inserted in table TABLEX, the column MAINID in that row cannot be updated?()
第16题:
Which two statements are true about the primary key constraint in a table? ()
第17题:
Which two statements are true about a bitmap index? ()
第18题:
Which constraint can be defines only at the column level?()
第19题:
Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.
Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).
Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.
Define column NEXT_STEPNO as the primary key of TABLEX and column STEPNO as a foreign key referencing column NEXT_STEPNO in the same table.
第20题:
An update in a leaf row takes place.
The index becomes invalid after the update.
The leaf block containing the row to be updated is marked as invalid.
A row in the leaf block of the index for the key value is logically deleted and a new leaf row is inserted
第21题:
The UNIQUE constraint does not permit a null value for the column.
A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.
The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.
The NOT NULL constraint ensures that null values are not permitted for the column.
第22题:
It is not possible to disable the primary key constraint.
It is possible to have more than one primary key constraint in a single table.
The primary key constraint can be referred by only one foreign key constraint.
The primary key constraint can be imposed by combining more than one column.
The non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.
第23题:
A check constraint on the EMPLOYEE table
A unique constraint on the EMPLOYEE table WORKDEPT column
A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table
A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table