Database Concepts and DB2 Fundamentals

Quiz covering database fundamentals including DB2 data types, constraints, views, triggers, transactions, cursors, and basic database record structures

20 Questions Published

Questions

Question 1 True/False

Each time you fetch a row from the cursor, it results in a network roundtrip

  1. True
  2. False
Question 2 True/False

can we have a nested transaction

  1. True
  2. False
Question 3 True/False

t-sql variables case sensitive?

  1. True
  2. False
Question 4 Multiple Choice (Single Answer)

A database is divided into:

  1. records
  2. fields
  3. articles
  4. names
Question 5 Multiple Choice (Single Answer)

In a database of newspaper, journal or magazine articles, each record represents:

  1. one magazine, journal or newspaper
  2. one author
  3. one article from a magazine, journal or newspaper
  4. all of the above
Question 6 Multiple Choice (Multiple Answers)

In a library catalogue database, each record represents:

  1. one book, journal, video, CD, etc.
  2. one author
  3. one subject
  4. all of the above
Question 7 Multiple Choice (Multiple Answers)

You are searching an electronic article index that contains citations to journal articles. What part of each article does the database contain?

  1. the whole article
  2. a summary of the article
  3. the title of the article
  4. the author, title and source of the article
Question 8 Multiple Choice (Single Answer)

You are making your own database so you can organize information about your ‘Top 100' movies. You want to include information like Title, Actor(s), Director, Year, Genre, etc. Each record in your database will represent:

  1. an actor
  2. a director
  3. a year
  4. a movie
Question 9 Multiple Choice (Single Answer)

Which of the following is the lowest cost DB2 product that can be legally installed on a Windows server that has 2 CPUs?

  1. DB2 Everyplace
  2. DB2 Express Edition
  3. DB2 Workgroup Server Edition
  4. DB2 Enterprise Server Edition
Question 10 Multiple Choice (Multiple Answers)

On which two of the following database objects may the SELECT privilege be controlled?

  1. Index
  2. Sequence
  3. Nickname
  4. View
Question 11 Multiple Choice (Single Answer)

Which of the following DB2 objects can be referenced by an INSERT statement to generate values for a column?

  1. Identity column
  2. Table function
  3. Sequence
  4. Trigger
Question 12 Multiple Choice (Single Answer)

Which of the following events will NOT cause a trigger to be activated?

  1. A select operation
  2. An update operation
  3. An insert operation
  4. A delete operation
Question 13 Multiple Choice (Single Answer)

Which of the following DB2 data types does NOT have a fixed length?

  1. INT
  2. XML
  3. CHAR
  4. DOUBLE
Question 14 Multiple Choice (Single Answer)

Which of the following DB2 data types can NOT be used to create an identity column?

  1. SMALLINT
  2. NUMERIC
  3. INTEGER
  4. DOUBLE
Question 15 Multiple Choice (Multiple Answers)

Which of the following are optional and do not have to be specified when creating a table?

  1. Default constraint
  2. Column data type
  3. Column name
  4. Table name
Question 16 Multiple Choice (Single Answer)

Which of the following can NOT be used to restrict specific values from being inserted into a column in a particular table?

  1. Index
  2. Check constraint
  3. Default constraint
  4. Referential constraint
Question 17 Multiple Choice (Single Answer)

When does a view get populated?

  1. When it is created
  2. When it is referenced in an INSERT statement
  3. Any time an executable SQL statement references it
  4. The first time any executable SQL statement references it
Question 18 Multiple Choice (Single Answer)

To which of the following resources can a lock NOT be applied?

  1. Tablespaces
  2. Buffer pools
  3. Tables
  4. Rows
Question 19 Multiple Choice (Multiple Answers)

In NPS the minimum NPS row overhead is how many bytes

  1. 24
  2. 26
  3. 28
  4. 22
Question 20 True/False

In NPS, it's a best practice to use 'rowid' as a primary key in a database table to guarantee quick access

  1. True
  2. False