SQL u0026 PostgreSQL Interview Prep Quiz Quiz

  1. SQL Pattern Matching

    In SQL, which operator is used in conjunction with wildcards to perform pattern matching?

    1. A. EQUALS
    2. B. MATCHES
    3. C. LIKE
    4. D. COMPARE
    5. E. SIMILAR
  2. Empty Table Creation

    How can you create an empty table with the same structure as an existing table in SQL?

    1. A. CREATE TABLE new_table AS SELECT * FROM existing_table WHERE 1=1;
    2. B. CREATE TABLE new_table LIKE existing_table;
    3. C. SELECT * INTO new_table FROM existing_table WHERE 1=2;
    4. D. CREATE TABLE new_table AS existing_table WHERE 1=2;
    5. E. COPY TABLE new_table FROM existing_table WHERE 1=0;
  3. Recursive Stored Procedure

    What is a stored procedure that calls itself called?

    1. A. Looping Procedure
    2. B. Iterative Procedure
    3. C. Self-Invoking Procedure
    4. D. Recursive Stored Procedure
    5. E. Nested procedure
  4. Stored Procedure Definition

    What is a stored procedure?

    1. A. A function available to applications that accesses file storage.
    2. B. A subroutine available to applications that access a relational database management system.
    3. C. A trigger that automatically executes after data modification.
    4. D. A view that simplifies complex queries.
    5. E. A table containing pre-calculated results.
  5. Collation Sensitivity Types

    Which of the following is a type of collation sensitivity?

    1. A. Volume sensitivity
    2. B. Character sensitivity
    3. C. Kana sensitivity
    4. D. Code sensitivity
    5. E. Number sensitivity
  6. OLTP vs OLAP

    Which type of system is primarily designed for a large audience of end-users who conduct short transactions?

    1. A. OLAP
    2. B. OLTP
    3. C. Both OLTP and OLAP
    4. D. Neither OLTP nor OLAP
    5. E. Middleware
  7. OLTP Definition

    What does OLTP stand for?

    1. A. Online Transaction Protocol
    2. B. Online Transaction Processing
    3. C. Offline Transaction Protocol
    4. D. Offline Transaction Processing
    5. E. Online Transfer Protocol
  8. User-Defined Functions in SQL

    What are the two main types of SQL user-defined functions?

    1. A. Void Function and Return Function
    2. B. Scalar Function and Table-Valued Functions
    3. C. Internal Function and External Function
    4. D. System Function and Custom Function
    5. E. Query and Trigger
  9. UNIQUE Constraint

    What does a UNIQUE constraint ensure in a SQL table?

    1. A. That all values in a column are the same.
    2. B. That all values in a column are different.
    3. C. That the column is a primary key.
    4. D. That the column cannot be NULL.
    5. E. That the column is indexed.
  10. Query Definition

    What is a query in the context of databases?

    1. A. A backup of the database
    2. B. A way to define data types.
    3. C. A request for data or information from a database table.
    4. D. A stored procedure.
    5. E. A user interface for database administration.
  11. Clustered vs Non-Clustered Index

    How many clustered indexes can a table have in SQL?

    1. A. Zero
    2. B. One
    3. C. Two
    4. D. Unlimited
    5. E. It depends on the size of the table
  12. SQL Joins

    Which type of JOIN returns all records from the right table and the matched records from the left table?

    1. A. INNER JOIN
    2. B. LEFT JOIN
    3. C. RIGHT JOIN
    4. D. FULL JOIN
    5. E. CROSS JOIN
  13. Foreign Key Purpose

    What type of integrity constraint does a foreign key ensure?

    1. A. Data type integrity
    2. B. Referential integrity
    3. C. Primary key integrity
    4. D. Columnar integrity
    5. E. Logical integrity
  14. RDBMS Definition

    What does RDBMS stand for?

    1. A. Relational Database Management Solution
    2. B. Relational Database Management System
    3. C. Reliable Database Management System
    4. D. Robust Database Management System
    5. E. Responsive Database Management System
  15. ACID Compliance

    Is PostgreSQL compliant with ACID properties?

    1. A. Yes
    2. B. No
    3. C. Partially
    4. D. Only for specific configurations
    5. E. Only for certain data types