SQL and Database Fundamentals
Comprehensive quiz covering SQL syntax, database concepts including keys, indexes, triggers, and Teradata database architecture components
Questions
reservepagegap can be used in any one of the following
- Index
- Page deallocation
- Trigger creation
- None of the above
What does SQL stand for??
- Strong Question Language
- Structured Query Language
- Structured Question Language
- None of the Above
Which of the statement allows you to roll back and creates log in the transaction log?
- TRUNCATE
- DELETE
- DELETE ALL
- REMOVE
Arrange the keyword “FROM, WHERE, SELECT, HAVING,GROUP BY, ORDER BY ” in the proper ?order
- SELECT, FROM , WHERE,GROUP BY, ORDER BY, HAVING?
- SELECT, FROM, WHERE, ORDER BY, HAVING,GROUP BY
- SELECT, FROM, WHERE, ORDER BY, GROUP BY, HAVING
- SELECT, FROM , WHERE,GROUP BY, HAVING, ORDER BY
The Minimum number of tables required to establish a many to many relationships are...
- 2
- 4
- 3
- 5
What will be the default sort order if nothing is specified explicitly in the SELECT statement?
- ASCENDING
- DESCENDING
- RANDOM
- PHYSICAL
UNION vs. UNION ALL
- UNION only selects distinct values, UNION ALL selects all values (excluding ?duplicates)?
- UNION ALL only selects distinct values, UNION selects all values (including ?duplicates)?
- UNION only selects distinct values, UNION ALL selects all values (including ?duplicates)?
- UNION ALL only selects distinct values, UNION selects all values (excluding ?duplicates)?
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?
- 10
- 1
- 5
- 50
Which CLAUSE is used in a SELECT statement to filter the records that a GROUP BY returns?
- WHERE
- HAVING
- HAVING BY
- ORDER BY
Which statement does not fire the Trigger?
- Delete
- Truncate
- Insert
- Update
Multiple indexes on a table will lead to...
- Increase the performance during SELECT operation
- Degrade the performance during INSERT operation?
- Degrade the performance during the UPDATE or DELETE operation
- All of the above
Which key has a logical relationship to the attributes within that row in a table??
- Natural Key
- Domain Key
- Candidate Key
- All of the Above
Which of the following is not true about an AMP?
- AMP stores and retrieves data using the file system
- AMP parses the SQL to determine the type and validity
- AMP sorts and formats the output
- AMP environment is a Shared Nothing Architecture
Bandwidth of BYNET increases with each consecutive node added to the system.
- True
- False
Which of the following is true for Perm Space
- Perm space can be dynamically modified.
- All Perm space specifications are subtracted from the immediate owner or parent.
- Perm space currently unused is available to be used as Spool or Temp space.
- Perm space is only used for tables and stored procedures.
- Volatile Temporary tables and “derived” tables utilize Perm space.
We refer to a join as a self-join when…
- We are using left and right join together
- We are joining more than 2 tables
- We are joining table to itself
- we are joining 2 tables
What is the purpose of the SQL AS clause?
- The AS clause is used with the JOIN clause only.
- 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.
- The AS clause defines a search condition.
- The AS clause defines a join
The BETWEEN SQL keywords specifies ...
- a column list.
- a table list.
- a list of values.
- a range to test in the SQL query search condition.
Which SQL keyword is used to retrieve only unique values?
- UNIQUE
- DIFFERENT
- DISTINCT
- DISTINCTIVE
What does Source Definitions stands for in terms of ETL processes?
- Tranform
- Extract
- Load
- All of the Above