Vous êtes sur la page 1sur 5

DB2 Questions 1. What is DB2?

DB2 is relational database management system from IBM that serve different operating system. 2. What is an Access path? It is the path to retrieve the data. 3. What is an object? It is the entity of the DB2 (storage group, database, table space, table, and column)
An object is anything that is managed by DB2 (that is databases, table spaces, tables, views, indexes or synonyms), but not the data itself.

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

5. What is meant by AUTO COMMIT? Auto commit commits after each SQL command. AUTO COMMIT is a SPUFI option that commits the effects of SQL statements automatically if they are successfully executed.

7. What is a base table? The table that has permanent memory is base table. 8. What is a buffer pool? Temporary storage of the DB2 data for interaction between table and requester. 9. What is a clustering index? Table data is physically stored in the order given in the clustering index 10. What will the COMMIT accomplish? Commit will save the data in the table. 11. What is cursor stability? DB2 locks the page where the cursor is reading the data. 12. What is concurrency and how is it controlled? 13. What is meant by isolation level? Locking level of data (row or page) 14. Describe the different isolation levels in order of concurrency.

RR- repeatable read, RS- read stability , CS- cursor stability , UR- uncommitted read CS releases the lock on a page after use RR- retains all locks on all rows referenced by transaction until commit is issued. RS - retains all locks on all rows retrieved by transaction until commit is issued. UR allows others to see the data before commit is issued. 15. What are the different kinds of table locks available in DB2? Shared allows others to read the data Exclusive doesnt allow other transaction to read the data. 16. What is a foreign key? It is primary key of another table 17 What is Referential Integrity? Foreign key references a column in another table. 18 How can a insert of a new foreign key value threaten referential integrity? 19 What is a Check Constraint? 20 What is an Index? Index is a mechanism that allows to search data quickly.
An index is a set of row identifiers (RIDs) or pointers that are logically ordered by the values of a column that has been specified as being an index. Indexes provide faster access to data and can enforce uniqueness on the row in a table.

21 What is an Index Scan? 22 What is meant by entity integrity? Entity integrity is when the primary key is in fact unique and not null. 23 What will the FREE command do to a plan? Plan and package will be deleted. 24 What will the GRANT command do? Will provide the access permission
It will grant privileges to a list of one or more users. If the GRANT option is used in conjunction with the PUBLIC option, then all users will be granted privileges. Also you can grant privileges by objects and types

25 What is an image copy? It is the full backup of DB2 table which can be used for recovery. 25 What does locking mean? Locking the row or page while one requester is accessing the data 27 Is there any advantage to de normalizing DB2 tables? 28 What is lock contention? 29 What is SPUFI? Full form for SPUFI is SQL processing Using File Input. In a SPUFI we can execute more than one query where as in QMF we can't. Input will give in a PDS and output file is PS.

30 What is an Alias? It is the temporary name for a table. 31 What is the difference between an alias and a synonym? In alias referred table can be in the same or different subsystem. Not dropped when table is dropped Synonym table must be in same subsystem. It is dropped when table is dropped. 32 What will the DB2 optimizer do? 33 What is a Resource Control Table (RCT)? Describe its 34 Where are plans stored? SYSIBM . SYSPLAN 35 What is a page? Page is a unit of I/O operation. 36 What is a page space? 37 What is a table-space? A tablespace is a logical group of data files in a database. A database typically contains at least one tablespace, and usually two or more 38 What are the 3 types of table-spaces? Simple, segmented, partitioned

39 What is the format of TIMESTAMP? YYYY-MM-DD HH:MM:SS

Data format is TIMESTAMP 40 In which column of which DB2 catalog would you find the length 41 What information is held in SYSIBM.SYSCOPY? Information about image copies made of the table space. 42 What information can you find in SYSIBM.SYSLINKS? The SYSIBM.SYSLINKS table contains information about the links between tables created by referential constraints

43 Whats normalization, type of normalization? Normalization is set of rules for optimizing the database. 1st normal form, 2nd normal form to 5th normal form. We use only up to 3rd normal form. 44.what is the difference between static SQL and dynamic SQL? static SQL needs to be compiled and bound to the database before application runtime, while dynamic SQL is compiled during runtime

45. What is embedded SQL? SQL is embedded into a programming language like COBOL, PL/I. 46.Define unique key A unique key comprises a single column or a set of columns. A table can have at most one primary key, but more than one unique key.

47. How many primary keys are possible for a table? Only one primary key. 48. Does every table need a primary key? Not necessary, but using primary key is best data base design. 49. What is a view? Why use it? View is a logical view of a table. This can be used for providing security for the table. 50. Max number of columns in a DB2 table ? 256 columns 51. What is the maximum length of a column name? Max 18 bytes

52. What is JOIN and different types of JOIN. Join- for comparing or combining two tables 1. Inner join 2. Outer join- full outer, left outer, right outer 53. How many sub-queries can you combine together ? 15 Total 16 queries and sub queries are 15

Vous aimerez peut-être aussi