FAQs(16 to 30)

16) What is a correlation name?

A) A correlation name is a special type of column designator that connects specific columns in the various levels of a multilevel SQL query.

17) What is a results table?

A) A result table is the product of a query against one or more tables or views (i.e., it is the place that holds the results of a query).

18) What is a cursor?

A) 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.

19) What is the basic difference between a join and a union?

A) A join selects columns from 2 or more tables. A union selects rows.

20) What is normalization and what are the five normal forms?

A) Normalization is a design procedure for representing data in tabular format. The five normal forms are progressive

rules to represent the data with minimal redundancy.

21) What are foreign keys?

A) These are attributes of one table that have matching values in a primary key in another table, allowing for relationships between tables.

22) Describe the elements of the SELECT query syntax?

A) SELECT element FROM table WHERE conditional statement.

23) Explain the use of the WHERE clause?

A) WHERE is used with a relational statement to isolate the object element or row.

24) What techniques are used to retrieve data from more than one table in a single SQL statement?

A) Joins, unions and nested selects are used to retrieve data.

25) What is a view? Why use it?

A) A view is a virtual table made up of data from base tables and other views, but not stored separately.

26) Explain an outer join?

A) An outer join includes rows from tables when there are no matching values in the tables.

27) What is a subselect? Is it different from a nested select?

A) A subselect is a select which works in conjunction with another select. A nested select is a kind of subselect where the

inner select passes to the where criteria for the outer select.

28) What is the difference between group by and order by?

A) Group by controls the presentation of the rows, order by controls the presentation of the columns for the results of the

SELECT statement.

29) What keyword does an SQL SELECT statement use for a string search?

A) The LIKE keyword allows for string searches. The % sign is used as a wildcard.

30) What are some SQL aggregates and other built-in functions?

A) The common aggregate, built-in functions are AVG, SUM, MIN, MAX, COUNT and DISTINCT.