niusouti.com

单选题When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()A 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

题目
单选题
When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()
A

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.

B

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.

C

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.

D

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.


相似考题
参考答案和解析
正确答案: B
解析: 暂无解析
更多“单选题When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()A 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”相关问题
  • 第1题:

    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?()

    A.Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.

    B.Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).

    C.Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.

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


    参考答案:C

  • 第2题:

    Click the Exhibit button and examine the data in the EMPLOYEES table.On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column.Evaluate this DELETE statement:DELETE employee_id, salary, job_idFROM employeesWHERE dept_id = 90;Why does the DELETE statement fail when you execute it?()

    A.There is no row with dept_id 90 in the EMPLOYEES table.

    B.You cannot delete the JOB_ID column because it is a NOT NULL column.

    C.You cannot specify column names in the DELETE clause of the DELETE statement.

    D.You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.


    参考答案:C

  • 第3题:

    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?()

    • A、Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.
    • B、Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).
    • C、Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.
    • D、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.

    正确答案:C

  • 第4题:

    When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()

    • A、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.
    • B、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.
    • C、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.
    • D、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.

    正确答案:C

  • 第5题:

    Which two statements are true about constraints? ()

    • A、The UNIQUE constraint does not permit a null value for the column.
    • B、A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.
    • C、The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.
    • D、The NOT NULL constraint ensures that null values are not permitted for the column.

    正确答案:B,D

  • 第6题:

    You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()

    • A、ALTER TABLE students ADD PRIMARY KEY student_id;
    • B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);
    • C、ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);
    • D、ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

    正确答案:C

  • 第7题:

    Which constraint can be defines only at the column level?()

    • A、UNIQUE
    • B、NOT NULL
    • C、CHECK
    • D、PRIMARY KEY
    • E、FOREIGN KEY

    正确答案:B

  • 第8题:

    You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment. (Line numbers are included for reference only.)01 dtOrders = dsOrders.Tables[“Orders”]; 02 dtOrderDetails = dsOrders.Tables[“OrderDetail”]; 03 colParent = dtOrders.Columns[“OrderID”]; 04 colChild = dtOrderDetails.Columns[“ParentOrderID”]; 05 dsOrders.Relations.Add(“Rell”, colParent, colChild, false); You need to find the cause of the exception being raised in line 05. What should you do? ()

    • A、Ensure that the child column and the parent column have the same names.
    • B、Ensure that the child table and the parent table have the same names.
    • C、Ensure that the child column and the parent column have the same data types.
    • D、Ensure that each row in the child table has a corresponding row in the parent table.
    • E、Ensure that the tables have an explicit relationship defined by a foreign key constraint in the database.

    正确答案:C

  • 第9题:

    单选题
    You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()
    A

    ALTER TABLE students ADD PRIMARY KEY _ id;

    B

    ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);

    C

    ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;

    D

    ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

    E

    ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);


    正确答案: D
    解析: 暂无解析

  • 第10题:

    多选题
    Which two statements are true about the primary key constraint in a table? ()
    A

    It is not possible to disable the primary key constraint.

    B

    It is possible to have more than one primary key constraint in a single table.

    C

    The primary key constraint can be referred by only one foreign key constraint.

    D

    The primary key constraint can be imposed by combining more than one column.

    E

    The non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.


    正确答案: D,B
    解析: 暂无解析

  • 第11题:

    单选题
    You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()
    A

    ALTER TABLE students ADD PRIMARY KEY student_id;

    B

    ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);

    C

    ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;

    D

    ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

    E

    ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);


    正确答案: E
    解析: 暂无解析

  • 第12题:

    单选题
    In which of the following situations should correlation names be used?()
    A

    A table referenced in the FROM clause has no indexed column.

    B

    The table referenced in the FROM clause has more than 200 columns.

    C

    Two or more tables in the FROM clause have identical column names.

    D

    The FROM clause contains two or more tables in the SELECT statement.


    正确答案: B
    解析: 暂无解析

  • 第13题:

    In which of the following situations should correlation names be used?()

    A.A table referenced in the FROM clause has no indexed column.

    B.The table referenced in the FROM clause has more than 200 columns.

    C.Two or more tables in the FROM clause have identical column names.

    D.The FROM clause contains two or more tables in the SELECT statement.


    参考答案:C

  • 第14题:

    In which of the following situations should correlation names be used?()

    • A、A table referenced in the FROM clause has no indexed column.
    • B、The table referenced in the FROM clause has more than 200 columns.
    • C、Two or more tables in the FROM clause have identical column names.
    • D、The FROM clause contains two or more tables in the SELECT statement.

    正确答案:C

  • 第15题:

    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?()

    • A、A check constraint on the EMPLOYEE table
    • B、A unique constraint on the EMPLOYEE table WORKDEPT column
    • C、A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table
    • D、A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table

    正确答案:D

  • 第16题:

    Which two statements are true about the primary key constraint in a table? ()

    • A、It is not possible to disable the primary key constraint.
    • B、It is possible to have more than one primary key constraint in a single table.
    • C、The primary key constraint can be referred by only one foreign key constraint.
    • D、The primary key constraint can be imposed by combining more than one column.
    • E、The non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.

    正确答案:D,E

  • 第17题:

    Which two are true about aggregate functions? ()

    • A、You can use aggregate functions in any clause of a SELECT statement.
    • B、You can use aggregate functions only in the column list of the select clause and in the WHERE clause of a SELECT statement.
    • C、You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row columns.
    • D、You can pass column names, expressions, constants, or functions as parameter to an aggregate function.
    • E、You can use aggregate functions on a table, only by grouping the whole table as one single group.
    • F、You cannot group the rows of a table by more than one column while using aggregate functions.

    正确答案:A,D

  • 第18题:

    Examine the following command: CREATE TABLE (prod_id number(4), Prod_name varchar2 (20), Category_id number(30), Quantity_on_hand number (3) INVISIBLE); Which three statements are true about using an invisible column in the PRODUCTS table?()

    • A、The %ROWTYPE attribute declarations in PL/SQL to access a row will not display the invisible column in the output.
    • B、The DESCRIBE commands in SQL *Plus will not display the invisible column in the output.
    • C、Referential integrity constraint cannot be set on the invisible column.
    • D、The invisible column cannot be made visible and can only be marked as unused.
    • E、A primary key constraint can be added on the invisible column.

    正确答案:A,B,C

  • 第19题:

    You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()

    • A、ALTER TABLE students ADD PRIMARY KEY _ id;
    • B、ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
    • C、ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
    • D、ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
    • E、ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

    正确答案:D

  • 第20题:

    单选题
    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?()
    A

    Define a UNIQUE constraint on the columns NEXT_STEPNO and STEPNO.

    B

    Define a CHECK constraint on the NEXT_STEPNO column (NEXT_STEPNO = STEPNO).

    C

    Define column STEPNO as the primary key of TABLEX and column NEXT_STEPNO as a foreign key referencing column STEPNO of the same table.

    D

    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.


    正确答案: A
    解析: 暂无解析

  • 第21题:

    单选题
    You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment. (Line numbers are included for reference only.)01 dtOrders = dsOrders.Tables[“Orders”]; 02 dtOrderDetails = dsOrders.Tables[“OrderDetail”]; 03 colParent = dtOrders.Columns[“OrderID”]; 04 colChild = dtOrderDetails.Columns[“ParentOrderID”]; 05 dsOrders.Relations.Add(“Rell”, colParent, colChild, false); You need to find the cause of the exception being raised in line 05. What should you do? ()
    A

    Ensure that the child column and the parent column have the same names.

    B

    Ensure that the child table and the parent table have the same names.

    C

    Ensure that the child column and the parent column have the same data types.

    D

    Ensure that each row in the child table has a corresponding row in the parent table.

    E

    Ensure that the tables have an explicit relationship defined by a foreign key constraint in the database.


    正确答案: D
    解析: 暂无解析

  • 第22题:

    单选题
    You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.Which statement accomplishes this task?()
    A

    ALTER TABLE students ADD PRIMARY KEY student_id;

    B

    ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student _ id);

    C

    ALTER TABLE students ADD CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);

    D

    ALTER TABLE students MODIFY CONSTRAINT stud _ id _pk PRIMARY KEY (student _ id);


    正确答案: B
    解析: 暂无解析

  • 第23题:

    单选题
    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?()
    A

    A check constraint on the EMPLOYEE table

    B

    A unique constraint on the EMPLOYEE table WORKDEPT column

    C

    A foreign key reference from the DEPARTMENT tables DEPTNO column to the WORKDEPT column of the EMPLOYEE table

    D

    A foreign key reference from the EMPLOYEE tables WORKDEPT column to the DEPTNO column of the DEPARTMENT table


    正确答案: C
    解析: 暂无解析

  • 第24题:

    单选题
    When defining a referential constraint between the parent table T2 and the dependent table T1, which of the following is true?()
    A

    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.

    B

    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.

    C

    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.

    D

    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.


    正确答案: A
    解析: 暂无解析