SQL Query Fundamentals and Database Performance
Covers SQL datatypes, operators, functions, joins, aggregate functions, query performance optimization, and database design concepts.
Questions
You are defining the operational process of your RDBMS. Referring to the scenario above, which one of the following is a valid ongoing "operational process?"
- OS requirement
- User analysis
- Performance monitoring
- Data dictionary specification
- System requirement
You have been asked to construct a query in the company's RDBMS. You have deployed a Right Outer Join operation. Referring to the scenario above, what will happen to the final results when there is NO match between the tables?
- The right table will return ALL rows.
- The right table will return NULL.
- Both tables will return NULL.
- The left table will return ALL rows.
- The left table will return NULL.
Which phase of the data modeling process contains security review?
- Structure
- Design issue
- Data source
- Storage issue
- Operational process
Which one of the following is NOT a characteristic of metadata?
- Data about data
- Describes a data dictionary
- Self-describing
- Includes user data
- Supports its own structure
Which one of the following capabilities do you expect to see in a majority of RDBMS extensions to ANSI SQL-92?
- Encryption key management
- Graphical User Interface Widgets
- Thread creation, execution, & coordination
- Network socket creation/operation
- If/Then, for, do/while statements
What can a mandatory one to one relationship indicate?
- More entities are needed.
- The model should be denormalized.
- The tables are not properly indexed.
- The model cannot be implemented physically.
- More attributes are needed.
For performance, you denormalize your database design and create some redundant columns. Referring to the scenario above, what RDBMS construct can you use to automatically prevent the repeated columns from getting out of sync?
- Cursors
- Constraints
- Views
- Stored procedures
- Trigger
You are running a query against a relational database. Referring to the scenario above, what clause or command do you use in the query to help avoid a costly tablescan?
- GROUP BY clause
- INDEX command
- HAVING clause
- FROM clause
- WHERE clause [/quote]
The query performance increases by using NOT operator.
- True
- False
If there are 3 persons with last names JOHN, J and JAMES how many of them are included in the result set of the query "SELECT LAST_NAME FROM STAFF WHERE LAST_NAME BETWEEN 'A' AND 'J'"
- 3
- 2
- 1
- 0
NULL values are ingnored for all SQ: 2008 aggregate functions.
- True
- False
Which operators can be used to produce summary totals in the result sets of SQL 2008.
- GROUPING
- WITH ROLL UP
- WITH CUBE
- WITH SUMMARY
UNION ALL is faster than a UNION
- True
- False
The query performance increases by using NOT operator.
- True
- False
NULL values are ingnored for all SQL: 2008 aggregate functions.
- True
- False
Which one is single-row function
- STDDEV
- VARIANCE
- ROUND
- COUNT
which of this Operator Precedence is correct??
- - , + (Unary operators, negation)
- * , / (Multiplication, division)
- +, - , || (Addition, subtraction, concatenation)
- NONE of these
Which of these is NOT a inequality symbol ??
- !=
- <>
- =^
- ^=
When you try to save 34567.2255 into a column defined as NUMBER(7,2) what value is actually saved?
- 34567.00
- 34567.22
- 34567.23
- 3456.22
What is the default display length of the DATE datatype column?
- 8
- 9
- 6
- 16