Friday, May 18, 2012

DB2-1

Q. What is DB2 (IBM Database 2)?
A. DB2 is a subsystem of the MVS operating system. It is a database 
     Management System (DBMS) for that operating system.


Q. What is an access path?
A. The path that is used to get to data specified in SQL statements.


Q. What is an alias?
A. It is an alternate name that can be used in SQL statements to   
     refer to a table or view in the same or a remote DB2 subsystem.


Q. Explain what a plan is?
A. A plan is a DB2 object (produced during the bind process) that
     associates one or more database request modules with a plan 
     name.


Q. What is a DB2 bind?
A. A bind is a process that builds "access paths" to DB2 tables. A 
     bind uses Database Request Modules (DBRMs) from the DB2 
     precompile step as input and produces an application plan. It also
     checks user's authority and validates the SQL statements in 
     DBRMs.


Q. What information is used as input to the bind process?
A. 1. The database request model produced during the precompile.
     2. The SYSIBM.SYSSTMT table of the DB2 catalog.


Q. What is meant by attachment facility?
A. The attachment facility is an interface between DB2 and TSO, 
     IMS/VS, CICS or batch address spaces. It allows application 
     programs to access DB2.


Q. What is meant by AUTO COMMIT?
A. AUTO COMMIT is a SPUFI option that commits the effects of 
     SQL statements automatically if they are successfully executed.


Q. What is a base table?
A. A base table is a "real" table-a table that physically exists, in that
     there are physical stored records.


Q. What is the function of Buffer Manager?
A. The Buffer Manager is the DB2 component responsible for 
     physically transferring data between an external medium and 
     (virtual) storage (performs the actual I/O operations). It            
     minimizes the amount of physical I/O actually performed with 
     sophisticated buffering techniques (i.e., read-ahead buffering and 
     look-aside buffering).


Q. What is a buffer pool?
A. A buffer pool is main storage that is reserved to satisfy the 
     buffering requirements for one or more tablespaces or indexes 
     and is made up of either 4K or 32K pages.


Q. How many buffer pools are there in DB2?
A. There are four buffer pools namely : BPO, BPI, BP2, and BP32.


Q. On the create tablespace, what does the CLOSE parameter 
     do?
A. CLOSE physically closes the tablespace when no one is working 
     on the object. DB2 (Release 2.3) will logically close tablespaces.


Q. What is a clustering index?
A. It is a type index that locates table rows Determines how rows 
     are grouped together in the tablespace.


Q. What will the COMMIT accomplish?
A. COMMIT will allow data changes to be permanent. This then 
     permits the data to be accessed by other ' units of work. When a 
     COMMIT occurs, locks are freed so that other applications can 
     reference the just-committed data.


Q. What is meant by concurrency?
A. Concurrency is what allows more than one DB2 application 
     process to access the same data at essentially the same time.  
     Problems may occur, such as lost updates, access to 
     uncommitted data and unrepeatable reads.


Q. What is cursor stability?
A. It is cursor stability that "tells" DB2 that database values read by 
     this application are protected only while they are being used. 
     (Changed values are protected until this application reaches a 
     commit point.) As soon as a program moves from one row to 
     another, other programs may read or change the first row.


Q. What is the function of the Data Manager?
A. The Data Manager is a DB2 component that manages the 
     physical databases). It invokes other system components as 
     necessary to perform detailed functions such as locking, logging 
     and physical I/O operations (such as search, retrieval, update, 
     and index maintenance).


Q. What is a Database Request Module (DBRM)?
A. A DBRM is a DB2 component created by the DB2 precompiler 
     containing the SQL source statements extracted from the 
     application program. DBRMs are input to the bind process.


Q. What is a data page?
A. A data page is a unit of retrievable data, either 4K or 32K 
    (depending on how the table is defined) containing user or catalog 
    information.


Q. What are data types?
A They are attributes of columns, literal and host variables. The data 
    types are SMALLINT, INTEGER, FLOAT, DECIMAL, CHAR, 
    VARCHAR, DATE and TIME.


Q. What is a Declarations Generator (DCLGEN)?
A. DCLGEN is a facility that is used to generate SQL statements 
     that describe a table or view. These table or view descriptions are 
     then used to check the validity of other SQL statements at 
     precompile time. The table or view declare are used by the DB2I 
     utility DCLGEN to build a host language structure which is
     used by the DB2 precompiler to verify that correct column 
     names and data types have been specified in SQL statement.


Q. What does DSNDB07 database do?
A. DSNDB07 is where DB2 does its sorting. It includes DB2's sort 
     workarea and external storage.


Q. What is meant by dynamic SQL?
A. Dynamic SQL are SQL statements that are prepared and 
     executed within a program while the program is executing. The 
     SQL source is contained in host variables rather than being "hard 
     coded" into the program. The SQL statement may change from 
     execution to execution.


Q. What is meant by embedded SQL?
A. They are SQL statements that are embedded within an 
     application program and are prepared during program preparation 
     process before the program is executed. After it is prepared, the 
     statement itself does not change (although values of host 
     variables specified within the statement might change).


Q. What is meant by entity integrity?
A.  Entity integrity is when the primary key is in fact unique and not 
      null.

No comments:

Post a Comment