主码(Primary Key)

主码(Primary Key)


相关考题:

●For relation where primary key contains multiple attributes,no non-key attribute should be functionally dependent on a part of primary key.This relation R is at least in (66) .(66) A.3NFB.2NFC.INFD.BCNF

For relation R where primary key contains multiple attributes,no non-key attribute should be functionally dependent on a part of the primary key. This relation R is at least inA. 1NFB.2NFC.3NFD.BCNF

●定义在一个关系上的约束不可以有 (40) 。(40) A.域约束B.DEFAULT(缺省值约束)C.PRIMARY KEY(主码约束)D.断言

Which of the following conditions will make a relation that is in first normal form. to be in second normal form?Ⅰ.every non-key attribute is functionally dependent on the full set of primary key attributes.Ⅱ.no non-key attributes exist in the relation.Ⅲ.the primary key consists of only one attribute.A.Ⅰ onlyB.Ⅰ and Ⅱ onlyC.Ⅰ and Ⅲ onlyD.any of them

在SQL在CREATE TABLE命令中用于定义满足实体完整性的主索引的短语是A.DEFAULTB.UNIQUEC.CHECKD.PRIMARY KEY

定义在一个关系上的约束不可以有(40)。A.域约束B.DEFAULT(缺省值约束)C.PRIMARY KEY(主码约束)D.断言

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);

在SQL在CREATE TABLE命令中用于定义满足实体完整性的主索引的短语是 A) DEFAULT B) UNIQUE C)CHECK D) PRIMARY KEY

SQL语言中实现候选码约束的语句是(24)。A.用Candidate Key指定B.用Primary Key指定C.用UNIQUE NOT NULL约束指定D.用UNIQUE约束指定

给定员工关系EMP(EmpID,Ename,sex,age,tel,DepID),其属性含义分别为:员工号、姓名、性别、年龄、电话、部门号;部门关系DEP(DepID,Dname,Dtel,DEmpID),其属性含义分别为:部门号、部门名、电话,负责人号。若要求DepID参照部门关系DEP的主码DepID,则可以在定义EMP时用(7)进行约束。若要查询开发部的负责人姓名、年龄,则正确的关系代数表达式为(8)。A.Primary Key(DepID)On DEP(DepID)B.Primary Key(DepID)On EMP(DepID)C.Foreign Key(DepID)References DEP(DepID)D.Foreign Key(DepID)References EMP(DepID)

For relation where primary key contains multiple attributes, no non-key attribute should be functionally dependent on a part of primary key. This relation R is at least in(66).A.3NFB.2NFC.INFD.BCNF

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.NOT NULLB.UNIQUEC.KEY UNIQUED.PRIMARY KEY

_____A.PRIMARY KEY (部门号) NOT NULL UNIQUEB.PRIMARY KEY (部门名) UNIQUEC.FOREIGN KEY (负责人) REFERENCES 员工 (姓名)D.FOREIGN KEY (负责人) REFERENCES 员工 (员工号)A.B.C.D.

在SQL语言中PRIMARY KEY的作用是()。A.定义主码B.定义外部码C.定义处部码的参照表D.确定主码类型

一般,PRIMARY KEY在建立主码的同时也可以建立索引。() 此题为判断题(对,错)。

为表TEST中ID列添加主键约束的语法是()A、ALTER  TABLE  TEST  CHANGE( ID  INT  PRIMARY  KEY)B、ALTER  TABLE  TEST  ADD( ID  INT  PRIMARY  KEY)C、ALTER  TABLE  TEST  MODIFY( ID  INT  PRIMARY  KEY)D、ALTER  TABLE  TEST  ADD  CONSTRAINT PK  PRIMARY KEY (ID)

在SQL语言中PRIMARY KEY的作用是()。A、定义主码B、定义外部码C、定义处部码的参照表D、确定主码类型

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.

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);

单选题在SQL语言中PRIMARY KEY的作用是()。A定义主码B定义外部码C定义处部码的参照表D确定主码类型

单选题View the Exhibit and examine the structure of the EMP table. You executed the following command to add a primary key to the EMP table:   ALTER TABLE emp   ADD CONSTRAINT emp_id_pk  PRIMARY KEY (emp_id)   USING INDEX emp_id_idx;   Which statement is true regarding the effect of the command?()A  The PRIMARY KEY is created along with a new index.B  The PRIMARY KEY is created and it would use an existing unique index.C  The PRIMARY KEY would be created in a disabled state because it is using an existing index.D  The statement produces an error because the USING clause is permitted only in the CREATE TABLE command.

名词解释题主码(Primary Key)

单选题Examine the command:   ALTER DATABASE ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;   What does the command accomplish?()ACreates an additional copy of the database online redo log files. BStores the primary key column values of each row involved in a DML operation in the online redo log files. CStores the primary key column values of each row involved in a DML operation in the supplemental log files. DStores 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.

单选题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?()AALTER TABLE students ADD PRIMARY KEY _ id;BALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);CALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;DALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);EALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

多选题Which two statements are true about the primary key constraint in a table? ()AIt is not possible to disable the primary key constraint.BIt is possible to have more than one primary key constraint in a single table.CThe primary key constraint can be referred by only one foreign key constraint.DThe primary key constraint can be imposed by combining more than one column.EThe non-deferrable primary key constraint creates an unique index on the primary key column if it is not already indexed.

单选题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?()AALTER TABLE students ADD PRIMARY KEY student_id;BALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);CALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;DALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);EALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);