今天考数据库,这是题目和我的答案!

题目:

一.单项选择

|

1.

|

|

With respect to a relational table, what is a key?

|

---|---|---|---|---

|

(a) A minimal subset of columns that uniquely identifies a row in the table
(b) The ID and password needed to access the table
(c) The subset of all the rows and columns in the table that are visible to all users in the database system
(d) The one column that uniquely identifies a row in the table

---|---

|

2.

|

|

Which of the following is true about the number of primary keys and alternate keys with respect to a table?

|

---|---|---|---|---

|

(a) There can be many primary keys, but only one alternate key.
(b) There can be only one primary key, but many alternate keys.
(c) There can be only one primary key and only one alternate key.
(d) There can be many primary keys and many alternate keys.

---|---

|

3.

|

|

An insertion operation will _____ if the insertion violates the uniqueness property of a key.

|

---|---|---|---|---

|

(a) succeed with warning
(b) crash the system
(c) fail
(d) succeed without warning

---|---

|

4.

|

|

An insertion operation will _____ if the inserted primary key has a NULL value.

|

---|---|---|---|---

|

(a) succeed with warning
(b) succeed without warning
(c) fail
(d) crash the system

---|---

|

5.

|

|

For two tables to be union compatible, corresponding columns from each table should have which of the following?

|

---|---|---|---|---

|

(a) different domains
(b) different names
(c) the same domain
(d) the same name

---|---

|

6.

|

|

In the relational model, which of the following is true about the data type of a column?

|

---|---|---|---|---

|

(a) It _ need not _ be atomic and it _ cannot _ be an abstract data type.
(b) It _ must _ be atomic and it _ cannot _ be an abstract data type.
(c) It _ need not _ be atomic and it _ can _ be an abstract data type.
(d) It _ must _ be atomic and it _ can _ be an abstract data type.

---|---

|

7.

|

|

What is an alternate key?

|

---|---|---|---|---

|

(a) Any key that is not a primary key
(b) The key to use when the primary key does not work
(c) A key that was added to the table after the table was designed
(d) A key that will become the primary key when the primary key is deleted

---|---

|

8.

|

|

What does a _ projection _ operation do?

|

---|---|---|---|---

|

(a) It extends the number of columns in a table.
(b) It selects rows from a table.
(c) It extends the number of rows in a table.
(d) It selects columns from a table.

---|---

|

9.

|

|

The result of a set difference operation _ r - s _ will be

|

---|---|---|---|---

|

(a) tuples in _ r _ after deducting their values by the corresponding values in the tuples in _ s _
(b) tuples in _ s _ after deducting their values by the corresponding values in the tuples in _ r _
(c) those tuples that are in _ s _ but not in _ r _
(d) those tuples that are in _ r _ but not in _ s _

---|---

|

10.

|

|

Which of the following is true about primary keys and foreign keys holding NULL value?

|

---|---|---|---|---

|

(a) A primary key _ can _ hold a NULL value and a foreign key _ cannot _ hold a NULL value
(b) A primary key _ cannot _ hold a NULL value and a foreign key _ cannot _ hold a NULL value
(c) A primary key _ can _ hold a NULL value and a foreign key _ can _ hold a NULL value
(d) A primary key _ cannot _ hold a NULL value and a foreign key _ can _ hold a NULL value

---|---

|

11.

|

|

In contrast to _____ tables, a view refers to _____.

|

---|---|---|---|---

|

(a) base, a virtual table
(b) empty, non-empty tables
(c) non-empty, empty tables
(d) virtual, base tables

---|---

|

12.

|

|

When removing a table from the schema, using the CASCADE option would

|

---|---|---|---|---

|

(a) remove the table and all references to it
(b) recursively remove the table and all other tables that the removed table refers to
(c) remove the table and all other tables that the specified table refers to.
(d) remove the table if there are no references to it

---|---

|

13.

|

|

In a transaction, COMMIT specifies that

|

---|---|---|---|---

|

(a) all updates (including inserts, deletes, modifications) of a transaction are _ <span lang="EN-US" style="FONT-SIZE: 9pt; COLOR: black; FONT-FAMILY: Verdana" _

---|---

Published At
Categories with 数据库类
comments powered by Disqus