SQL Pattern Matching
In SQL, which operator is used in conjunction with wildcards to perform pattern matching?
- A. EQUALS
- B. MATCHES
- C. LIKE
- D. COMPARE
- E. SIMILAR
Empty Table Creation
How can you create an empty table with the same structure as an existing table in SQL?
- A. CREATE TABLE new_table AS SELECT * FROM existing_table WHERE 1=1;
- B. CREATE TABLE new_table LIKE existing_table;
- C. SELECT * INTO new_table FROM existing_table WHERE 1=2;
- D. CREATE TABLE new_table AS existing_table WHERE 1=2;
- E. COPY TABLE new_table FROM existing_table WHERE 1=0;
Recursive Stored Procedure
What is a stored procedure that calls itself called?
- A. Looping Procedure
- B. Iterative Procedure
- C. Self-Invoking Procedure
- D. Recursive Stored Procedure
- E. Nested procedure
Stored Procedure Definition
What is a stored procedure?
- A. A function available to applications that accesses file storage.
- B. A subroutine available to applications that access a relational database management system.
- C. A trigger that automatically executes after data modification.
- D. A view that simplifies complex queries.
- E. A table containing pre-calculated results.
Collation Sensitivity Types
Which of the following is a type of collation sensitivity?
- A. Volume sensitivity
- B. Character sensitivity
- C. Kana sensitivity
- D. Code sensitivity
- E. Number sensitivity
OLTP vs OLAP
Which type of system is primarily designed for a large audience of end-users who conduct short transactions?
- A. OLAP
- B. OLTP
- C. Both OLTP and OLAP
- D. Neither OLTP nor OLAP
- E. Middleware
OLTP Definition
What does OLTP stand for?
- A. Online Transaction Protocol
- B. Online Transaction Processing
- C. Offline Transaction Protocol
- D. Offline Transaction Processing
- E. Online Transfer Protocol
User-Defined Functions in SQL
What are the two main types of SQL user-defined functions?
- A. Void Function and Return Function
- B. Scalar Function and Table-Valued Functions
- C. Internal Function and External Function
- D. System Function and Custom Function
- E. Query and Trigger
UNIQUE Constraint
What does a UNIQUE constraint ensure in a SQL table?
- A. That all values in a column are the same.
- B. That all values in a column are different.
- C. That the column is a primary key.
- D. That the column cannot be NULL.
- E. That the column is indexed.
Query Definition
What is a query in the context of databases?
- A. A backup of the database
- B. A way to define data types.
- C. A request for data or information from a database table.
- D. A stored procedure.
- E. A user interface for database administration.
Clustered vs Non-Clustered Index
How many clustered indexes can a table have in SQL?
- A. Zero
- B. One
- C. Two
- D. Unlimited
- E. It depends on the size of the table
SQL Joins
Which type of JOIN returns all records from the right table and the matched records from the left table?
- A. INNER JOIN
- B. LEFT JOIN
- C. RIGHT JOIN
- D. FULL JOIN
- E. CROSS JOIN
Foreign Key Purpose
What type of integrity constraint does a foreign key ensure?
- A. Data type integrity
- B. Referential integrity
- C. Primary key integrity
- D. Columnar integrity
- E. Logical integrity
RDBMS Definition
What does RDBMS stand for?
- A. Relational Database Management Solution
- B. Relational Database Management System
- C. Reliable Database Management System
- D. Robust Database Management System
- E. Responsive Database Management System
ACID Compliance
Is PostgreSQL compliant with ACID properties?
- A. Yes
- B. No
- C. Partially
- D. Only for specific configurations
- E. Only for certain data types