现在的位置: 首页 > 综合 > 正文

IBM DB2标准试题

2016年08月20日 ⁄ 综合 ⁄ 共 33205字 ⁄ 字号 评论关闭

1. Which of the following options best describes a domain found in the table below?

从下表中,哪一选项正确的描述了domain

CREATE TABLE EMPLOYEE (

ID        INTEGER NOT NULL,

NAME                VARCHAR(30) NOT NULL,

EXTENSION        INTEGER NOT NULL,

MANAGER        VARCHAR(30) NOT NULL

 

PRIMARY KEY         (ID));

 

TERMINATE;

 

ID        NAME              EXTENSION     MANAGER

1        John S               53412        Y

2        Susan P              54123        N

3        Jennifer L           51234        N

 

A.  Manager Domain = (N)

B. 
Name Domain = (Set of all Possible Names)

C.  Extension Doman = (53412)

D.  ID Domain = (1, 2, 3)

答案:B

 

2. Which of the following statements best describes the XML Regions Index in DB2?

下列哪个陈述最好的描述了DB2中的XML区域索引?

A.  The Regions Index is a descriptor for referencing large objects in the LOB storage area.

B.  The Regions Index is a new type of XML index available in DB2 9.7.

C.  The Regions Index facilitates access to document regions in the XML data area.

区域索引,有助于文档区域中的XML数据区的访问

D.  The Regions Index can be compressed by issuing an offline reorg operation on the table.

答案:C

 

3. What is the purpose of a DB2 Access Plan?什么是一个DB2访问计划的目的?

A.  SQL developers can define Access Plans to tell DB2 the best way to retrieve the data from a SQL query

B. 
Describes the order of operations to access data necessary to execute a SQL or XQuery
statement 描述运算次序,访问必要的数据去执行 SQL或者XQuery的语句

C.  To replicate data between a DB2 database and relational databases from other vendors

D.  To visually construct complex DML statements and examine the results of their execution

答案:B

 

4. Given the following UPDATE statement:

UPDATE employees SET workdept =

   (SELECT deptno FROM department WHERE deptno = 'A01')

    WHERE workdept IS NULL

 

Which of the following describes the result if this statement is executed?

如果上面的语句被执行,下面哪一个选项是正确的?

A.  The statement will fail because an UPDATE statement cannot contain a subquery

B.  The statement will only succeed if the data retrieved by the subquery does not contain multiple records
语句可能成功如果数据恢复在子查询不能容纳过多的记录那之前

C.  The statement will succeed; if the data retrieved by the subquery contains multiple records, only the first record will be used to perform the update

D.  The statement will only succeed if every record in the EMPLOYEES table has a null value in the WORKDEPT column

答案:B

 

5. Given the following two tables:

 

           NAMES

---------------------------

NAME                NUMBER

----------          -------

Wayne Gretzky         99

Jaromir Jagr          68

Bobby Orr              4

Bobby Hull            23

Mario Lemieux         66

 

           POINTS

----------------------------

NAME                 POINTS

----------           -------

Wayne Gretzky          244

Bobby Orr              129

Brett Hull             121

Mario Lemieux          189

Joe Sakic              94

 

How many rows would be returned using the following statement?

在下面这个语句中有多少行会被返回?

 

        SELECT * FROM names, points

 

A.  0

B.  5

C.  10

D.  25

答案:D

 

6. What is SQL/XML? 什么是SQL/XML

A.  SQL/XML is a communication protocol for DB2 databases.

B.  A.SQL/XML is part of the XQuery standard and provides various publishing functions to transform XML data into relational form and vice versa.

C.  SQL/XML is a language that provides various publishing functions to transform XML data into relational form and vice versa.

D. 
SQL/XML is an extension to SQL standard and provides various publishing functions to transform XML data into relational form and vice versa.

SQL/XML 是延伸 SQL
标准和提供各种功能来转换 XML
数据相关性,反之亦然

答案:D

 

7. Which of the following is NOT part of the XQuery FLOWR expression?

下面那个选项不是部分 XQuery FLOWR
的表述?

A.  FOR clause

B.  LET clause

C.  ORDER BY clause

D.  WITH clause

答案:D

 

8. Given the following table:
根据下面的表:

       TAB1

-------------------

COL1         COL2

-----        -----

A            10

B            20

C            30

A            10

D            40

C            30

 

Assuming the following results are desired: 
假设需要以下结果:

 

       TAB1

-------------------

COL1         COL2

-----        -----

A            10

B            20

C            30

D            40

 

Which of the following statements will produce the desired results?

下面的语句将产生预期的效果吗?

A.  SELECT UNIQUE * FROM tab1

B.  SELECT DISTINCT * FROM tab1

C.  SELECT UNIQUE(*) FROM tab1

D.  SELECT DISTINCT(*) FROM tab1

答案:B

 

9. Considering the SQL statement below, which option best describes what APP.TAX is:

考虑下面的SQL语句,最能说明APP.TAX的选项是:

SELECT APP.TAX(SALARY) FROM EMPLOYEE

 

A.  User Defined Function
自定义函数

B.  Stored Procedure

C.  Trigger

D.  User Defined Type

答案:A

 

10. Which of the following is NOT true about the Information Model?

以下不正确的信息模型是?

A.  Abstract management of objects at a conceptual level.

B.  Defines relationships between managed objects.

C.  Group of descriptions explaining objects of a data model.

组的描述信息说明的数据模型对象。

D.  Data models can be used to map an Information Model to a software implementation.

答案:C

 

11. Consider the following XML document:
考虑下面的XML文档:

<customerinfo>

        <name>John Smith</name>

        <addr country="Canada">

                <street>Fourth</street>

                <city>Calgary</city>

                <prov-state>Alberta</prov-state>

                <pcode-zip>M1T 2A9</pcode-zip>

        </addr>

        <phone type="work">963-289-4136</phone>

</customerinfo>

 

Consider the following UPDATE expression:

update xmlcustomer

set info = xmlquery( 'transform

       copy $new := $i

       modify (

           do insert <phone type="cell">777-555-3333</phone> after $new/customerinfo/addr,

           for $j in $new/customerinfo/addr/phone

             return do rename $j as "telephone"

       )

       return  $new' passing info as "i")

where cid = 1000;

 

Which of the following represents the XML document after the TRANSFORM expression has been executed:
下列哪个代表了XML在文档转换表达式之前已经被执行:

A.  
<customerinfo>      <name>John Smith</name>

        
<addr country="Canada">

     
<street>Fourth</street>

     
<city>Calgary</city>

     
<prov-state>Alberta</prov-state>

     
<pcode-zip>M1T 2A9</pcode-zip>

     
</addr>

     
<phone type="cell">777-555-3333</phone>

     
<phone type="work">963-289-4136</phone>

        
</customerinfo>

B.   <customerinfo>      <name>John Smith</name>

         <addr country="Canada">

      <street>Fourth</street>

      <city>Calgary</city>

      <prov-state>Alberta</prov-state>

      <pcode-zip>M1T 2A9</pcode-zip>

      </addr>

      <phone type="cell">777-555-3333</phone>

      <telephone type="work">963-289-4136</telephone>

         </customerinfo>

C.   <customerinfo>      <name>John Smith</name>

         <addr country="Canada">

      <street>Fourth</street>

      <city>Calgary</city>

      <prov-state>Alberta</prov-state>

      <pcode-zip>M1T 2A9</pcode-zip>

      </addr>

      <phone type="cell">777-555-3333</phone>

      <telephone type="work">963-289-4136</telephone>

         </customerinfo>

D.   <customerinfo>      <name>John Smith</name>

         <addr country="Canada">

      <street>Fourth</street>

      <city>Calgary</city>

      <prov-state>Alberta</prov-state>

      <pcode-zip>M1T 2A9</pcode-zip>

      <phone type="cell">777-555-3333</phone>

      </addr>

      <telephone type="work">963-289-4136</telephone>

         </customerinfo>

答案:A

 

12. Which of the following properties is related to the fact that a committed transaction guarantees that all of the operations are completed and in a roll backed transaction the effect of all operations are reverted?

下列哪个属性是关系到一个提交的事务保证所有的操作都完成了,在一个事务回滚的影响的操作都是恢复?

A.  Consistency

B.  Atomicity
原子性

C.  Isolation

D.  Durability

答案:B

 

13. Which of the following is the lowest cost DB2 product that can be legally installed on a windows server that has 4 CPUs capable of performing row compression?

下列哪项是的成本最低的,DB2产品可以合法地安装在有四个CPUWindows服务器上能够执行压缩?

A.  DB2 Express Edition

B.  DB2 Workgroup Edition

C.  DB2 Express-C Edition

D.  DB2 Enterprise Edition

答案:A

 

14. Application B wants to read a subset of rows from table EMPLOYEE multiple times inside the same transaction.

Which isolation level should be used in order to guarantee that every time the same set of rows is returned?

应用程序B想多次读取表EMPLOYEE其中的一个子集中的几行数据。

应该使用隔离级别,以保证每次返回的结果都是一样的?

A.  Currently Committed

B.  Read Stability

C.  Repeatable Read
可重复读

D.  Uncommitted Read

答案:C

 

15. How does automatic storage work in DB2?

DB2中如何进行自动存储工作?

A.
 Automatic storage simplifies storage management by allowing you to specify storage paths where the database manager can place table space data, and where the database manager allocates space for various uses.

在允许指定存储路径中自动存储简化了存储管理,
数据库管理器可以放置表空间数据同时数据库管理器为各种用途分配空间。

B.  Automatic storage is an option which is set when you create a DB2 database. It allows transactions that are written to the database to be automatically committed.

C.  Automatic storage is a function of DB2 that allows tables to be backed up automatically on a set schedule.

D.  Automatic Storage can be used to automatically reorganize the data on the physical media in order to improve performance.

答案:A

 

16. Which of the following DB2 client/driver packages is NOT suitable for developing ODBC applications?下列哪个DB2客户机/驱动程序包是不适合开发ODBC应用程序?

A.  IBM Data Server Client

B.  IBM Data Server Driver for ODBC and CLI

C.  IBM Data Server Runtime Client 
IBM数据服务器运行时客户端

D.  IBM Data Server Driver Package

答案:C

 

17. In embedded SQL code, which of the following is true about delimiters?

在嵌入式SQL代码,关于分隔符哪项是正确的?

A.  Used by the OS to delimit system variable declaration.

B.  Used by the database to indicate the end of a column.

C.  Used by compiler to indicate the end of the program.

D.  Used by PRECOMPILER to identify SQL statements to be translated.

使用预编译程序来识别被翻译的SQL语句

答案:D

 

18. What is a Trusted Context?什么是受信任上下文?

A.  It is a special area in a buffer pool that can be written only by a selected set of users.

B.  It is a DB2 capability that allows applications to change users without breaking the connection to the database.

这是一个DB2功能,允许应用程序改变用户在没有打破了到数据库的连接。

C.  It is a DB2 capability that allows users to establish a connection to the database without providing user name or password.

D.  It is a type of container in a table space that allows faster I/O operations.

答案:B

 

19. Given the options below, which of the following statements can add records to a table?

在下面的选项中,哪个语句可以将记录添加到表中?

A.  ADDREC

B.  ADDRECORD

C.  INSERT

D.  ADD

答案:C

 

20. You were assigned the task of importing a large amount of data into a DB2 database. Considering you must have logged information about the rows imported and that you want to perform the load as fast as possible,
which of the tools would you be the best choice for the job?

你被分配的任务,导入大量的数据到一个DB2数据库。考虑你必须记录信息关于导入的行,你想执行负载尽可能快的,哪些工具将你在工作中最佳选择?

A.  DB2 INSERT

B.  DB2 IMPORT

C.  DB2 LOAD

D.  DB2 CLP

答案:B

 

21. Given the following table:

CURRENT_EMPLOYEES

-----------------------------

EMPID        INTEGER NOT NULL

NAME         CHAR(20)

SALARY       DECIMAL(10,2)

 

PAST_EMPLOYEES

-----------------------------

EMPID        INTEGER NOT NULL

NAME         CHAR(20)

SALARY       DECIMAL(10,2)

 

Assuming both tables contain data, which of the following statements will NOT successfully add data to table CURRENT_EMPLOYEES?

假设两个表都包含数据,下列哪个陈述不能成功地将数据添加到CURRENT_EMPLOYEES?

A.   INSERT INTO current_employees (empid) VALUES (10)

B.   INSERT INTO current_employees VALUES (10, 'JAGGER', 85000.00)

C.   INSERT INTO current_employees SELECT empid, name, salary FROM past_employees WHERE empid = 20

D.  
INSERT INTO current_employees (name, salary) VALUES (SELECT name, salary FROM past_employees WHERE empid = 20)

答案:D

 

22. When attempting to establish a connection to a database residing on your local machine, which command can help you determine why the following message was displayed:

 

SQL1013N The database alias name or database name "SAMPLE" could not be found. SQLSTATE=42705

当试图建立一个连接到一个数据库驻留在本地机器上,该命令可以帮助您确定为什么显示以下消息是:

SQL1013N数据库别名或数据库名称“SAMPLE”不能被发现。SQLSTATE = 42705

 

A.  
list database directory
列表数据库目录

B.   list admin node directory

C.   list node directory

D.   list dcs directory

答案:A

 

23. Which of the following is the lowest cost DB2 product that can be legally installed on a Linux server that has 2 CPUs?

下面哪个是成本最低的DB2产品,可以被合法地安装在一个Linux服务器并有2cpu?

 

A.  
DB2 Express Edition  

B.   DB2 Enterprise Server Edition

C.   DB2 Everyplace

D.   DB2 Workgroup Server Edition

答案:A

 

24. Which of the following is NOT true about columns?

下列哪个关于列是不正确的?

 

A.  
Each column consists of one or more fields
每一列包含一个或多个字段

B.   Each column contains a specific type of information

C.   Columns must be designated a specific data type

D.   Columns are also known as fields

答案:A

 

25. If TAB1 is created using the following statement
如果TAB1创建如下声明

CREATE TABLE tab1 (

  col1 INTEGER NOT NULL,

  col2 CHAR(3),

  CONSTRAINT cst1 CHECK (col1 in (1, 2, 3, 4)))

Which of the following statements will successfully insert a record into table TAB1?

以下哪条语句将成功插入到表TAB1?

 

A. INSERT INTO tab1 VALUES (0, 'a')

B. INSERT INTO tab1 VALUES (NULL, 'abc')

C. INSERT INTO tab1 VALUES (4, 'a')

D. INSERT INTO tab1 VALUES (4, 'abcdefhijklmnopq')

答案:C

 

26. Consider the following command:
考虑下面的命令:

CREATE TABLESPACE MYTBSP1 MANAGED BY AUTOMATIC(自动管理)

What will the command result in?会有什么样的命令结果吗?

A. Creation of a normal table space called mytbsp1 that is managed automatically.

B. Creation of a user table space called mytbsp1 that is managed automatically.

创建一个用户表空间名为mytbsp1自动管理。

C. Creation of a temporary table space called mytbsp1 that is managed automatically.

D. This command will return an error to the user.

答案:B

 

27. Given the following table definition:
给定以下表的定义:

SALES

--------------------------

SALES_DATE       DATE

SALES_PERSON     CHAR(20)

REGION           CHAR(20)

SALES            INTEGER

Which of the following SQL statements will remove all rows that had a SALES_DATE in the year 1995?以下SQL语句将删除所有包含SALES_DATE1995年的行?

A. DELETE * FROM sales WHERE YEAR(sales_date) = 1995

B. DELETE FROM sales WHERE YEAR(sales_date) = 1995

C. DROP * FROM sales WHERE YEAR(sales_date) = 1995

D. DROP FROM sales WHERE YEAR(sales_date) = 1995

答案:B

 

28. Given the following two tables:
下列两个表:

      TAB1

------------------

COL_1        COL_2

-----        -----

A            10

B            12

C            14

 

      TAB2

-------------------

COL_A        COL_B

-----        -----

A            21

C            23

D            25

 

Assuming the following results are desired:假设需要下列结果:

 

COL_1        COL_2        COL_A        COL_B

A             10           A            21

B             12           -             -

C             14           C            23

-              -           D            25

 

Which of the following joins will produce the desired results?

下列哪个连接将产生想要的结果?

A. SELECT * FROM tab1 INNER JOIN tab2 ON col_1 = col_a

B. SELECT * FROM tab1 LEFT OUTER JOIN tab2 ON col_1 = col_a

C. SELECT * FROM tab1 RIGHT OUTER JOIN tab2 ON col_1 = col_a

D. SELECT * FROM tab1 FULL OUTER JOIN tab2 ON col_1 = col_a

答案:D

 

29. Which of the following is a well-formed XML document?下列哪个是格式正确的XML文档?

A. <Name xmlns="htpp://sample.default.nspace.com" Gender="MALE">

       
<FirstName>Amitabh</FirstName>

       
<LastName>Patel</LastName>

       
</Name>

B. <Name xmlns="http://sample.default.nspace.com" MALE="Gender">

        <FirstName>Amitabh</FirstName>

        <LastName>Patel</LastName>

        </name>(大小写敏感)

C. <Name  Gender="MALE">

        <FirstName>Amitabh <LastName>Patel</FirstName> </LastName>(标签嵌套)

        </Name>

D. <Name  Gender=FEMALE>(属性值一定要用“”)

        <FirstName>Jaya</FirstName>

        <LastName>Patel</LastName>

        </Name>

答案:A

 

30. Which of the following is FALSE about views?于视图下列哪个是错误的?

A. Do not contain real data

B. Any view can be updated, independent of its definition
任何视图可以被更新,独立于它的定义

C. When changes are made to data through a view, the data is changed in the underlying table

D. Can be used interchangeably with tables when retrieving data

答案:B

 

31. A company has a large amount of data to store and wants to be able to do the following with the data:

        Have a standard interface for accessing the data.

        Have multiple users with the ability to insert, update and delete data.

        Make changes to the data without risk of losing data and its consistency.

        Have the capability to handle huge volumes of data and users.

        Have tools for data backup, restore and recovery.

一个公司有大量的数据存储,并希望能够做下面的数据:
 
有一个标准的接口访问数据。
 有多个用户插入,更新和删除数据的能力。
 不断变化的数据不丢失数据的风险及其一致性。
 有能力处理大量的数据和用户。
 有数据备份,还原和恢复的工具。

What data storage method is the most optimal solution for the company?

什么样的数据存储方法是最优化的解决方案?

A. Text files

B. Comma delimited data files

C. Spreadsheets

D. Database

答案:D

 

32. You are tasked with designing a model that can be used by the software developer to implement a given application. Which of the following is NOT true about your model?

你的任务是设计一个模型可以被软件开发人员使用去实现一个给定的应用程序。下列哪个不是真的关于你的模型?

A. The model is a low level of abstraction with concrete and detailed design.

B. The model includes specific implementation and protocol details.

C. The model should define relationships between the managed objects.

D. The model being designed is an Information Model.
模型设计是一个信息模型。

答案:D

 

33. Which of the following best describes what an incremental cumulative backup is?

下列哪一条可以最好地描述增量累积备份?

A. Backup all of the data that has changed since the last successful full or delta backup.

B. Backup of a single table space.

C. Backup of the entire database.

D. Backup all of the data that has changed since the last full backup.

备份自上次备份后改变的所有数据

答案:D

 

34. Which of the following is true about Relational Databases?

关于关系数据库下列哪项是正确的?

A. A column can store values of different data types.

B. A table consists of columns and rows.
表格由列和行组成

C. Rows in the same table can have a different set of columns.

D. Rows are also known as fields of the table.

答案:B

 

35. When using a Relational Database, which of the following does NOT apply?

当使用关系数据库时,下列哪些不适用

A. Accesses data using Data Manipulation Language (DML) such as SQL.

B. Define your database schema using a Data Definition Language (DDL).

C. Data is stored in a hierarchical model. 
数据存储采用分层模型。

D. You can use normalization to avoid redundant data in your tables.

答案:C

 

36. Which of the following objects you would need to create in order to execute a block of code every time table TB1 is updated?

哪个选项是可以创建一个你需要的对象,用来执行一个代码块便可以每次将TB1表格更新?

A. An AFTER trigger

B. A UDF

C. A Stored Procedure

D. An User Defined Type

答案:A

 

37. After the following SQL statement is executed:SQL语句后执行下列各项:

GRANT ALL PRIVILEGES ON TABLE student TO USER user1

Assuming user USER1 has no other authorities or privileges, which of the following actions is USER1 allowed to perform?

假定用户USER1没有任何其他授权或特权,以下哪些语句是USER1允许执行?

A. Grant all privileges on table STUDENT to other users.

B. Drop a view associated to the table STUDEN.

C. Drop the table STUDENT.

D. None of the above.

答案:C

 

38. What are the entities used to model data in the Relational Model?

什么是实体用于模型数据的关系模型?

A. A collection of instances of entities.

B. Relations, attributes and tuples
关系、属性和元组

C. A collection of instances of record types.

D. Table, rows and columns

答案:B

 

39. Using DB2's CLP, to access a remote database for the first time, it is necessary to:

使用DB2 CLP,第一次访问远程数据库,有必要:

A. First catalog the remote system or node, and then catalog the database within the remote(远程的) node 
在第一个目录的远程系统或节点,编目远程数据库(远程的)节点

B. First register the remote system user in the system catalog, and then setup a SSH communication to the remote node

C. DB2 cannot use databases in remote systems unless SYSADM authority is granted to the local user

D. First list all the remote databases with the db2 list database directory command, and then select the remote database from the list

答案:A

 

40. Assuming that you are currently connected to TESTDB, which of the following will allow the view of the database settings with details?

假设你当前连接到TESTDB,以下将允许数据库中的视图设置的细节?

A. db2 get db cfg with detail

B. db2 get db cfg show detail

C. db2 get dbm cfg with detail

D. db2 get dbm cfg show detail

答案:B

 

41. Which of the following is an XML-based language for transforming XML documents?

下列哪项是一个基于XML的语言,用于将XML文档

A. XHTML

B. XSLT(本身就是一个有效的XML文档)(DTDSAX

C. HTML

D. Java

答案:B

 

42. Which of the following statements is NOT true regarding Table Spaces on DB2?

下列哪个陈述关于DB2的表空间是不正确的?

A. A Table Space is a logical object in between logical table and physical containers

B. All tables, indexes, and other data are stored in a table space

C. A Table Space is a logical object required to store data, indexes and tables in temporary memory
表空间是一个逻辑对象需要存储在内存中的数据,索引和临时表做暂存记忆

D. A Table Space is always associated to a Buffer Pool

答案:C

 

43. Which of the following is true about a well-formed XML document?

以下哪一个是正确的关于一个格式良好的XML文档吗?

A. Has one or more root nodes.

B. Tags can have at most one attribute.

C. Always has a single document node.
 
始终有一个单一的文档节点。

D. End tags are optional.

答案:C

 

44. Which of the following is a tool to configure automatic database backup?

下列哪一个是配置数据库自动备份的?

A. Configure Automatic Maintenance wizard 
配置自动维护向导

B. Design Advisor

C. Explain tool

D. EXPORT utility

答案:A

 

45. Given the following two tables

 

NAMES

--------------------------------

STUDENT_NAME     STUDENT_NUMBER

------------    ----------------

Wayne Gretzky    99

Jaromir Jagr     68

Bobby Orr        4

Bobby Hull       23

Mario Lemieux    66

 

MARKS

--------------------------------

NAME            Marks

--------       -------

Wayne Gretzky    80

Bobby Orr        94

Brett Hull       77

Mario Lemieux    83

 

How many rows would be returned using the following statement?
使用下面的语句将返回多少行?

SELECT distinct name FROM student_names, marks

A. 9

B. 20

C. 5

D. 6

答案:B

 

46. A Dirty Read occurs when?
脏读发生在什么时候?

A. A transaction read the same row of data twice and returns different data values with each read.

B. A search based on some criterion returns additional rows after consecutive searches during a transaction.

C. Uncommitted data is returned, but the transaction that originated them was rolled back.

未提交的数据将被返回,但是源于事务被回滚。

D. Two transactions read and then attempt to update the same data, the second update will overwrite the first update before it is committed.

答案:C

 

47. Which of the following is true about columns?下列关于列的叙述哪一个正确?

A. Each column consists of one or more records

B. Columns are where the individual pieces of information are stored for each record

C. Columns must be designated a specific data type
列必须指定一个特定的数据类型

D. Columns are also known as records

答案:C

 

48. Which of the following programming languages can be used to develop UDFs?

下列哪一个编程语言可以用来开发UDF

A. Java, Javascript, SQL

B. C/C++, Java, .Net languages

C. SQL, C# .Net, Perl

D. Perl, C/C++, SQL

答案:B

 

49. Which of the following commands would delete the SAMPLE database?

下列哪个命令是删除SAMPLE数据库的?

A. db2 drop sample

B. db2 delete database sample

C. db2 drop sample db

D. db2 drop database sample

答案:D

 

50. Which of the following SQL statements can be used to remove data from table "users":

下列哪一个SQL语句可以用来删除数据表“users”中的数据?

A. REMOVE TABLE users

B. DROP TABLE users

C. DELETE TABLE users

D. ALTER TABLE users

答案:C

 

51. Which of the following best define what a transaction is?

下列哪一条可以最好地定义事务是什么?

A. A sequence of one or more SQL operations grouped together, also known as a single unit of work. 
一个序列的一个或多个SQL操作组合在一起,也称为一个单一的工作单元。

B. A set of independent operations that can be executed in parallel.

C. A data isolation level that can help prevent deadlocks by allowing reads on previously committed data.

D. An object of a DB2 database.

答案:A

 

52. Which of the following statements is FALSE about transactions?

下列关于事务哪个陈述是错误的?

A. Operations inside a transaction are executed in parallel.
操作在一个事务正在并行执行。

B. Only 1 COMMIT statement can be executed inside the same transaction.

C. Transactions guarantee atomicity of a group of operations.

D. A ROLLBACK or COMMIT statement finalizes a transaction. 

答案:A

 

53. Which of the following is a characteristic of High Availability?

以下哪个是高可用性的特性?

A. It allows compression of data.

B. It allows definition of a policy to guarantee quality of service to applications.

C. It allows replication of data to a standby server that can take over in case of failure.

它允许的数据复制到备用服务器,它可以接管在失败的情况下。

D. It allows high performance of a DB2 server by distributing workload across several machines.

答案:C

 

54. Giving the following create table statement

 给出下列创建table语句

 

CREATE TABLE student_marks

(student_name   CHAR(20) NOT NULL,

 student_number INTEGER  NOT NULL,

 math           INTEGER,

 phys           INTEGER,

 engl           Integer)

 

Which of the following statements will retrieve the student's name who does NOT have a phys mark?
以下语句哪个将检索学生名字中没有phys标志?

 

A. SELECT student_name FROM student_marks WHERE phys = ' '

B. SELECT student_name FROM student_marks WHERE phys = NULL

C. SELECT student_name FROM student_marks WHERE phys = 0

D. SELECT student_name FROM student_marks WHERE phys is NULL

答案:D

 

55. Which of the following is NOT true about keys in the relational model?

下列哪个关于键值的关系模型的说法哪个是不正确的?

A. Primary keys are defined by a subset of attributes of a relation.

B. Primary keys uniquely identify each tuple of the relation.

C. Primary keys define the relationship between two tables.
主键定义两个表之间的关系。

D. A relation can have multiple foreign keys.

答案:C

 

56. Which of the following is a reason for using databases to store data INSTEAD of the many alternatives?以下哪个是使用数据库来存储数据来代替其他很多选择的原因?

A. Databases store data in an unstructured way for faster insert performance.

B. Databases are cheaper to use than other alternatives.

C. Databases are an intrinsic functionality of most Operating Systems, thus it's widely available to applications.

D. Databases allow multiple users to handle and change the data without losing data and its consistency.
数据库允许多个用户处理和改变数据不丢失数据和它的一致性。

答案:D

 

57. Which of the following is true about Static SQL?

以下哪一个关于静态SQL是正确的?

A. It takes advantage of the table statistics at runtime.

B. The structured of the SQL statement must be completely specified at the precompilation phase.结构化的SQL语句必须完全指定的precompilation阶段。

C. It is compiled and executed by an application at run-time.

D. Static SQL does not exist.

答案:B

 

58. Which Data Model was created with the focus of providing better data independence?

下列哪个数据模型的创建提供更好的数据独立性?

A. Semi-structured(半结构化)

B. Hierarchical

C. Relational 关系

D. Entity-Relationship

答案:C

 

 

59. Which of the following is NOT true about Relational Databases?

关于关系数据库,下列哪项是不正确的?

A. Each column contains a specific type of information.

B. Columns are where the individual pieces of information are stored.

C. A primary key can be composed of only one attribute.

只有一个属性可以组成一个主键。

D. Foreign keys are an attribute in one relation whose values match a primary key of another relation.

答案:C

 

 

59.Consider a Stored Procedure with the following definition:

考虑使用存储过程,定义如下:

CREATE OR REPLACE PROCEDURE proc1 (p1 INTEGER, OUT p2 VARCHAR(20))

BEGIN

END

@

Using DB2 CLP, which of the following commands would successfully execute procedure PROC1?(教材101页)

A. CALL proc1(1, DEFAULT)

B. CALL proc1(1, ?)

C. CALL proc1(1)

D. None of the above

答案:B

 

 

61. Consider a table TAB1 having the following values:
考虑一个表TAB1具有下列值:

       TAB1

-----------------

COL1         COL2

----         ----

A            10

B            20

C            30

A            10

D            40

C            20

 

Which of the following statements can be used to modify the values in TAB1 so that the final content is as follows:可以使用的下列陈述中哪修改TAB1,从而使最终的内容是如下的值:

       TAB1

-----------------

COL1         COL2

----         ----

C            30

D            40

A. DELETE FROM TAB1 INSERT INTO TAB1 VALUES ('C', 40)

INSERT INTO TAB1 VALUES ('D', 30)

B. UPDATE TAB1 SET COL1 = NULL WHERE COL2 IN (10, 20)

C. DELETE FROM TAB1 WHERE COL2 NOT IN (30, 40)

D. DELETE FROM TAB1 WHERE COL2 IN (10, 20)

答案:C

 

 

62. Application A is running under the Repeatable Read isolation level and holds an Update lock on table TAB1. Application B wants to query table TAB1 and cannot wait for Application A to release its lock. Which
isolation level should Application B run under to achieve this objective?

应用程序A是可重复读隔离级别下运行,并持有表TAB1的更新锁。应用程序B要查询表TAB1,不能等待应用程序A释放锁。隔离级别下运行的应用程序B实现这一目标呢?

A. Repeatable Read

B. Read Stability

C. Cursor Stability

D. Uncommitted Read.未提交读

答案:D

 

 

63. Which of the following is true about Table Spaces in DB2?

有关DB2的表空间中,下列哪项是正确的?

A. A Table Space is a file managed by the operating system where DB2 can store data.

B. A Table Space is always associated with a buffer pool.

总是与一个表空间的缓冲池

C. A Table Space to store user's temporary table data is automatically created when a database is created.

D. A Table Space can be managed by the database (DB2) or by an external application.

答案:B

 

 

64. Which is a true statement about Namespaces?

下列哪个是关于命名空间的正确声明?

A. Namespaces are the same as a root node within an XML document.

B. Namespaces are types of nodes within XML documents.

C. Namespaces help to distinguish between same element names in different domains.

命名空间有助于区分不同的域相同的元素名称。

D. Namespaces help to uniquely identify XML elements by associating them to an URL, which is a valid web page.

答案:C

 

 

65. Which of the following commands can be used to undo operations executed inside a unit of work?

哪个指令可以用来撤消操作在一个工作单元中执行?

A. COMMIT

B. ROLLBACK

C. RETURN

D. UNDO TRANSACTION}

答案:B

 

66. Which of the following best describes the benefits of supporting XQuery's TRANSFORM expression in DB2?

下列哪一条可以最好地描述了支持XQuery转换表达式在DB2中?

A. It can be used to modify both XML and relational data, providing a common language for developers to handle the database data.

B. When used in a UPDATE statement, it simplifies the update of XML documents stored in the database, since all processing is done by the DB2 engine.

C. It is very useful to change XML nodes when the XML document is loaded in the client application.

它是非常有用的改变XML节点当XML文档加载到客户机应用程序。

D. It can be used to automatically clean up unnecessary tags in a XML document, providing smaller documents thus saving space in the database.

答案:C

 

67. Which of the following options can be used to check the minimum point in time (PIT) for a table space restore?

下列哪个选项可用于检查最小的时间点(PIT)一个表空间中恢复?

A. LIST TABLESPACES SHOW ALL

B. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) FROM /tbspbkp

C. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) ONLINE FROM /tbspbkp

D. GET SNAPSHOT FOR TABLESPACE ON <database>

答案:C

 

68. What is SAX?

SAX是什么?

A.
A parsing mechanism, which uses stream events to process XML nodes.

一个解析机制,它使用流事件来处理XML节点。

B. A parsing mechanism, which uses a binary tree-based algorithm to process XML nodes.

C. A parsing mechanism, which uses a character-based algorithm to process XML nodes.

D. A parsing mechanism, which uses the PHP SAX interface to process XML nodes.

答案:A

 

69. Consider the following IMPORT statement:

考虑下面的导入语句:

IMPORT FROM /data/dept.del of DEL

XML  FROM /data/xmlfiles

INSERT INTO dept

 

The table dept contains three columns: CID (INTEGER), NAME(VARCHAR(10)), INFO(XML).  Which of the following /data/dept.del import files will be accepted by DB2:

dept表包含三个列:CID (INTEGER), NAME(VARCHAR(10)), INFO(XML). 
下列哪个/数据/部门。dept导入文件将会被DB2接受:

 

A.         1000, “John Smith”, <XDS FIL=C1.xml/>

           1001,”Jane Doe”, <XDS FIL=C2.xml/>

           1002, “Mary David”, <XDS FIL=C3.xml/>

B.         1000, “John Smithson”, "<XDS FIL=‘C1.xml' />"

           1001,”Jane Doe”, "<XDS FIL=‘C2.xml' />"

           1002, “Mary David”, "<XDS FIL=‘C3.xml' />"

C.         1000, “John Smith”, "<XDS= ‘C1.xml' />"

          1001,”Jane Doe”, "<XDS= ‘C2.xml' />"

          1002, “Mary David”, "<XDS= ‘C3.xml' />"

D.         1000, “John Smith”, "<XDS FIL=‘C1.xml' />"

 
         1001,”Jane Doe”, "<XDS FIL=‘C2.xml' />"

          
1002, “Mary David”, "<XDS FIL=‘C3.xml' />"

答案:D

 

70. How can an application modify the isolation level of operations running against a DB2 database?

一个应用程序如何修改隔离级别的操作运行在DB2数据库中?

A.
Isolation level can be changed for a particular SQL statement.

隔离级别可以改变为一个特定的SQL语句。

B. Isolation level can only be changed for the whole user session and all operations in that session will be affected.

C. Isolation level to be used can be specified when executing the COMMIT operation.

D. Isolation level is determined at the moment an application connects to the database. To change the isolation level, an application is required to create a new connection specifying the desired level.

答案:A

 

71. Consider the following scenario. You have 3 tables with the same name (TABLE_1) under 3 different schemas (SYSIBM, DEFAULT and DB2INST1). You are connected to a DB2 database in your Linux server as db2inst1
and issue the following statement:

考虑下面的场景。你有3相同的表名(表1)在3种不同的模式(SYSIBM、DEFAULT及DB2INST1)。你连接到一个DB2数据库在您的Linux服务器为db2inst1和发出以下语句:

        SELECT * FROM table_1

Which table will you be selecting data from:

A. You get an error because your query is ambiguous, as the table schema is not specified

B. SYSIBM.table_1

C. DEFAULT.table_1

D. DB2INST1.table_1

答案:D

 

 

72. Which of the following is NOT a supported type of trigger?

下列哪项是不支持触发器中的类型?

A. AFTER

B. BEFORE

C. DURING

D. INSTEAD OF

答案:C

 

73. What is authorization?什么是授权?

A. Authorization is a process that checks whether you have sufficient privileges to perform the desired database operation.  
授权是一个过程,检查是否有足够的权限执行所需的数据库操作。

B. Authorization is the process where the DBA gathers information to see who will have access to the database.

C. Authorization is the process where the DB2 database checks with Windows security to see if you have access to the DB2 database.

D. Authorization is a process that validates that you are who you claim to be by verifying your user ID and password.

答案:A

 

74. Which of the following statements grants user John the ability to insert data to table tab1?

下面哪个语句是授予用户John将数据插入到表TAB1的能力?

A. GRANT ADD ON TABLE tab1 TO John

B. GRANT INSERT ON TABLE tab1 TO John

C. GRANT ADD ON TABLE tab1 TO USER John

D. GRANT INSERT ON TABLE tab1 TO USER John

答案:D

 

75. When a user is connected to a database, which of the following privileges is required for the user to use a package?(课本202页表5.6)

当用户连接数据库时,下列哪项特权是允许用户使用包?

A. BIND(绑定该包)

B. BINDADD(不存在)

C. EXECUTE(允许用户执行该包)

D. USE(不存在)

答案:C

 

76. Which of the following is the simplest way to restrict users from viewing SALARY information, while still allowing them to see the other values?

下列哪项是最简单的方式来限制用户查看SALARY信息,同时还让他们看到其他的值?

A. Encrypt the table's data.

B. Create a view that does not contain the SALARY column. Grant access to the view and revoke access from the original table.

创建一个视图,不包含工资列。授权访问视图和撤销访问来自原始表。

C. Revoke SELECT access for the SALARY column from users who should not see SALARY data.

D. Store SALARY data in a separate table and grant SELECT privilege for that table to the appropriate users

答案:B

 

77. Which Data Model was created with the focus of providing better data independence?

下列哪项数据模型的创建能提供更好的数据独立性?

A. Relational

B. Hierarchical(层次)

C. Semantic(羽翼)

D. Network(网状)

答案:A

 

78. Which of the following is true about Dynamic SQL?关于动态SQL下列哪项是正确的?

A. It is precompiled and binded in dynamic databases.

B. The structured of an SQL statement must be completely specified at precompile time.

C. It is compiled and executed by an application at run-time.
这是由应用程序在运行时编译和执行。

D. Dynamic SQL does not exist.

答案:C

 

79. Which of the following options will perform an offline table space recovery?

下列哪个选项会执行脱机的表空间恢复。

A. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) OFFLINE FROM /tbspbkp

B. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) FROM /tbspbkp

C. RESTORE DATABASE SAMPLE TABLESPACE (MYTBSP) ONLINE FROM /tbspbkp

D. There is no option to restore a table space in DB2

答案:B

 

80. Assume a table which contains the following columns:
假设一张表有如下列:

EMP_ID

EMP_NAME

PHONE

EMAIL

SALARY

Which of the following is the simplest way to restrict users from viewing SALARY information, while still allowing them to see the other values?

下列哪项是最简单的方式来限制用户查看SALARY信息,同时还让他们看到其他的值?

A. Encrypt the table's data.

B. Create a view that does not contain the SALARY column. Grant access to the view and revoke access from the original table.

创建一个视图,不包含工资列。授权访问视图和撤销访问来自原始表。

C. Revoke SELECT access for the SALARY column from users who should not see SALARY data.

D. Store SALARY data in a separate table and grant SELECT privilege for that table to the appropriate users.

答案:B

 

81. When using a Relational Database, which of the following is false?

当使用一个关系数据库中,下列哪个是假的?

A. Retrieve data using SQL’s Data Manipulation Language (DML).

B. Define the database structure using SQL’s Data Definition Language (DDL).

C. Store the data in class instances and fields.

将数据存储在类的实例和领域。

D. Use normalization to avoid redundant data in your tables.

答案:C

 

82. Which Data Model was created with the focus of providing better data independence?

哪个数据模型是创建集中提供更好的数据独立?

 

A. Semantic

B. Hierarchical

C. Relational
关系

D. Network

答案:C

 

83. Which of the following is false about the Information Model?

以下关于信息模型哪个是假的?

A.
Provides the details to implement objects in databases.

  
提供细节来实现数据库中的对象。

B. Defines relationships between managed objects.

C. Provides an abstract management of objects at a conceptual level.

D. Provides a conceptual/abstract model for designers.

答案:A

 

84. Which of the following is NOT a tool that comes with DB2?

下列哪项不是一个DB2自带的工具?

A. DB2 Command Window

B. DB2 Command Line Processor

C. DB2 Script Editor 
DB2脚本编辑器

D. DB2 First Steps

答案:C

 

85. What functionality does automatic storage provider?

自动存储提供了什么样的功能?

A.
Automatic storage simplifies storage management by allowing you to specify storage paths where the database manager can place table space data.

自动存储简化了存储管理,允许您指定存储路径,数据库管理器可以将表空间数据。

B. Automatic storage is an option that allows transactions that are written to the database to be automatically committed.

C. Automatic storage is a function of DB2 that allows tables to be backed up automatically on a set schedule.

D. Automatic storage can be used to automatically recognize the data on the physical media in order to improve performance.

答案:A

 

86. Which of the following statements is false?

下列哪个陈述是错误的?

A. A primary key uniquely identifies a row in a table.

B. A foreign key is a set of columns that refers to a primary key of another table.

C. A primary key must always be defined in a table.

一个主键必须是定义在一个表。

D. Primary and foreign keys are used to enforce data integrity.

答案:C

 

87. Consider the following scenario. You have 3 tables with the same name (TABLE_1) under 3 different schemas (SYSIBM, DEFAULT and DB2INST1). You are connected to a DB2database in your Linux server as db2inst1
and issue the following statement:

SELECT * FROM table_1

Which table will you be selecting data from:

考虑下面的场景。你有3个相同的表名(TABLE_1)3种不同的模式(SYSIBMDEFAULT
DB2INST1)。在你的Linux服务器为db2inst1时连接到一个DB2database并发出以下语句:

SELECT * FROMtable_1

你会从哪个表中选择数据:

A. You get an error because your query is ambiguous, as the table schema is not specified

B. DB2INST1.table_1

C. DEFAULT.table_1

D. SYSIBM.table_1

答案:B

 

 

 

抱歉!评论已关闭.