PostgreSQL Database Quiz Questions

Course Name:PostgreSQL
Chapter Name:Chapter 2 - Introduction to Software Applications
Lesson Content Link:Database Platforms
Current Quiz Count:30
Progress
0%
Q1
True / False

PostgreSQL is an open-source relational database management system (RDBMS).

Q2
True / False

In PostgreSQL, databases are not case-sensitive by default.

Q3
True / False

PostgreSQL does not support JSON data types.

Q4
True / False

In PostgreSQL, the VACUUM command is used to reclaim storage and optimize database performance

Q5
True / False

PostgreSQL supports full-text search capabilities natively.

Q6
True / False

In PostgreSQL, the SERIAL data type automatically generates unique integer values.

Q7
True / False

PostgreSQL supports multi-version concurrency control (MVCC) to handle concurrent transactions.

Q8
True / False

In PostgreSQL, a foreign data wrapper (FDW) is used to query external data sources as if they were regular PostgreSQL tables.

Q9
True / False

PostgreSQL's pg_dump utility can only be used to back up entire databases, not specific tables.

Q10
True / False

In PostgreSQL, the RECURSIVE keyword is used in a WITH clause to create recursive Common Table Expressions (CTEs).

Q11
Single Choice

Which MySQL command is used to check the current database platform version?

Q12
Single Choice

Which of the following platforms is MySQL primarily used on?

Q13
Single Choice

What MySQL command can be used to show all available databases in the current platform?

Q14
Single Choice

How do you connect to a MySQL database on a remote platform using the MySQL command-line client?

Q15
Single Choice

Which storage engine in MySQL is best suited for transactional databases on enterprise platforms?

Q16
Single Choice

Given the SQL code below, what will be the output if the MySQL platform is configured to allow multiple database connections?

SQL Code
SELECT @@max_connections;
Q17
Single Choice

Which MySQL feature allows data to be distributed across multiple platforms for better performance and reliability?

Q18
Single Choice

Consider the following SQL code. What platform-related MySQL feature is being configured?

SQL Code
SET GLOBAL innodb_buffer_pool_size = 8G;
Q19
Single Choice

On a MySQL platform configured with multiple databases, how can a specific platform’s schema be exported using a command-line tool?

Q20
Single Choice

Which MySQL platform feature can be configured for automated database failover and recovery across different geographical regions?

Q21
Multiple Choice

Which of the following SQL commands correctly creates a database in PostgreSQL, a key component of a database platform?

SQL Code
CREATE DATABASE app_db
WITH OWNER = app_owner
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
TEMPLATE = template0;
Q22
Multiple Choice

Which SQL statement in PostgreSQL is used to create a role for managing access to the database platform?

SQL Code
CREATE ROLE app_admin
WITH LOGIN PASSWORD 'secure_password'
CREATEDB CREATEROLE;
Q23
Multiple Choice

Identify the SQL query that grants specific privileges to a role on a PostgreSQL database platform.

SQL Code
GRANT SELECT, INSERT, UPDATE
ON ALL TABLES IN SCHEMA public
TO app_user;
Q24
Multiple Choice

Which SQL command in PostgreSQL is correctly used to create a schema as part of organizing the database platform?

SQL Code
CREATE SCHEMA app_data
AUTHORIZATION app_owner;
Q25
Multiple Choice

Select the correct SQL statement that transfers ownership of a PostgreSQL table to another role within the database platform.

SQL Code
ALTER TABLE public.users
OWNER TO app_admin;
Q26
Multiple Choice

Identify the correct SQL command that creates a composite index on multiple columns within a table on a PostgreSQL database platform.

SQL Code
CREATE INDEX idx_user_order
ON orders (user_id, order_date);
Q27
Multiple Choice

Which SQL command correctly configures replication settings for a PostgreSQL database platform?

SQL Code
ALTER SYSTEM SET wal_level = replica;
ALTER SYSTEM SET max_wal_senders = 10;
SELECT pg_reload_conf();
Q28
Multiple Choice

Choose the correct SQL query that sets up a foreign data wrapper in PostgreSQL to interact with an external database platform.

SQL Code
CREATE EXTENSION postgres_fdw;
CREATE SERVER foreign_server
FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'foreign_host', dbname 'foreign_db', port '5432');
Q29
Multiple Choice

Which SQL command in PostgreSQL sets up a publication for logical replication on a database platform?

SQL Code
CREATE PUBLICATION app_pub
FOR TABLE users, orders;
Q30
Multiple Choice

Identify the SQL command that correctly configures a PostgreSQL server for connection pooling, an essential feature for database platforms.

SQL Code
ALTER SYSTEM SET max_connections = 100;
ALTER SYSTEM SET shared_buffers = '128MB';
SELECT pg_reload_conf();