一份sql试题

题目:
一.单项选择

 

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 about to be made permanent in the database
 (b) all updates (including inserts, deletes, modifications) of a transaction are to be made permanent in the database
 (c) only the inserts and deletes of a transaction are to be made permanent in the database
 (d) only the inserts and deletes of a transaction are about to be made permanent in the database

 

14.

 

Which of the following is true about the physical storage of tables defined by views?

 

 

 (a) Extra physical storage is needed for storing the tables defined by views, only if views define additional non-existing columns.
 (b) There is no extra physical storage needed to store tables that a view defines.
 (c) Extra physical storage is always needed to store tables that a view defines.
 (d) Extra physical storage is needed to store tables that a view defines, only when rows are inserted into the view.

 

15.

 

Which of the following SQL commands can be used to change, add, or drop column definitions from a table?

 

 

 (a) MODIFY TABLE
 (b)
UPDATE TABLE
 (c)
CHANGE TABLE
 (d)
ALTER TABLE

 

16.

 

Which of the following SQL commands can be used to destroy and remove a table from the schema?

 

 

 (a) DROP TABLE
 (b)
DESTROY TABLE
 (c)
REMOVE TABLE
 (d)
DELETE TABLE

 

17.

 

In SQL, which of the following operators are used to check for set membership in a SELECT statement?

 

 

 (a) MEMBER and NOT MEMBER
 (b)
IN and NOT IN
 (c)
SUBSET and NOT SUBSET
 (d)
COMPONENT and NOT COMPONENT

 

18.

 

In SQL, the results of a _____ statement can be used to process a _____ statement.

 

 

 (a) INSERT, SELECT
 (b)
SELECT, INSERT
 (c)
INSERT, DELETE
 (d)
DELETE, INSERT

 

19.

 

In a transaction, a ROLLBACK is used to

 

 

 (a) roll all the updates (including inserts, deletes, modifications) of an aborted transaction into the database
 (b) roll only the inserts and deletes of an aborted transaction into the database
 (c) discard all the updates (including inserts, deletes, modifications) of a transaction from the database
 (d) discard only the inserts and updates of a transaction from the database

 

20.

 

When a string whose length is strictly less than n is entered as the value of a field whose SQL data type is CHAR(n), the system responds by

 

 

 (a) padding the end of the string with spaces to length n before storing it
 (b) padding the end of the string with
NULL characters to length n before storing it
 (c) re-prompting for the entry of a string whose length is exactly
n
 (d) storing the string as is

 


© Copyright 2004 iCarnegie, Inc. All rights reserved.

 二.问答类

Database Systems Practical

Answer the following questions:

1.      Let the following relational tables be given: R = (A, B, C) and S = (D, E, F) where A, B, C, D, E, and F are the attributes (columns). Write the SQL statements that will express each of the queries given below:

1.      ΠA(R)

2.      σB = 13(R)

3.      ΠA,B(R C = D S)

2.      Given relation r as:

ename

project

dept

Kasper

Forecast

Accounting

Kasper

Audit

Accounting

Kasper

Spreadsheet

Admin

Mohan

Forecast

Accounting

Mohan

Audit

Admin

Mohan

Spreadsheet

Admin

Lin

Forecast

Admin

Lin

Audit

Admin

Lin

Spreadsheet

Admin

3.      Given relation s as:

ename

dept

Kasper

Accounting

Mohan

Admin

Lin

Admin

4.      Provide the results of the following operations. If an operation cannot be performed, state the reasons. Do not write the equivalent SQL statements.

1.      σdept = 'Admin' AND project <> 'Audit'(r)

2.      r U s

3.      Πdept(r) - Πdept(s)

5.      Consider the following Mail Order database:

CUSTOMER

 

CId

Name

Address

Zip

11

George

23 Main St
.

15218

22

Barbara

3 Walnut St
.

15217

33

Waquim

82 Straton Av.

15280

 

6.

PART

 

Pno

Pname

UnitPrice

150

X

20.00

152

Y

33.00

153

Z

4.00

155

V

15.00

162

W

25.00

 

7.

ORDERS

 

Ono

CId

Received

Shipped

20

11

10-Dec-97

12-Dec-97

21

11

13-Feb-98

15-Feb-98

22

22

26-Feb-98

NULL

 

8.

INVOICE

 

Ono

Pno

Qty

BilledPrice

20

152

1

33.00

20

155

4

60.00

20

162

1

25.00

22

152

3

99.00

21

150

1

20.00

21

152

2

66.00

21

153

3

12.00

21

155

4

60.00

21

162

1

25.00

 

9.      In the table ORDERS above, specify in SQL the requirements that:

1.      Received date cannot be undefined and that

2.      the Shipped date, if it is not NULL, should be greater than the Received date.

10. Translate in SQL the following queries. Note: The "Received" column in ORDERS table above refers to when the order is received by the system (and not when the ordered items are received by the customer).

1.      Get the part number of parts that cost between 10 and 25 dollars.

2.      For each part sold in 1998, list the total quantity sold in 1998. Sort your results in ascending order by the total billed price for each part for that year. Parts are considered sold when an order is received. The BilledPrice column in the Invoice table indicates the total price billed for that part (i.e., quantity sold multiplied by unit price minus discount, if any).

3.      Get those parts that were not sold in 1998. A part is considered sold when an order is received.

11. Given the following schema definitions, specify in SQL2 the referential integrity constraint on the EMPLOYEE relation that will prevent an employee from being assigned to a non-existent department. 12. create table EMPLOYEE

 
13.   (id      id_dom primary key deferrable,
14.    name    name_dom,
15.    salary salary_dom,
16.    dname   dept_name_dom
17.    );
18. 

 

19. create table DEPARTMENT
20.    (name   dept_name_dom primary key deferrable,
21.     mgrid id_dom        foreign key references emp(id) deferrable,
22.     budget budget_dom
23.            );

 

 

 

 

 


© Copyright 2004 iCarnegie, Inc. All rights reserved.

我交的答案,很可能有错,等老帅评讲后,我再给出标准答案:
/*********************PARTI*********************/
Answer for Multiple-choice:
1 ~ 5:ABACC
6 ~10:DDADC
11~15:AABCD
16~20:ABBCD
/*********************PARTII*********************/
Answer for Practical:
1.
1)SELECT A
 FROM R
2)SELECT B
 FROM R
 WHERE B=’ 13’
3)USE Pubs
SELECT A,B FROM R INNER JOIN S
ON R.C=S.D
4.
1) ename     project        dept
  Kasper     Spreadsheet    Admin
Mohan       Spreadsheet    Admin
Lin          Forecast     Admin
Lin          Spreadsheet    Admin
2) ename     project        dept
Kasper     Forecast     Accounting
Kasper     Audit          Accounting
Kasper     Spreadsheet    Admin
Mohan     Forecast     Accounting
Mohan     Audit          Admin
Mohan     Spreadsheet    Admin
Lin          Forecast     Admin
Lin          Audit          Admin
Lin          Spreadsheet    Admin
3)这里将不会返回任何值,因为语句的意思是取出列dept中属于r但不属于s的所有值,显然不存在这样的值。
9.

1)ALTER TABLE ORDERS

ALTER COLUMN Received

   datetime NOT NULL
2)ALTER TABLE ORDERS
 CONSTRAINT Shipped1 UNIQUE(Shipped)
 CONSTRAINT Shipped2 CHECK(Shipped = “” OR Shipped > Received)
10.
1)      SELECT Pno
FROM PART
WHERE UnitPrice > 10 AND UnitPrice <25
2) SELECT Ono,Qty,BilledPrice
FROM INVOICE
WHERE Ono IN (SELECT Ono
                 FROM ORDERS
                 WHERE Received LIKE "%1998")
COMPUTE SUM(Qty)
ORDER BY BilledPrice ASC
3) SELECT Ono,Pno,Qty,BilledPrice
     FROM INVOICE
     WHERE Ono NOT IN (SELECT Ono
                         FROM ORDERS
                         WHERE Received LIKE "%1998"))
11.
CREATE TABLE EMPLOYEE(

id_dom NUMERIC(20) NOT NULL,

name_dom VARCHAR(40) NOT NULL,

salary_dom VARCHAR(40) NOT NULL,

dept_name_dom VARCHAR(40) NOT NULL,

PRIMARY KEY (id_dom));

CREATE TABLE DEPARTMENT(

dept_name_dom VARCHAR(40) NOT NULL,
id_dom NUMERIC(20) NOT NULL,

budget_dom VARCHAR(40) NOT NULL,

PRIMARY KEY (dept_name_dom),

FOREIGN KEY ( id_dom ) REFERENCES EMPLOYEE ( id_dom ));


Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=347411

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 
[ 点击此处收藏本文]   发表于 2005年04月14日 3:05 PM
href="http://blog.csdn.net/SoakTech/Services/Pingback.aspx" rel="pingback" /> <script>document.write(" ");</script>
 
DragonShard 发表于2005-04-17 12:01 PM  IP: 220.167.42.*
这里的blog程序急需改进!!!

 
shinji1984 发表于2005-04-21 9:56 AM  IP: 220.167.41.*
不如自己做一个吧.

 
jaye 发表于2005-07-06 12:37 AM  IP: 61.186.252.*
我尝试用储存过程来建立一个表。
要求此table的名字是动态赋予的,但是因为对储存过程的不了解,请求大家的帮助
主要是
1。N'[dbo].'+@tablename 写错了不知道怎么写
2。CREATE TABLE '[dbo].'+@tablename 也不知道怎么写

CREATE PROCEDURE [dbo].copyadminproducts
@tablename nvarchar(20)
AS
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].'+@tablename and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table '[dbo].'+@tablename
CREATE TABLE '[dbo].'+@tablename (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[productsname] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
[productsid] [int] NULL ,
[creteddate] [datetime] NULL
) ON [PRIMARY]
ALTER TABLE '[dbo].'+@tablename WITH NOCHECK ADD
CONSTRAINT [PK_@tablename] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
ALTER TABLE '[dbo].'+@tablename ADD
CONSTRAINT [DF_@tablename_creteddate] DEFAULT (getdate()) FOR [creteddate],
CONSTRAINT [IX_@tablename] UNIQUE NONCLUSTERED
(
[productsid]
) ON [PRIMARY] ,
CONSTRAINT [IX_@tablename_1] UNIQUE NONCLUSTERED
(
[productsname]
) ON [PRIMARY]
GO

 
月如 发表于2005-11-03 12:44 AM  IP: 222.20.230.*
真是好啊,实事更新考题就好了
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
View Assessment Result: Multiple-Choice Quiz 2 Your performance was as follows: 1. The degree of a table is the number of _____ in the table. (a) keys (b) columns (c) rows (d) foreign keys Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) -------------------------------------------------------------------------------- 2. The arity of a table is the number of _____ in the table. (a) keys (b) columns (c) foreign keys (d) rows Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) -------------------------------------------------------------------------------- 3. What information is necessary when specifying the structure of a table? (a) the name of the table and the amount of storage space to be allocated to the table (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (c) the name of the table and the names of the table's attributes (d) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) -------------------------------------------------------------------------------- 4. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. must have, name need not have, name must have, domain (a) I, II, and III (b) I and II (c) I and III (d) II and III Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) -------------------------------------------------------------------------------- 5. Which of the following SQL statements can be used to add a row to a table? (a) CREATE (b) INSERT (c) APPEND (d) ADD Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) -------------------------------------------------------------------------------- 6. A difference operation can be applied to tables that (a) are union compatible (b) have the same column names (c) have the same name (d) are the same size Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) -------------------------------------------------------------------------------- 7. Which of the following SQL statements can be used to create a relational table? (a) INSERT (b) ADD (c) CREATE (d) APPEND Correct answer is (c) Your score on this question is: 10.00 Feedback: (c) -------------------------------------------------------------------------------- 8. For two tables to be union compatible, the tables should be the same with respect to which of the following? (a) keys (b) cardinality (c) name (d) degree Correct answer is (d) Your score on this question is: 0.00 Feedback: (b) -------------------------------------------------------------------------------- 9. A deletion operation will _____ if the deletion leads to the violation of a referential integrity constraint. (a) fail (b) succeed with warning (c) succeed without warning (d) crash the system Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) -------------------------------------------------------------------------------- 10. With Query By Example, a user enters a query by (a) filling in skeleton tables of the database with examples of what is to be retrieved (b) placing SQL keywords, such as select, under the column names they want to retrieve (c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (d) writing an English description of the data that the user needs Correct answer is (a) Your score on this question is: 10.00 Feedback: See section 1.2.3 in the course notes. (a) -------------------------------------------------------------------------------- Go to top of assessment. Total score: 90.00 ? Copyright 2008 iCarnegie, Inc. All rights reserved. 1. In the Entity-Relationship model, the degree of a relationship specifies which of the following? (a) The cardinality ratio of the relationship (b) The number of integrity constraints required to implement the relationship (c) The number of attributes that characterize the relationship (d) The number of entities that participate in the relationship Correct answer is (d) 2. In an ER model, which of the following is true about a component attribute? (a) A component attribute is always atomic. (b) Component attributes must always be combined by an aggregation operation. (c) A component attribute can be a composite attribute. (d) A component attribute always contains other components. Correct answer is (c) 3. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) attributes (b) participation constraints (c) entity types (d) weak entities Correct answer is (a) 4. What is an identifying owner in an ER model? (a) The entity upon which a weak entity's existence depends (b) The relationship that identifies a weak entity's owner (c) The entity upon which a strong entity's existence depends (d) The relationship that identifies a strong entity's owner Correct answer is (a) 5. In an ER model, the cardinality ratio of a relationship type is (a) the number of instances of relationships of that relationship type (b) the number of entity types involved in that relationship type (c) the number of relationships of that relationship type in which an entity can participate (d) the minimum number of entities that can participate in that relationship type Correct answer is (c) 6. Which of the following is true about storage for derived attributes? (a) Derived attributes must not be stored. (b) Derived attributes are usually stored because storage improves retrieval performance. (c) Derived attributes must be stored. (d) Derived attributes are usually not stored because they can be computed. Correct answer is (d) 7. In an ER model, what is a recursive relationship type? (a) A never-ending type of relationship (b) The type of relationship that does not belong anywhere (c) The type of relationship between entities of one entity type (d) The relationship type where the related entities are one and the same Correct answer is (c) 8. In EER modeling, generalization is the process of generating (a) superclasses out of subclasses (b) subclasses out of superclasses (c) entities out of attributes (d) attributes out of entities Correct answer is (a) 9. When mapping from an ER model to a relational model, a strong entity is mapped into a (a) table (b) row (c) column (d) key Correct answer is (a) 10. Which of the following is true about attributes in a relational model? Attributes can be multi-valued. Attributes can be composite. (a) Both I and II (b) II only (c) Neither I nor II (d) I only Correct answer is (c) 1. In an ER model, what is a recursive relationship type? (a) The relationship type where the related entities are one and the same (b) The type of relationship that does not belong anywhere (c) The type of relationship between entities of one entity type (d) A never-ending type of relationship Correct answer is (c) 2. In an ER model, the cardinality ratio of a relationship type is (a) the number of relationships of that relationship type in which an entity can participate (b) the minimum number of entities that can participate in that relationship type (c) the number of entity types involved in that relationship type (d) the number of instances of relationships of that relationship type Correct answer is (a) 3. In the Entity-Relationship model, a derived attribute is one (a) that is composed of multiple atomic attributes (b) that characterizes a relationship instead of an entity (c) that may have multiple values simultaneously (d) whose value can be computed from the values of other attributes Correct answer is (d) 4. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) entity types (b) weak entities (c) attributes (d) participation constraints Correct answer is (c) 5. Which of the following is true about storage for derived attributes? (a) Derived attributes must be stored. (b) Derived attributes are usually stored because storage improves retrieval performance. (c) Derived attributes must not be stored. (d) Derived attributes are usually not stored because they can be computed. Correct answer is (d) 6. What is an identifying owner in an ER model? (a) The relationship that identifies a weak entity's owner (b) The relationship that identifies a strong entity's owner (c) The entity upon which a strong entity's existence depends (d) The entity upon which a weak entity's existence depends Correct answer is (d) 7. In an ER model, which of the following is true about a component attribute? (a) A component attribute always contains other components. (b) A component attribute can be a composite attribute. (c) A component attribute is always atomic. (d) Component attributes must always be combined by an aggregation operation. Correct answer is (b) 8. In EER modeling, generalization is the process of generating (a) attributes out of entities (b) superclasses out of subclasses (c) subclasses out of superclasses (d) entities out of attributes Correct answer is (b) 9. When mapping from an ER model to a relational model, a strong entity is mapped into a (a) key (b) row (c) column (d) table Correct answer is (d) 10. Which of the following is true about attributes in a relational model? Attributes can be multi-valued. Attributes can be composite. (a) I only (b) II only (c) Neither I nor II (d) Both I and II Correct answer is (c) 1. Through normalization, update anomalies (a) can be eliminated (b) is usually left unchanged (c) can be maximized (d) can be minimized but not eliminated Correct answer is (a) 2. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) III only (b) None (c) I and II only (d) II and III only Correct answer is (a) 3. Which of the following statements concerning normal forms is true? (a) A relation that is in second normal form is also in first normal form. (b) The lower the normal form number, the better the schema design is. (c) Each normal form contains a state of independent properties, unrelated to other normal forms. (d) Schemas that are in second normal form are considered the best. Correct answer is (a) 4. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) None (b) II only (c) I only (d) I and II Correct answer is (a) 5. Which of the following problems can be caused by data redundancy in a relational schema? Inefficient use of space Update anomalies and possible loss of data Inefficient use of processing time (a) I and II only (b) I and III only (c) I, II, and III (d) II only Correct answer is (c) 6. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) None (b) I only (c) I, II and III (d) I and II only Correct answer is (d) 7. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a non-primary key, a foreign key (b) a primary key, a non-primary key (c) a primary key, a foreign key (d) a non-primary key, the primary key Correct answer is (d) 8. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, added to (b) no, removed from (c) at least one, removed from (d) at least one, added to Correct answer is (b) 9. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every non-primary-key, the primary key (b) every alternate key, the primary key (c) every non-key, every key (d) every non-key, at least one key Correct answer is (a) 10. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) at least one, removed from (b) at least one, added to (c) no, added to (d) no, removed from Correct answer is (a) 1. Through normalization, update anomalies (a) can be eliminated (b) is usually left unchanged (c) can be minimized but not eliminated (d) can be maximized Correct answer is (a) 2. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) None (b) I and II (c) I only (d) II only Correct answer is (a) 3. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) III only (b) None (c) II and III only (d) I and II only Correct answer is (a) 4. Through normalization, data redundancy (a) can be eliminated (b) can be maximized (c) can be minimized but not eliminated (d) are usually left unchanged Correct answer is (a) 5. Which of the following statements concerning normal forms is true? (a) A relation that is in second normal form is also in first normal form. (b) Each normal form contains a state of independent properties, unrelated to other normal forms. (c) Schemas that are in second normal form are considered the best. (d) The lower the normal form number, the better the schema design is. Correct answer is (a) 6. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a primary key, a foreign key (b) a primary key, a non-primary key (c) a non-primary key, a foreign key (d) a non-primary key, the primary key Correct answer is (d) 7. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, removed from (b) at least one, removed from (c) at least one, added to (d) no, added to Correct answer is (a) 8. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) I, II and III (b) None (c) I and II only (d) I only Correct answer is (c) 9. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every alternate key, the primary key (b) every non-key, at least one key (c) every non-key, every key (d) every non-primary-key, the primary key Correct answer is (d) 10. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, added to (b) no, removed from (c) at least one, added to (d) at least one, removed from Correct answer is (d) 1. What is an identifying owner in an ER model? (a) The entity upon which a weak entity's existence depends (b) The relationship that identifies a weak entity's owner (c) The relationship that identifies a strong entity's owner (d) The entity upon which a strong entity's existence depends Correct answer is (a) 2. In an ER model, the cardinality ratio of a relationship type is (a) the minimum number of entities that can participate in that relationship type (b) the number of instances of relationships of that relationship type (c) the number of entity types involved in that relationship type (d) the number of relationships of that relationship type in which an entity can participate Correct answer is (d) 3. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) entity types (b) participation constraints (c) weak entities (d) attributes Correct answer is (d) 4. In an ER model, what is a recursive relationship type? (a) A never-ending type of relationship (b) The relationship type where the related entities are one and the same (c) The type of relationship between entities of one entity type (d) The type of relationship that does not belong anywhere Correct answer is (c) 5. In the Entity-Relationship model, a derived attribute is one (a) that characterizes a relationship instead of an entity (b) that may have multiple values simultaneously (c) whose value can be computed from the values of other attributes (d) that is composed of multiple atomic attributes Correct answer is (c) 6. In the Entity-Relationship model, the degree of a relationship specifies which of the following? (a) The number of attributes that characterize the relationship (b) The number of entities that participate in the relationship (c) The cardinality ratio of the relationship (d) The number of integrity constraints required to implement the relationship Correct answer is (b) 7. Which of the following is true about storage for derived attributes? (a) Derived attributes are usually not stored because they can be computed. (b) Derived attributes are usually stored because storage improves retrieval performance. (c) Derived attributes must be stored. (d) Derived attributes must not be stored. Correct answer is (a) 8. In EER modeling, generalization is the process of generating (a) superclasses out of subclasses (b) entities out of attributes (c) subclasses out of superclasses (d) attributes out of entities Correct answer is (a) 9. When mapping from an ER model to a relational model, a strong entity is mapped into a (a) key (b) table (c) row (d) column Correct answer is (b) 10. Which of the following is true about attributes in a relational model? Attributes can be multi-valued. Attributes can be composite. (a) II only (b) I only (c) Both I and II (d) Neither I nor II Correct answer is (d) 1. Which of the following is true about storage for derived attributes? (a) Derived attributes are usually stored because storage improves retrieval performance. (b) Derived attributes must be stored. (c) Derived attributes are usually not stored because they can be computed. (d) Derived attributes must not be stored. Correct answer is (c) 2. In an ER model, the cardinality ratio of a relationship type is (a) the minimum number of entities that can participate in that relationship type (b) the number of entity types involved in that relationship type (c) the number of relationships of that relationship type in which an entity can participate (d) the number of instances of relationships of that relationship type Correct answer is (c) 3. In the Entity-Relationship model, the degree of a relationship specifies which of the following? (a) The number of attributes that characterize the relationship (b) The number of integrity constraints required to implement the relationship (c) The cardinality ratio of the relationship (d) The number of entities that participate in the relationship Correct answer is (d) 4. In the Entity-Relationship model, properties that characterize entities and relationships are modeled as (a) weak entities (b) participation constraints (c) attributes (d) entity types Correct answer is (c) Your score on this question is: 0.00 5. A weak entity type implies a (a) weak relationship type (b) relationship with total participation constraint (c) strong relationship type (d) relationship with partial participation constraint Correct answer is (b) 6. In an ER model, which of the following is true about a component attribute? (a) A component attribute can be a composite attribute. (b) Component attributes must always be combined by an aggregation operation. (c) A component attribute always contains other components. (d) A component attribute is always atomic. Correct answer is (a) 7. In the Entity-Relationship model, a derived attribute is one (a) that characterizes a relationship instead of an entity (b) that is composed of multiple atomic attributes (c) whose value can be computed from the values of other attributes (d) that may have multiple values simultaneously Correct answer is (c) 1. Through normalization, update anomalies (a) is usually left unchanged (b) can be minimized but not eliminated (c) can be maximized (d) can be eliminated Correct answer is (d) 2. Which of the following problems can be caused by data redundancy in a relational schema? Inefficient use of space Update anomalies and possible loss of data Inefficient use of processing time (a) I and II only (b) I and III only (c) II only (d) I, II, and III Correct answer is (d) 3. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) I only (b) I and II (c) II only (d) None Correct answer is (d) 4. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) III only (b) II and III only (c) I and II only (d) None Correct answer is (a) 5. Which of the following statements concerning normal forms is true? (a) Schemas that are in second normal form are considered the best. (b) Each normal form contains a state of independent properties, unrelated to other normal forms. (c) A relation that is in second normal form is also in first normal form. (d) The lower the normal form number, the better the schema design is. Correct answer is (c) 6. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) at least one, added to (b) at least one, removed from (c) no, removed from (d) no, added to Correct answer is (b) 7. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every non-primary-key, the primary key (b) every non-key, at least one key (c) every non-key, every key (d) every alternate key, the primary key Correct answer is (a) 8. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) I only (b) None (c) I and II only (d) I, II and III Correct answer is (c) 9. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, removed from (b) at least one, removed from (c) at least one, added to (d) no, added to Correct answer is (a) 10. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a primary key, a foreign key (b) a non-primary key, a foreign key (c) a non-primary key, the primary key (d) a primary key, a non-primary key Correct answer is (c) 1. Which of the following statements concerning normal forms is true? (a) The lower the normal form number, the better the schema design is. (b) A relation that is in second normal form is also in first normal form. (c) Schemas that are in second normal form are considered the best. (d) Each normal form contains a state of independent properties, unrelated to other normal forms. Correct answer is (b) 2. Consider the following functional dependency. {A, B} -> {C} Regarding this dependency, which of the following statements is (are) true? The values of C are uniquely determined by the values of A. The values of A are uniquely determined by the values of C. (a) I only (b) II only (c) I and II (d) None Correct answer is (d) 3. Which of the following problems can be caused by data redundancy in a relational schema? Inefficient use of space Update anomalies and possible loss of data Inefficient use of processing time (a) I, II, and III (b) I and II only (c) I and III only (d) II only Correct answer is (a) Y 4. Through normalization, update anomalies (a) can be eliminated (b) can be maximized (c) is usually left unchanged (d) can be minimized but not eliminated Correct answer is (a) 5. Which of the following is a property (are properties) exhibited by good relational schemas? The use of null values in tuples The grouping of as many attributes as possible into one main table The elimination of data redundancy to avoid update anomalies (a) I and II only (b) III only (c) None (d) II and III only Correct answer is (b) 6. Consider a table with atomic attributes A, B, and C and the following functional dependencies. A -> B B -> C If the primary key of this table is attribute A, then this relation satisfies which of the following normal forms? First Second Third (a) I and II only (b) I only (c) I, II and III (d) None Correct answer is (a) 7. For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____. (a) a non-primary key, a foreign key (b) a primary key, a foreign key (c) a primary key, a non-primary key (d) a non-primary key, the primary key Correct answer is (d) 8. The FD X -> Y is a partial dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) at least one, added to (b) no, removed from (c) no, added to (d) at least one, removed from Correct answer is (d) 9. For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____. (a) every non-primary-key, the primary key (b) every alternate key, the primary key (c) every non-key, every key (d) every non-key, at least one key Correct answer is (a) 10. The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds. (a) no, added to (b) at least one, removed from (c) at least one, added to (d) no, removed from Correct answer is (d) 1. In an ER model, which of the following is true about a composite attribute? (a) A composite attribute can have a method attached to it. (b) A composite attribute cannot be broken into more basic attributes. (c) A composite attribute can be broken into more basic attributes. (d) A composite attribute can only be designed by users with special privileges. Correct answer is (c) 2. The term physical data independence refers to the ability to change (a) the physical layout of the data without changing the external schemas, the conceptual schemas, or the application programs (b) the data without physically relocating the tables (c) the conceptual schema without changing the application programs (d) the application programs without changing the conceptual schema Correct answer is (a) 3. What attributes does a subclass have? (a) None of the attributes of its superclass (b) All the attributes of its superclass, and possibly more (c) Just the attributes from the superclass (d) A subset of the attributes of its superclass Correct answer is (b) 4. If X -> Y, which of the following would make Y fully dependent on X? (a) Y is a single attribute (b) X is a single attribute (c) X consists of multiple attributes (d) Y consists of multiple attributes Correct answer is (b) 5. In an ER model, what is the degree of a relationship type? (a) The validity of the relationship type (b) The strength of the relationship type (c) The number of entity types participating in the relationship type (d) The number of instances of the relationship type Correct answer is (c) 6. Database design typically consists of which of the following phases? Conceptual design Logical design Physical design (a) II only (b) I, II, and III (c) II and III only (d) I only Correct answer is (b) 7. A relational schema is in first normal form, if the domain of all of its (a) primary keys are not multi-valued (b) primary keys and alternate keys are not multi-valued (c) primary keys are not composite (d) attributes can take on only atomic values Correct answer is (d) 8. In an ER model, a derived attribute is one whose values (a) have been derived at some time in the past (b) can be derived from the values of some other attributes (c) can be derived from the system tables (d) can be derived from another table Correct answer is (b) 9. Y is transitively dependent on X, if (a) X -> Y and A -> Y (b) X -> A, B and A -> Y (c) X -> Y and Y -> A (d) X -> A, B and Y -> A, B Correct answer is (b) 10. Relationships in an ER model are primarily translated to which of the following in a relational model? (a) relationships (b) primary keys and foreign keys (c) three-way tables (d) dummy relationship tables Correct answer is (b) View Assessment Result With Query By Example, a user enters a query by (a) filling in skeleton tables of the database with examples of what is to be retrieved (b) placing SQL keywords, such as select, under the column names they want to retrieve (c) writing an English description of the data that the user needs (d) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database F Your performance was as follows: You took 2 minutes on this assessment from Tue Mar 17 05:22:13 UTC+0800 2009 to Tue Mar 17 05:24:13 UTC+0800 2009. Total score: 100.00 1. An E-Commerce system consists of the following components. Which of the same components must be included in a database management system? 1 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 2 A collection of programs must be included that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains, such as in a library information system. 3 A collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) II only (b) I, II, and III (c) I only (d) II and III only Correct answer is (a) Your score on this question is: 14.29 Feedback: A DBMS refers to just the set of general-purpose programs to control data. (a) 2. An E-Commerce system consists of the following components. Which of these same components will constitute a database system? 4 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 5 A collection of programs that control the data, such as programs to create, maintain, and manipulate the data constitutes a database system. These programs can be easily used to create, maintain, and manipulate data in other domains such as in a library information system. 6 A collection of programs that operate on the data, but are specific to the E-commerce system, constitutes a database system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I only (b) I, II, and III (c) I and II only (d) II only Correct answer is (b) Your score on this question is: 14.29 Feedback: A database system includes the data, the DBMS, and the application-specific programs that operate on that data. (b) 3. An E-Commerce system consists of the following components. Which of these same components must be included in a database? 7 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 8 A database must include a collection of programs that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains. 9 A database must include a collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I and II only (b) I only (c) II only (d) I, II, and III Correct answer is (b) Your score on this question is: 14.29 Feedback: Database refers to just the data (b) 4. An E-Commerce database contains data about customers, products, orders, system response times, etc. Which of the following can be specified as integrity constraints in an E-Commerce database system? 10 No two products can have the same product ID. 11 The DBMS response time for all Web requests should be at most 2 seconds. 12 A customer order cannot have more than one shipping address. (a) I and III only (b) I and II only (c) I only (d) I, II, and III Correct answer is (a) Your score on this question is: 14.29 Feedback: The constraints I, II and III specify the application semantics of the data captured in the E-Commerce database. Constraint II, although it seems contrary to common sense, is not something that can be prohibited by the DBMS because the DBMS is general purpose. The response time of the DBMS cannot be enforced by the DBMS. It depends on factors such the processor speed, memory available, etc. (a) 5. In a database system, whose responsibility is it to provide data consistency? (a) the user's (b) the application programmer's (c) the DBMS's (d) the database administrator's Correct answer is (c) Your score on this question is: 14.29 Feedback: (c) 6. A database is needed for which of the following application scenarios? 13 A video store that needs to keep track of data about members, about videos carried by the store, about videos rented by members, as well as data concerning borrow-date, return-date, and payment information. 14 In the human resources department of a company, information about employees, their titles, their salaries and sick days, and about vacation days taken by each employee. 15 A computer-simulated video game which needs to calculate and display, the physical (x, y) location of each actor in the game, the speed with which they are moving at the current instant, the direction in which they are moving, the action they are performing, the angle at which the game-player is viewing the scene. (a) I only (b) I, II, and III (c) I and II only (d) I and III only Correct answer is (c) Your score on this question is: 14.29 Feedback: (c) 7. The physical storage structure will be _____ to the application programmer in a database approach, and will be _____ to the application programmer in a file system approach. (a) hidden, hidden (b) hidden, visible (c) visible, visible (d) visible, hidden Correct answer is (b) Your score on this question is: 14.29 Feedback: The layer of abstraction offered by a DBMS hides the physical storage structure from the application programmer. (b) Go to top of assessment. Total score: 100.00 Your performance was as follows: You took 3 minutes on this assessment from Tue Mar 17 04:27:27 UTC+0800 2009 to Tue Mar 17 04:30:02 UTC+0800 2009. Total score: 85.71 1. An E-Commerce system consists of the following components. Which of these same components must be included in a database? 1 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 2 A database must include a collection of programs that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains. 3 A database must include a collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) II only (b) I and II only (c) I only (d) I, II, and III Correct answer is (c) Your score on this question is: 14.29 Feedback: Database refers to just the data (c) 2. In a database system, whose responsibility is it to provide data consistency? (a) the database administrator's (b) the user's (c) the application programmer's (d) the DBMS's Correct answer is (d) Your score on this question is: 14.29 Feedback: (d) 3. An E-Commerce system consists of the following components. Which of these same components will constitute a database system? 4 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 5 A collection of programs that control the data, such as programs to create, maintain, and manipulate the data constitutes a database system. These programs can be easily used to create, maintain, and manipulate data in other domains such as in a library information system. 6 A collection of programs that operate on the data, but are specific to the E-commerce system, constitutes a database system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I, II, and III (b) I only (c) I and II only (d) II only Correct answer is (a) Your score on this question is: 14.29 Feedback: A database system includes the data, the DBMS, and the application-specific programs that operate on that data. (a) 4. An E-Commerce system consists of the following components. Which of the same components must be included in a database management system? 7 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 8 A collection of programs must be included that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains, such as in a library information system. 9 A collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I only (b) I, II, and III (c) II only (d) II and III only Correct answer is (c) Your score on this question is: 0.00 Feedback: A DBMS refers to just the set of general-purpose programs to control data. (d) 5. An E-Commerce database contains data about customers, products, orders, system response times, etc. Which of the following can be specified as integrity constraints in an E-Commerce database system? 10 No two products can have the same product ID. 11 The DBMS response time for all Web requests should be at most 2 seconds. 12 A customer order cannot have more than one shipping address. (a) I, II, and III (b) I only (c) I and II only (d) I and III only Correct answer is (d) Your score on this question is: 14.29 Feedback: The constraints I, II and III specify the application semantics of the data captured in the E-Commerce database. Constraint II, although it seems contrary to common sense, is not something that can be prohibited by the DBMS because the DBMS is general purpose. The response time of the DBMS cannot be enforced by the DBMS. It depends on factors such the processor speed, memory available, etc. (d) 6. A database is needed for which of the following application scenarios? 13 A video store that needs to keep track of data about members, about videos carried by the store, about videos rented by members, as well as data concerning borrow-date, return-date, and payment information. 14 In the human resources department of a company, information about employees, their titles, their salaries and sick days, and about vacation days taken by each employee. 15 A computer-simulated video game which needs to calculate and display, the physical (x, y) location of each actor in the game, the speed with which they are moving at the current instant, the direction in which they are moving, the action they are performing, the angle at which the game-player is viewing the scene. (a) I and II only (b) I only (c) I, II, and III (d) I and III only Correct answer is (a) Your score on this question is: 14.29 Feedback: (a) 7. The physical storage structure will be _____ to the application programmer in a database approach, and will be _____ to the application programmer in a file system approach. (a) visible, hidden (b) hidden, hidden (c) hidden, visible (d) visible, visible Correct answer is (c) Your score on this question is: 14.29 Feedback: The layer of abstraction offered by a DBMS hides the physical storage structure from the application programmer. (c) Go to top of assessment. Total score: 85.71 Total score: 42.86 1. An E-Commerce system consists of the following components. Which of these same components must be included in a database? 1 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 2 A database must include a collection of programs that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains. 3 A database must include a collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I and II only (b) I only (c) II only (d) I, II, and III Correct answer is (b) Your score on this question is: 14.29 Feedback: Database refers to just the data (b) 2. In a database system, whose responsibility is it to provide data consistency? (a) the DBMS's (b) the user's (c) the application programmer's (d) the database administrator's Correct answer is (a) Your score on this question is: 0.00 Feedback: (d) 3. An E-Commerce system consists of the following components. Which of these same components will constitute a database system? 4 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 5 A collection of programs that control the data, such as programs to create, maintain, and manipulate the data constitutes a database system. These programs can be easily used to create, maintain, and manipulate data in other domains such as in a library information system. 6 A collection of programs that operate on the data, but are specific to the E-commerce system, constitutes a database system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) II only (b) I and II only (c) I, II, and III (d) I only Correct answer is (c) Your score on this question is: 0.00 Feedback: A database system includes the data, the DBMS, and the application-specific programs that operate on that data. (a) 4. An E-Commerce system consists of the following components. Which of the same components must be included in a database management system? 7 The data, such as information about the goods available for sale, customers, orders placed, shipping information, etc. 8 A collection of programs must be included that control the data, such as programs to create, maintain, and manipulate the data. These programs can be easily used to create, maintain, and manipulate data in other domains, such as in a library information system. 9 A collection of programs that operate on the data, but are specific to the E-commerce system. These programs enable users to browse through the store-items, place orders, track shipping, etc. (a) I, II, and III (b) II only (c) I only (d) II and III only Correct answer is (b) Your score on this question is: 0.00 Feedback: A DBMS refers to just the set of general-purpose programs to control data. (d) 5. An E-Commerce database contains data about customers, products, orders, system response times, etc. Which of the following can be specified as integrity constraints in an E-Commerce database system? 10 No two products can have the same product ID. 11 The DBMS response time for all Web requests should be at most 2 seconds. 12 A customer order cannot have more than one shipping address. (a) I only (b) I and III only (c) I and II only (d) I, II, and III Correct answer is (b) Your score on this question is: 0.00 Feedback: The constraints I, II and III specify the application semantics of the data captured in the E-Commerce database. Constraint II, although it seems contrary to common sense, is not something that can be prohibited by the DBMS because the DBMS is general purpose. The response time of the DBMS cannot be enforced by the DBMS. It depends on factors such the processor speed, memory available, etc. (d) 6. A database is needed for which of the following application scenarios? 13 A video store that needs to keep track of data about members, about videos carried by the store, about videos rented by members, as well as data concerning borrow-date, return-date, and payment information. 14 In the human resources department of a company, information about employees, their titles, their salaries and sick days, and about vacation days taken by each employee. 15 A computer-simulated video game which needs to calculate and display, the physical (x, y) location of each actor in the game, the speed with which they are moving at the current instant, the direction in which they are moving, the action they are performing, the angle at which the game-player is viewing the scene. (a) I only (b) I and II only (c) I, II, and III (d) I and III only Correct answer is (b) Your score on this question is: 14.29 Feedback: (b) 7. The physical storage structure will be _____ to the application programmer in a database approach, and will be _____ to the application programmer in a file system approach. (a) visible, visible (b) visible, hidden (c) hidden, visible (d) hidden, hidden Correct answer is (c) Your score on this question is: 14.29 Feedback: The layer of abstraction offered by a DBMS hides the physical storage structure from the application programmer. (c) Go to top of assessment. The arity of a table is the number of _____ in the table. (a) rows (b) columns (c) keys (d) foreign keys Correct answer is (b) Your score on this question is: 10.00 Feedback: 2. The cardinality of a table is the number of _____ in the table. (a) rows (b) foreign keys (c) keys (d) columns Correct answer is (a) Your score on this question is: 10.00 Feedback: 3. The degree of a table is the number of _____ in the table. (a) rows (b) columns (c) foreign keys (d) keys Correct answer is (b) Your score on this question is: 10.00 Feedback: 4. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. 1 must have, name 2 need not have, name 3 must have, domain (a) I and III (b) II and III (c) I, II, and III (d) I and II Correct answer is (b) Your score on this question is: 10.00 Feedback: 5. The SQL clause to perform a set UNION operation is (a) MELD (b) UNITE (c) UNION (d) COMBINE Correct answer is (c) Your score on this question is: 10.00 Feedback: 6. DML is used to (a) manipulate the structure of database applications. (b) add/modify/delete data in the database. (c) specify the structure of a database. (d) add and delete tables. Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. DDL is used to (a) specify the structure of a database. (b) add contents to tables. (c) access the contents of tables. (d) define the structure of database applications. Correct answer is (a) Your score on this question is: 10.00 Feedback: 8. Which of the following SQL statements can be used to create a relational table? (a) APPEND (b) CREATE (c) ADD (d) INSERT Correct answer is (b) Your score on this question is: 10.00 Feedback: 9. Which of the following SQL statements can be used to modify just one row (out of many rows) in a table? (a) CHANGE (b) UPDATE (c) ALTER (d) MODIFY Correct answer is (b) Your score on this question is: 0.00 Feedback: 10. The term query by example refers to (a) a visual query language developed by IBM (b) a query for SQL examples (c) example SQL queries provided by the DBMS that users can modify to suit their current needs (d) example SQL queries provided by other users that can be modified to suit current needs Correct answer is (a) Your score on this question is: 10.00 Feedback: See section 1.2.3 in the course notes. Your performance was as follows: You took 4 minutes on this assessment from Wed Mar 29 08:46:41 UTC+0800 2006 to Wed Mar 29 08:50:36 UTC+0800 2006. Total score: 90.00 1. What information is necessary when specifying the structure of a table? (a) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (c) the name of the table and the names of the table's attributes (d) the name of the table and the amount of storage space to be allocated to the table Correct answer is (a) Your score on this question is: 0.00 Feedback: 2. The cardinality of a table is the number of _____ in the table. (a) columns (b) foreign keys (c) rows (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. The arity of a table is the number of _____ in the table. (a) foreign keys (b) keys (c) rows (d) columns Correct answer is (d) Your score on this question is: 10.00 Feedback: 4. The degree of a table is the number of _____ in the table. (a) rows (b) foreign keys (c) columns (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 5. A difference operation can be applied to tables that (a) are union compatible (b) have the same name (c) are the same size (d) have the same column names Correct answer is (a) Your score on this question is: 10.00 Feedback: 6. Which of the following SQL statements can be used to remove a row from a table? (a) DESTROY (b) DELETE (c) ERASE (d) REMOVE Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. DML is used to (a) add/modify/delete data in the database. (b) add and delete tables. (c) manipulate the structure of database applications. (d) specify the structure of a database. Correct answer is (a) Your score on this question is: 10.00 Feedback: 8. A deletion operation will _____ if the deletion leads to the violation of a referential integrity constraint. (a) fail (b) succeed with warning (c) succeed without warning (d) crash the system Correct answer is (a) Your score on this question is: 10.00 Feedback: 9. DDL is used to (a) access the contents of tables. (b) add contents to tables. (c) define the structure of database applications. (d) specify the structure of a database. Correct answer is (d) Your score on this question is: 10.00 Feedback: 10. With Query By Example, a user enters a query by (a) writing an English description of the data that the user needs (b) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (c) filling in skeleton tables of the database with examples of what is to be retrieved (d) placing SQL keywords, such as select, under the column names they want to retrieve Correct answer is (c) Your score on this question is: 10.00 1. What information is necessary when specifying the structure of a table? (a) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (b) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (c) the name of the table and the names of the table's attributes (d) the name of the table and the amount of storage space to be allocated to the table Correct answer is (a) Your score on this question is: 0.00 Feedback: 2. The cardinality of a table is the number of _____ in the table. (a) columns (b) foreign keys (c) rows (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. The arity of a table is the number of _____ in the table. (a) foreign keys (b) keys (c) rows (d) columns Correct answer is (d) Your score on this question is: 10.00 Feedback: 4. The degree of a table is the number of _____ in the table. (a) rows (b) foreign keys (c) columns (d) keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 5. A difference operation can be applied to tables that (a) are union compatible (b) have the same name (c) are the same size (d) have the same column names Correct answer is (a) Your score on this question is: 10.00 Feedback: 6. Which of the following SQL statements can be used to remove a row from a table? (a) DESTROY (b) DELETE (c) ERASE (d) REMOVE Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. DML is used to (a) add/modify/delete data in the database. (b) add and delete tables. (c) manipulate the structure of database applications. (d) specify the structure of a database. Correct answer is (a) Your score on this question is: 10.00 Feedback: 8. A deletion operation will _____ if the deletion leads to the violation of a referential integrity constraint. (a) fail (b) succeed with warning (c) succeed without warning (d) crash the system Correct answer is (a) Your score on this question is: 10.00 Feedback: 9. DDL is used to (a) access the contents of tables. (b) add contents to tables. (c) define the structure of database applications. (d) specify the structure of a database. Correct answer is (d) Your score on this question is: 10.00 Feedback: 10. With Query By Example, a user enters a query by (a) writing an English description of the data that the user needs (b) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (c) filling in skeleton tables of the database with examples of what is to be retrieved (d) placing SQL keywords, such as select, under the column names they want to retrieve Correct answer is (c) The cardinality of a table is the number of _____ in the table. (a) rows (b) keys (c) foreign keys (d) columns Correct answer is (a) Your score on this question is: 10.00 Feedback: 2. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. 1 must have, name 2 need not have, name 3 must have, domain (a) I and II (b) I, II, and III (c) II and III (d) I and III Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. What information is necessary when specifying the structure of a table? (a) the name of the table and the names of the table's attributes (b) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (c) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (d) the name of the table and the amount of storage space to be allocated to the table Correct answer is (b) Your score on this question is: 10.00 Feedback: 4. The arity of a table is the number of _____ in the table. (a) columns (b) foreign keys (c) keys (d) rows Correct answer is (a) Your score on this question is: 10.00 Feedback: 5. A difference operation can be applied to tables that (a) are union compatible (b) are the same size (c) have the same name (d) have the same column names Correct answer is (a) Your score on this question is: 10.00 Feedback: 6. What can be specified in the selection condition of a SELECT statement? (a) a Boolean operation (b) an arithmetic operation (c) the conditions under which the statement should be executed (d) the time at which the selection should be performed Correct answer is (a) Your score on this question is: 0.00 Feedback: 7. The SQL clause to perform a set UNION operation is (a) MELD (b) UNION (c) UNITE (d) COMBINE Correct answer is (b) Your score on this question is: 10.00 Feedback: 8. Which of the following SQL statements can be used to add a row to a table? (a) APPEND (b) CREATE (c) ADD (d) INSERT Correct answer is (d) Your score on this question is: 10.00 Feedback: 9. A join operation joins _____ tables into _____. (a) two, one (b) four, two (c) three, one (d) three, two Correct answer is (a) Your score on this question is: 10.00 Feedback: 10. With Query By Example, a user enters a query by (a) placing SQL keywords, such as select, under the column names they want to retrieve (b) writing an English description of the data that the user needs (c) typing a syntactically correct SQL query that uses column and table names similar to the correct column and table names in a database (d) filling in skeleton tables of the database with examples of what is to be retrieved Correct answer is (d) Your score on this question is: 10.00 The degree of a table is the number of _____ in the table. (a) foreign keys (b) columns (c) rows (d) keys Correct answer is (b) Your score on this question is: 10.00 Feedback: 2. The arity of a table is the number of _____ in the table. (a) rows (b) keys (c) columns (d) foreign keys Correct answer is (c) Your score on this question is: 10.00 Feedback: 3. What information is necessary when specifying the structure of a table? (a) the name of the table and the amount of storage space to be allocated to the table (b) the name of the table and the names of the table's attributes (c) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have (d) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes Correct answer is (d) Your score on this question is: 10.00 Feedback: 4. The cardinality of a table is the number of _____ in the table. (a) foreign keys (b) columns (c) keys (d) rows Correct answer is (d) Your score on this question is: 10.00 Feedback: 5. DML is used to (a) specify the structure of a database. (b) add and delete tables. (c) manipulate the structure of database applications. (d) add/modify/delete data in the database. Correct answer is (d) Your score on this question is: 10.00 Feedback: 6. The SQL clause to perform a set UNION operation is (a) COMBINE (b) UNION (c) UNITE (d) MELD Correct answer is (b) Your score on this question is: 10.00 Feedback: 7. Which of the following SQL statements can be used to create a relational table? (a) ADD (b) APPEND (c) CREATE (d) INSERT Correct answer is (c) Your score on this question is: 10.00 Feedback: 8. DDL is used to (a) access the contents of tables. (b) specify the structure of a database. (c) add contents to tables. (d) define the structure of database applications. Correct answer is (b) Your score on this question is: 10.00 Feedback: 9. What can be specified in the selection condition of a SELECT statement? (a) the time at which the selection should be performed (b) an arithmetic operation (c) the conditions under which the statement should be executed (d) a Boolean operation Correct answer is (d) Your score on this question is: 10.00 Feedback: 10. The term query by example refers to (a) a query for SQL examples (b) example SQL queries provided by other users that can be modified to suit current needs (c) a visual query language developed by IBM (d) example SQL queries provided by the DBMS that users can modify to suit their current needs Correct answer is (c) Your score on this question is: 10.00 Feedback: See section 1.2.3 in the course notes. Go to top of assessment. Your performance was as follows: 1. What information is necessary when specifying the structure of a table? (a) the name of the table, the names of the table's attributes, the data types of attributes, and the formats of attributes (b) the name of the table and the amount of storage space to be allocated to the table (c) the name of the table and the names of the table's attributes (d) the name of the table, the names of the table's attributes, the data types of the table's attributes, the formats of the table's attributes, and the maximum number of rows that the table can have Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) 2. The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. 1 must have, name 2 need not have, name 3 must have, domain (a) I and II (b) II and III (c) I and III (d) I, II, and III Correct answer is (b) Your score on this question is: 10.00 Feedback: (b) 3. The arity of a table is the number of _____ in the table. (a) foreign keys (b) rows (c) keys (d) columns Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) 4. The cardinality of a table is the number of _____ in the table. (a) keys (b) columns (c) rows (d) foreign keys Correct answer is (c) Your score on this question is: 10.00 Feedback: (c) 5. Which of the following SQL statements can be used to create a relational table? (a) INSERT (b) ADD (c) CREATE (d) APPEND Correct answer is (c) Your score on this question is: 10.00 Feedback: (c) 6. The SQL clause to perform a set difference operation is (a) EXCEPT (b) OMIT (c) DIFFER (d) REJECT Correct answer is (a) Your score on this question is: 10.00 Feedback: (a) 7. Which of the following SQL statements can be used to remove a row from a table? (a) ERASE (b) REMOVE (c) DESTROY (d) DELETE Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) 8. Which of the following SQL statements can be used to add a row to a table? (a) ADD (b) APPEND (c) CREATE (d) INSERT Correct answer is (d) Your score on this question is: 10.00 Feedback: (d) 9. What can be specified in the selection condition of a SELECT statement? (a) the time at which the selection should be performed (b) a Boolean operation (c) an arithmetic operat

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值