更多“下面哪一个不是有效的约束类型()。A、PRIMARY KEYSB、UNIQUEC、CHECKD、FOREIGN KEY”相关问题
  • 第1题:

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

    A. UNIQUE

    B. NOT NULL

    C. CHECK

    D. PRIMARY KEY

    E. FOREIGN KEY


    参考答案:B

  • 第2题:

    _____

    A.NOT NULL

    B.UNIQUE

    C.KEY UNIQUE

    D.PRIMARY KEY

     


    正确答案:B

  • 第3题:

    下列哪一种约束确保表的对应的字段的值在某一范围内?()

    A.DEFUALT

    B.CHECK

    C.PRIMARY KEY

    D.FOREIGN KEY


    本题答案:B

  • 第4题:

    某企业信息管理系统的部分关系模式为:部门(部门号,部门名,负责人,电话)、职工(职工号,职工姓名,部门号,职位,住址,联系电话)。部门关系中的部门名为非空值,负责人参照职工关系的职工号,请将下述SQL语句的空缺部分补充完整。CREATE TABLE 部门(部门号 CHAR(4) PRIMARY KEY, 部门名 CHAR(20)( ), 负责人 CHAR(6), 电话 CHAR(15), (请作答此空));

    A.PRIMARY KEY(部门号)NOT NULL UNIQUE
    B.PRIMARY KEY(部门名)UNIQUE
    C.FOREIGN KEY(负责人)REFERENCES 职工(职工号)
    D.FOREIGN KEY(负责人)REFERENCES 职工(职工姓名)

    答案:C
    解析:
    负责人参照职工关系的职工号,职工号是外键。用FOREIGN KEY(负责人) REFERENCE 职工(职工号)表示。

  • 第5题:

    您需要确保“座位标识”列中的每个值唯一或为Null。应该对“座位标识”列定义哪个约束条件?()

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

    正确答案:A

  • 第6题:

    当向数据库表中插入数据时,如果没有明确地提供输入值时,系统自动为该列输入指定值,这属于哪种约束()

    • A、CHECK约束
    • B、FOREIGN KEY约束
    • C、PRIMARY KEY约束
    • D、DEFAULT约束

    正确答案:D

  • 第7题:

    定义数据库表中指定列上插入或更新的数值必须在另一张被参照表中的特定列上存在,这属于哪种约束()

    • A、DEFAULT约束
    • B、CHECK约束
    • C、PRIMARY KEY约束
    • D、FOREIGN KEY约束

    正确答案:D

  • 第8题:

    下列哪一种约束确保表的对应的字段的值在某一范围内?()

    • A、DEFUALT
    • B、CHECK
    • C、PRIMARY KEY
    • D、FOREIGN KEY

    正确答案:B

  • 第9题:

    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

  • 第10题:

    You plan to move data from a flat file to a table in your database. You decide to use SQL*Loader direct pathload method to perform this task. The table in which you plan to load data is an important table having variousintegrity constraints defined on it.  Which constraints will remain enabled by default during this operation()

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

    正确答案:B,C,D

  • 第11题:

    多选题
    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
    解析: 暂无解析

  • 第12题:

    数据库中现有一张成绩表,为了限制成绩的输入范围,应该使用()约束。 (1.0分) [单选.] A. foreign key B. unique C. check D. primary key
    答案:C

  • 第13题:

    在SQL的CREATE TABLE命令中用于定义满足实体完整性的主索引的短语是

    A.DEFAULT

    B.UNIQUE

    C.CHECK

    D.PRIMARY KEY


    正确答案:D
    解析:选项A是用于定义默认值;选项B是用于建立候选索引,但不是惟一索引;选项C是用于指定字段的有效性规则;选项D是用于建立主索引。

  • 第14题:

    _____

    A.PRIMARY KEY (部门号) NOT NULL UNIQUE

    B.PRIMARY KEY (部门名) UNIQUE

    C.FOREIGN KEY (负责人) REFERENCES 员工 (姓名)

    D.FOREIGN KEY (负责人) REFERENCES 员工 (员工号)

    A.

    B.

    C.

    D.


    正确答案:D
    解析:本题考查数据库中范式的基本概念和基本的SQL语句。
      由于部门名是唯一的,因此在“部门名CHAR(10)”后应有“UNIQUE”。根据表1可以看出负责人来自员工且等于员工号属性,因为员工关系的主键是员工号,所以部门关系的外键负责人需要用FOREIGN KEY (负责人) REFERENCES 员工 (员工号) 来约束。这样部门关系的SQL语句如下:
      CREATE TABLE 部门 (部门号 CHAR (3) PRIMARY KEY,
      部门名 CHAR (10) UNIQUE,
      负责人 CHAR (4),
      电话 CHAR (20)
      FOREIGN KEY (负责人) REFERENCES 员工 (员工号));
      根据SQL的语法要求,查询各部门负责人的姓名及住址的SQL语句的空缺部分补充完整如下:
      SELECT 部门名, 姓名, 住址
      FROM 部门, 员工 WHERE 员工号=负责人;

  • 第15题:

    允许取空值但不允许出现重复值的约束是______。

    A.NULL

    B.UNIQUE

    C.PRIMARY KEY

    D.FOREIGN KEY


    正确答案:B

  • 第16题:

    以下哪些是有效的Oracle约束类型()

    • A、UNIQUE
    • B、NONUNIQUE
    • C、CHECK
    • D、CASCADE
    • E、PRIMARY KEY
    • F、CONSTANTG
    • G、NOT NULL

    正确答案:A,C,E,G

  • 第17题:

    使用SQL语言创建一个表,要限定某列的值具有唯一性,可以使用()约束。

    • A、PRIMARY KEY
    • B、CHECK
    • C、UNIQUE
    • D、FOREIGN KEY

    正确答案:A,C

  • 第18题:

    通过逻辑表达式判断限制插入到列中的值,这属于哪种约束()

    • A、DEFAULT约束
    • B、CHECK约束
    • C、PRIMARY KEY约束
    • D、FOREIGN KEY约束

    正确答案:B

  • 第19题:

    被FOREIGN KEY参照的列在表中应该具有()

    • A、DEFAULT约束
    • B、CHECK约束
    • C、PRIMARY KEY约束
    • D、REIGN KEY约束

    正确答案:C

  • 第20题:

    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

  • 第21题:

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

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

    正确答案:B

  • 第22题:

    单选题
    下面哪一个不是有效的约束类型()。
    A

    PRIMARY KEYS

    B

    UNIQUE

    C

    CHECK

    D

    FOREIGN KEY


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

  • 第23题:

    单选题
    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
    解析: 暂无解析