吉大24春學期《數(shù)據(jù)庫應用技術》在線作業(yè)二 -0002
試卷總分:100 得分:100
一、單選題 (共 25 道試題,共 100 分)
1.發(fā)人員開發(fā)訪問后臺AIX上的DB2的windows程序,需要在windows開發(fā)平臺上安裝:
A.DB2運行時間客戶端
B.DB2管理客戶端
C.DB2應用程序開發(fā)客戶端
D.DB2瘦客戶端
2.關系數(shù)據(jù)庫管理系統(tǒng)應能實現(xiàn)的專門關系運算包括()
A.排序、索引、統(tǒng)計
B.選擇、投影、連接
C.關聯(lián)、更新、排序
D.顯示、打印、制表
3.下列SQL語句中,能夠?qū)崿F(xiàn)”收回U4對學生表(STUD)中學號(XH)的修改權”這一功能的是以下哪項?
A.REVOKE UPDATE(XH) ON TABLE FROM U4
B.REVOKE UPDATE(XH) ON TABLE FROM PUBLIC
C.REVOKE UPDATE(XH) ON STUD FROM U4
D.REVOKE UPDATE(XH) ON STUD FROM PUBLIC
4.下面哪個工具可以保存終端用戶需要存取的元數(shù)據(jù)?
A.Query Management Facility
B.DB2 Query Patroller
C.DB2存儲過程構建器
D.信息目錄
5.如果選用循環(huán)日志方式,輔助日志文件何時分配?
A.數(shù)據(jù)庫建立的時候
B.數(shù)據(jù)庫服務器啟動的時候
C.需要的時候
D.以上都不對
6.并發(fā)控制的主要方法是采用以下哪種機制?
A.口令
B.鎖
C.副本
D.檢查點
7.在SELECT語句的下列子句中,通常和HAVING子句同時使用的是以下哪項?
A.ORDER BY子句
B.WHERE子句
C.GROUP BY子句
D.均不需要
8.下列哪種工具可以向表中增添記錄,并更改數(shù)據(jù)庫的統(tǒng)計信息?
A.import
B.insert
C.load
D.update
9.Which of the following is a benefit of user-defined functions?
A.Improves application concurrency
B.Improves blocking of result sets
C.Simplifies application maintenance
D.Reduces memory requirements on the server
10.關系模型中的關系模式至少是()
A.1NF
B.2NF
C.3NF
D.BCNF
11.對于支持小規(guī)模的部門級應用,這些應用不需要存取駐留在OS/400、OS/390等平臺上的遠程數(shù)據(jù)庫,則需要哪種級別的DB2 產(chǎn)品?
A.企業(yè)版
B.工作組版
C.企業(yè)擴展版
D.個人版
E.衛(wèi)星版
F.微型版
12.SQL語言具有()功能。
A.關系規(guī)范化、數(shù)據(jù)操縱、數(shù)據(jù)控制
B.數(shù)據(jù)定義、數(shù)據(jù)操縱、數(shù)據(jù)控制
C.數(shù)據(jù)定義、關系規(guī)范化、數(shù)據(jù)控制
D.數(shù)據(jù)定義、關系規(guī)范化、數(shù)據(jù)操縱
13.下面哪一工具允許用戶開發(fā)存儲過程?
A.控制中心
B.命令中心
C.任務中心
D.開發(fā)中心
E.健康中心
14.Given the expression: WITH most_cities AS ( SELECT b.id,b.name,a.cities FROM country a, staff b WHERE a.person = b.id AND cities > :threshold ) SELECT * FROM most_cities In which of the following does MOST_CITIES exist?
A.user tables
B.server memory
C.user table space
D.system catalog tables
15.定義基本表時,若要求某一列的值不能為空,則應在定義時使用什么保留字?但如果該列是主鍵,則可省寫。
A.NULL
B.NOT NULL
C.DISTINCT
D.UNIQUE
16.如果需要創(chuàng)建一個表,并把表中的索引數(shù)據(jù)和其他數(shù)據(jù)分開存儲,則應該
A.建立兩個SMS表空間分別存儲索引數(shù)據(jù)和其他數(shù)據(jù)
B.建立兩個DMS表空間分別存儲索引數(shù)據(jù)和其他數(shù)據(jù)
C.建立一個DMS表空間存儲索引數(shù)據(jù),再建立一個SMS表空間存儲其他數(shù)據(jù)
D.建立一個SMS表空間存儲索引數(shù)據(jù),再建立一個DMS表空間存儲其他數(shù)據(jù)
17.A cursor is declared with the WITH HOLD option. Which of the following statements is always true?
A.The cursor will remain open after a COMMIT.
B.All rows retrieved are locked until a COMMIT.
C.A COMMIT will not be allowed until the cursor is closed.
D.Locks obtained by the cursor will be kept after a COMMIT.
18.據(jù)庫系統(tǒng)和文件系統(tǒng)的主要區(qū)別是:
A.數(shù)據(jù)庫系統(tǒng)復雜,而文件系統(tǒng)簡單。
B.文件系統(tǒng)不能解決數(shù)據(jù)冗余和數(shù)據(jù)獨立性問題,而數(shù)據(jù)庫系統(tǒng)可以解決。
C.文件系統(tǒng)只能管理程序文件,而數(shù)據(jù)庫系統(tǒng)能夠管理各種類型的文件。
D.文件系統(tǒng)管理的數(shù)據(jù)量較少,而數(shù)據(jù)庫系統(tǒng)可以管理龐大的數(shù)據(jù)量。
19.Given the tables: COUNTRY STAFF id name person cities id name 1 Argentina 1 10 1 Aaron 2 Canada 2 20 2 Adams 3 Cuba 2 10 3 Jones 4 Germany 1 0 5 France 3 5 6 Italy 1 5 the report: id name number_of_countries ---------- ---------- ------------------- 1 Aaron 3 and the SQL statement: SELECT B.id,B.name,COUNT(DISTINCT A.name) AS number_of_countries FROM country A, staff B WHERE B.id=A.person GROUP BY B.id,B.name HAVING COUNT(DISTINCT A.name)>:count_var Which of the following values does :count_var require to print out the above report?
A.1
B.2
C.3
D.4
20.Given the code: EXEC SQL WITH most_cities AS ( SELECT b.id, b.name, a.cities FROM country a, staff b WHERE a.person = b.id AND cities > :threshold ) SELECT id, name, cities FROM most_cities INTO :id, :name, :cities WHERE cities IN (SELECT MAX(cities) FROM most_cities) Which of the following can reference MOST_CITIES?
A.The current statement
B.Statements from any application
C.All statements within this application
D.All statements within the current unit of work
21.缺省的數(shù)據(jù)庫日志文件的類型是:
A.Circular Log
B.Archival Log
C.Primary Log
D.Secondary log
22.An ODBC/CLI application has the following pseudocode: SQLAllocHandle( SQL_HANDLE_DBC, hEnv, &hDbc ) SQLConnect( hDbc, "CERTDB", SQL_NTS, "user1", SQL_NTS, "passwd", SQL_NTS ) SQLAllocHandle( SQL_HANDLE_STMT, hDbc, &hStmt ) SQLExecDirect( hStmt, "SET CURRENT SQLID db2cert", SQL_NTS ) Assuming all of the above calls execute successfully, which of the following fully qualified SQL statements is equivalent to: SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )
A.SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )
B.. SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, user1.table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )
C.. SQLExecDirect( hStmt, "SELECT * FROM user1.table1 t1, db2cert.table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )
D.. SQLExecDirect( hStmt, "SELECT * FROM db2cert.table1 t1, db2cert.table2 t2 WHERE t1.col1=t2.col2", SQL_NTS )
23.How many rows can be retrieved using a single SELECT INTO statement?
A.Only one row
B.As many as are in the result
C.As many as are host variables used in the call
D.As many as host variable array structures can hold
24.Given the application code: EXEC SQL DECLARE cur CURSOR WITH HOLD FOR SELECT c1 FROM t1 EXEC SQL OPEN cur EXEC SQL FETCH cur INTO :hv /* Statement 1 */ EXEC SQL COMMIT /* Statement 2 */ EXEC SQL FETCH cur INTO :hv /* Statement 3 */ EXEC SQL ROLLBACK /* Statement 4 */ EXEC SQL CLOSE cur /* Statement 5 */ If the table T1 has no rows in it, which statement will cause the cursor "cur" to be closed first?
A.Statement 1
B.Statement 2
C.Statement 3
D.Statement 4
25.要對應用程序預編譯并生成綁定文件,需要什么特權?
A.數(shù)據(jù)庫上的CONNECT特權
B.數(shù)據(jù)庫上的BINDADD特權
C.程序包上的BIND特權
D.程序包上的CONTROL特權
奧鵬,國開,廣開,電大在線,各省平臺,新疆一體化等平臺學習
詳情請咨詢QQ : 3230981406或微信:aopopenfd777