DB2 Interview questions
DB2 Interview questions 1-10
-
Q1: What RDMS objects are required before you can create a table?
- Answer : Before you can create a table, you need an existing database and tablespace.
Q2: Can one add columns to a table after it has been defined?
- Answer : Yes, one can add column to a table after it has been defined by using the SQL ALTER TABLE statement.
Q3: Where in a table are added columns located?
- Answer : The new columns are added to the end of the table.
Q4: What authority is required to create a table?
- Answer : In order to create tables, one needs CREATETAB privileges
Q5: What is minimum authority required for one to create a tablespace?
- Answer : In order to create tablespaces, one needs CREATETS privileges
Q6: What is a synonym?
- Answer : A synonym is an unqualified alternative name for a table or view.
Q7: What is a foreign key?
- Answer : A foreign key is the key defined in one table to reference the primary key of a reference table. This foreign key must have the same structure as the reference table’s primary key.
Q8: What is a cursor?
- Answer : A cursor is a named control structure used to make a set of rows available to a program. DB2 is the relational database system that runs in an MVS environment. It was developed by IBM and interfaces with SQL. With the use of SQL DB2, databases can be accessed by a wide range of host languages. SQL is the relational database " application language " that interfaces with DB2. Because of its capabilities, SQL and, in turn, DB2 have gained considerable acceptance. Thus, a working knowledge of DB2 increases one's marketability
Q9: What is the basic difference between a join and a union?
- Answer : A join selects columns from 2 or more tables. A union selects rows.
Q10: What is a view? Why use it?
- Answer : A view is a virtual table made up of data from base tables and other views, but not stored separately