PostgreSQL Interview Questions and Answers
Freshers / Beginner level questions & answers
Ques 1. Explain the concept of ACID properties in the context of databases.
ACID stands for Atomicity, Consistency, Isolation, and Durability, ensuring the reliability of database transactions.
Ques 2. What is the purpose of the WHERE clause in a PostgreSQL query?
The WHERE clause filters records based on a specified condition, allowing selective data retrieval.
Ques 3. What is a foreign key, and how does it enforce referential integrity?
A foreign key is a field that refers to the primary key in another table. It enforces referential integrity by ensuring that values in the foreign key match values in the referenced table's primary key.
Ques 4. Explain the purpose of the SERIAL data type in PostgreSQL.
SERIAL is an auto-incrementing integer data type often used for creating unique identifiers in a column. It is commonly used for primary key columns.
Ques 5. What is the purpose of the pg_ctl utility in PostgreSQL?
The pg_ctl utility is used to start, stop, and control the PostgreSQL server, providing a convenient way to manage server processes.
Ques 6. What is the purpose of the pg_dumpall utility in PostgreSQL?
The pg_dumpall utility is used to create a SQL script that can reconstruct an entire PostgreSQL database cluster, including all databases, users, and privileges.
Most helpful rated by users: