SQL and Database Fundamentals

Comprehensive quiz covering SQL syntax, database concepts including keys, indexes, triggers, and Teradata database architecture components

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

reservepagegap can be used in any one of the following

  1. Index
  2. Page deallocation
  3. Trigger creation
  4. None of the above
Question 2 Multiple Choice (Single Answer)

What does SQL stand for??

  1. Strong Question Language
  2. Structured Query Language
  3. Structured Question Language
  4. None of the Above
Question 3 Multiple Choice (Single Answer)

Which of the statement allows you to roll back and creates log in the transaction log?

  1. TRUNCATE
  2. DELETE
  3. DELETE ALL
  4. REMOVE
Question 4 Multiple Choice (Single Answer)

Arrange the keyword “FROM, WHERE, SELECT, HAVING,GROUP BY, ORDER BY ” in the proper ?order

  1. SELECT, FROM , WHERE,GROUP BY, ORDER BY, HAVING?
  2. SELECT, FROM, WHERE, ORDER BY, HAVING,GROUP BY
  3. SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING
  4. SELECT, FROM , WHERE,GROUP BY, HAVING, ORDER BY
Question 5 Multiple Choice (Single Answer)

The Minimum number of tables required to establish a many to many relationships are...

  1. 2
  2. 4
  3. 3
  4. 5
Question 6 Multiple Choice (Single Answer)

What will be the default sort order if nothing is specified explicitly in the SELECT statement?

  1. ASCENDING
  2. DESCENDING
  3. RANDOM
  4. PHYSICAL
Question 7 Multiple Choice (Single Answer)

UNION vs. UNION ALL

  1. UNION only selects distinct values, UNION ALL selects all values (excluding ?duplicates)?
  2. UNION ALL only selects distinct values, UNION selects all values (including ?duplicates)?
  3. UNION only selects distinct values, UNION ALL selects all values (including ?duplicates)?
  4. UNION ALL only selects distinct values, UNION selects all values (excluding ?duplicates)?
Question 8 Multiple Choice (Single Answer)

The Query has Main and Sub Query. If the main query returns 10 records and subquery returns 5 records, then how many times the subquery gets executed?

  1. 10
  2. 1
  3. 5
  4. 50
Question 9 Multiple Choice (Single Answer)

Which CLAUSE is used in a SELECT statement to filter the records that a GROUP BY returns?

  1. WHERE
  2. HAVING
  3. HAVING BY
  4. ORDER BY
Question 10 Multiple Choice (Single Answer)

Which statement does not fire the Trigger?

  1. Delete
  2. Truncate
  3. Insert
  4. Update
Question 11 Multiple Choice (Single Answer)

Multiple indexes on a table will lead to...

  1. Increase the performance during SELECT operation
  2. Degrade the performance during INSERT operation?
  3. Degrade the performance during the UPDATE or DELETE operation
  4. All of the above
Question 12 Multiple Choice (Single Answer)

Which key has a logical relationship to the attributes within that row in a table??

  1. Natural Key
  2. Domain Key
  3. Candidate Key
  4. All of the Above
Question 13 Multiple Choice (Single Answer)

Which of the following is not true about an AMP?

  1. AMP stores and retrieves data using the file system
  2. AMP parses the SQL to determine the type and validity
  3. AMP sorts and formats the output
  4. AMP environment is a Shared Nothing Architecture
Question 14 True/False

Bandwidth of BYNET increases with each consecutive node added to the system.

  1. True
  2. False
Question 15 Multiple Choice (Multiple Answers)

Which of the following is true for Perm Space

  1. Perm space can be dynamically modified.
  2. All Perm space specifications are subtracted from the immediate owner or parent.
  3. Perm space currently unused is available to be used as Spool or Temp space.
  4. Perm space is only used for tables and stored procedures.
  5. Volatile Temporary tables and “derived” tables utilize Perm space.
Question 16 Multiple Choice (Single Answer)

We refer to a join as a self-join when…

  1. We are using left and right join together
  2. We are joining more than 2 tables
  3. We are joining table to itself
  4. we are joining 2 tables
Question 17 Multiple Choice (Single Answer)

What is the purpose of the SQL AS clause?

  1. The AS clause is used with the JOIN clause only.
  2. The AS SQL clause is used change the name of a column in the result set or to assign a name to a derived column.
  3. The AS clause defines a search condition.
  4. The AS clause defines a join
Question 18 Multiple Choice (Single Answer)

The BETWEEN SQL keywords specifies ...

  1. a column list.
  2. a table list.
  3. a list of values.
  4. a range to test in the SQL query search condition.
Question 19 Multiple Choice (Single Answer)

Which SQL keyword is used to retrieve only unique values?

  1. UNIQUE
  2. DIFFERENT
  3. DISTINCT
  4. DISTINCTIVE
Question 20 Multiple Choice (Single Answer)

What does Source Definitions stands for in terms of ETL processes?

  1. Tranform
  2. Extract
  3. Load
  4. All of the Above