What is a database in PostgreSQL?

Why Interviewers Ask This

This question tests conceptual clarity. Interviewers want to hear a precise, confident definition before moving to more complex PostgreSQL topics. It also reveals how well you can explain technical ideas to non-experts.

Answer

In PostgreSQL, a database is an isolated namespace that contains schemas, tables, views, functions, sequences, and other objects. A single PostgreSQL server instance (cluster) can host multiple databases. Each database is completely isolated — you cannot directly join tables from different databases. Databases are created with CREATE DATABASE dbname; and listed with \l in psql or SELECT datname FROM pg_database;. The default databases created during installation are postgres (admin default), template0 (pristine template), and template1 (customizable template used when creating new databases).

Common Mistake

Candidates often give textbook answers here. Interviewers are more impressed when you relate the concept to a specific problem you solved in a real PostgreSQL project.