The following DB2 Programming MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of DB2 Programming. We encourage you to answer these 100+ multiple-choice questions to assess your proficiency.
Please continue by scrolling down.
A. The data (row) is locked until a commit is executed to release the updated data.
B. All of the above
C. Locking prevents concurrent users from accessing inconsistent data.
D. Locking is a process that is used to ensure data integrity.
A. Dynamic SQL.
B. T-SQL.
C. Static SQL.
D. NoSQL.
A. Dropping a tablespace will not only remove all tables of the tablespace itself, but also all indexes created on these tables, even tho ugh they are stored separately in their own indexspace.
B. A tablespace is divided in units called pages , which hold one or more rows of a table. If a row of 8000 bytes is placed in a 4K page, th e row will automatically be split over two pages.
C. A tablespace is divided in units called pages , which hold one or more rows of a table. If a row of 8000 bytes is placed in a 4K page, the page will automatically be resized to 8K.
D. When creating a tablespace, one must indicate either the storage group or the bufferpool to be used by this tablespace. If neither is defined, the creation of the tablespace will fail.
A. Any
B. All
C. In
D. Between
A. Outer join
B. None of the above
C. Non equi join
D. Inner join
A. When a TABLESPACE is S-locked by another user, a U-lock can be placed. However, an X-lock is not compatible and will have to wait until the S-lock is released.
B. When a TABLESPACE is S-locked by another user, neither a U lock or an X lock is com- patible on this level. In both cases an I lock (IU lock, IX lock) will be placed to indicate that a U lock or X lock is waiting to be placed.
C. When a TABLESPACE is S-locked by another user, a U lock can be placed. However, an X lock is not compatible. A IX lock (Intent to eXclusively use) will be placed to indicate that a X lock is waiting to be placed.
D. When a TABLESPACE is S-locked (Shared use) by another user, a U lock (Update use) can be placed. However, an X lock (eXclusive use) on this level will force the S lock to be dropped, its transaction to be rolled-back to be able to place the X lock.
A. SQLSTATE
B. SQLWARN
C. SQLCODE
D. SQLNUM
A. Vargraphic
B. Long Vargraphic
C. Graphic
D. Long Graphic
A. C & F
B. There is still a single null allowed, since it is unique as such.
C. Nulls are no longer allowed, since nulls aren’t unique.
D. It has no influence on the possible null values; DB2 doesn’t consider nulls when it comes to an index.
A. UPDATE T001.CLASSS SET CDUR = 5
B. UPDATE T001.CLASSS SET CDUR = 5 WHERE CURRENT OF CLASSUPDATE
C. UPDATE SET CDUR = 5 WHERE CURRENT OF CLASSUPDATE
D. UPDATE T001.CLASSS C SET C.CSTITLE = 'New Title' WHERE CURRENT OF CLASSUPDATE
A. The row will be inserted only if the user has an authority to insert on table S001.TEAMS, but it will never show up in a SELECT on this view.
B. The row won’t be inserted because the field STATE doesn’t have the value ‘MA’.
C. The row will be inserted in the table S001.TEAMS, but it will never show up in a SELECT on this view.
D. You can’t insert into a view, because views don’t contain actual data; they’re just virtual windows on base tables.
A. It can be used in BIND step(for embedded SQL).
B. EXPLAIN is used to display the access path as determined by the optimizer for a SQL statement
C. It can be used in SPUFI(for single SQL statement)
D. C,D & E
A. The data type of the included columns.
B. The order of the included columns.
C. The nullability of one of the included columns.
D. B & E
A. He/She only has a SELECT authorization on that view.
B. He/She will face an authorization error when trying to create the view
C. He/She can only execute an UPDATE as long as the definition of the view is not exceeded.
D. He/She also has DELETE authorization on that view because he/she is the creator of the view.
A. 3
B. 0
C. 1
D. 2
A. Only sometimes, because they vary from static to dynamic SQL.
B. Never because they use dynamic SQL.
C. Every time because they use static SQL.
D. Only when you're using a Java wrapper.
A. Yes, but the program has to be altered.
B. Yes. DB2 is a fully dynamic program, accepting all forms of SQL.
C. No.
D. Yes, but the statements have to be changed as well.
A. Dynamic SQL.
B. PL/SQL
C. T-SQL.
D. Static SQL.
A. They are not binded because they use standard functions to execute SQL.
B. They are binded at compile time.
C. They are pre-process binded.
D. They are binded using standard functions in SQL.
A. It has to be binded first so it can recognize SQL statements.
B. It has to be compressed first so it can recognize SQL statements.
C. It has to be encrypted first so it can recognize SQL statements.
D. It has to be compiled first so it can recognize SQL statements.
A. Once you write the program, it can be used with any other program or software.
B. There is no benefit to programming with Java.
C. Once you write the program, it acts like a stored procedure.
D. Once you develop an application, it can be run anywhere.
A. Increase of data conflicts.
B. Minimization of data access conflicts.
C. Increasing data access points.
D. Multi-threaded compiling.
A. SELECT MYCURS INTO :HOSTMYTABLE:IND
B. FETCH MYCURS INTO :HOSTMYTABLE:IND
C. SELECT * INTO :HOSTMYTABLE:IND FROM MYCURS
D. FETCH * INTO :HOSTMYTABLE:IND FROM MYTABLE
A. Auger effect.
B. Faraday effect.
C. Stormdrain effect.
D. Hutchins effect.
A. ;varchar
B. ;hostvar
C. ;iostream.h
D. ;hostchar
A. Updating multiple tables
B. Updating a view consisting of joined tables
C. Updating multiple tables based on a WHERE clause
D. Updating a table based on a sub-select using joined tables
A. A crackup.
B. A mashup.
C. A mixup.
D. A smashup.
A. An index has its own INDEX SPACE, automatically created
B. A clustering index influences the physical sequence of data in the tablespace.
C. An index always has a balanced tree structure.
D. The name of an index can be mentioned in a Select statement, to improve the performance of the query.
A. The database was disabled.
B. The exit was disabled.
C. The exit was not ENABLE STARTED.
D. The exit was not enabled.
A. You check in the CICS configuration file.
B. Use the EXTRACT EXIT command in your application, or INQUIRE EXITPROGRAM in version 4.0.
C. You shut down DB2 and check in the CICS kernal.
D. You check in the CICS configuration menu.
A. Transcribe, and bind.
B. Compile, and bind.
C. Pretranscribe, and bind.
D. Precompile, and bind.
A. 3
B. 2
C. 1
D. 0
A. DB2 Application plan
B. DB2 Catalog
C. Database request module
D. Load Module
A. A STATIC CURSOR
B. A DECLARE CURSOR.
C. A SELECT CURSOR
D. A DEFINE CURSOR
A. Use the “javago” command.
B. Use the “javac” command.
C. Use the “DB2java” command.
D. Use the “JBDC” command.
A. Current SQLID
B. Primary Authorization ID
C. SQL Authorization ID
D. Secondary Authorization ID
A. WebSphere Studio, Adobe Acrobat Studio, and IBM Optim Development Studio.
B. PhotoData Studio, Microsoft Visual Studio, and IBM Optim Development Studio.
C. Silverlight Studio, Microsoft Visual Studio, and IBM Optim Development Studio.
D. WebSphere Studio, Microsoft Visual Studio, and IBM Optim Development Studio.
A. Networked processing.
B. Parallel processing.
C. Unilateral processing.
D. Quadratic processing.
A. DCL SINTAR BIN FAXED(15);
B. (15)DCL SINTVAR BIN FIXED;
C. DCL SINvTAR BIN FIXED(15);
D. DCL SINTVAR BIN FIXED(15);
A. HTML, MSDOS, Python.
B. PHP, Ruby on Rails, and Haskell.
C. Perl, Python, and PL/SQL.
D. COBOL, Fortran, and Perl.
A. It parses stored procedures.
B. It checks the code of SQL statements.
C. It checks the execution of SQL statements.
D. It checks the locking of SQL statements.
A. A group of host variables that an SQL statement can refer to by using a single name.
B. A single host variable that an SQL statement can refer to by using a single name.
C. A variable group of hosts that an SQL statement can refer to by using any name.
D. A group of host variables that an SQL statement can process.
A. Mirrored Tables
B. Indexes
C. Aliases
D. Views
A. An SQL statement to execute a program.
B. A program to execute SQL statements.
C. A method for using wrappers to encode SQL.
D. An SQL statement.
A. SELECT DISTINCT * FROM t1
B. SELECT UNIQUE * FROM t1
C. SELECT * FROM DISTINCT T1
D. SELECT UNIQUE (*) FROM t1
A. All of the above
B. A role cannot be a primary authorization ID.
C. A role cannot be set by using a SET CURRENT SQLID statement.
D. A role can be the schema qualifier of an object. However, when it is used as a schema qualifier, a role is considered to be a character string and does not add any implicit schema privileges (ALTERIN, CREATEIN, or DROPIN) to this role.
A. To store intermediate results
B. To share result sets between applications
C. To create a backup copy of a database or table space
D. To provide an area for database manager sorts
A. Inner Join
B. Intersect
C. Union All
D. Union
A. The unit of wok moves to pending state
B. The unit of work moves to CHECK_PENDING
C. The unit of work remains active
D. The unit of work is rolled back
A. Hadoop
B. OBDC
C. Dynamic SQL.
D. Static SQL