PostgreSQL, an advanced open-source relational database system, offers robust features for data management and application development. This guide explores its basics, benefits, installation, and architecture comprehensively.
MCQs on Introduction to PostgreSQL
1. What is PostgreSQL?
PostgreSQL is a:
A) NoSQL database
B) Relational database management system
C) Cloud computing service
D) Programming language
PostgreSQL is also known as:
A) MySQL
B) Postgres
C) SQL Pro
D) DB Lite
Which of the following best describes PostgreSQL?
A) Lightweight database for small applications
B) Fully-featured, enterprise-class database
C) A frontend development tool
D) A data visualization library
PostgreSQL is:
A) Open-source and free
B) Proprietary and licensed
C) Limited to Linux only
D) Used only for local databases
Which language is PostgreSQL primarily written in?
A) Python
B) C
C) Java
D) PHP
PostgreSQL supports:
A) Single-user access
B) Multi-version concurrency control (MVCC)
C) Only unstructured data
D) No security features
Which of these is NOT supported by PostgreSQL?
A) JSON/JSONB data types
B) Full-text search
C) Stored procedures
D) Web hosting services
2. Features and Benefits
PostgreSQL is highly scalable in terms of:
A) Database size
B) Number of concurrent users
C) Both A and B
D) Neither A nor B
Which feature makes PostgreSQL unique compared to many relational databases?
A) Lack of indexing
B) Support for advanced data types like JSON
C) Absence of stored procedures
D) Only horizontal scaling
PostgreSQL supports which indexing methods?
A) Hash indexing only
B) B-tree, GiST, and GIN indexing
C) Random indexing
D) Non-clustered indexing
PostgreSQL is known for its compliance with:
A) NoSQL standards
B) ACID properties
C) Third-party licensing requirements
D) GraphQL standards
Which of these is a PostgreSQL benefit?
A) Proprietary features
B) Extensive support for SQL and NoSQL data models
C) Lack of scalability
D) Limited platform support
Which feature in PostgreSQL supports high availability?
A) Transaction logs
B) Replication
C) Limited storage options
D) Static schema
PostgreSQL supports which kind of data replication?
A) Synchronous and asynchronous
B) Partial replication only
C) No replication options
D) Real-time only
What is a significant performance feature of PostgreSQL?
A) Limited query optimization
B) Advanced query planner and optimizer
C) High latency during writes
D) Lack of indexing support
PostgreSQL supports horizontal scaling through:
A) Sharding
B) Denormalization
C) Index locking
D) Manual backups
What is the key benefit of PostgreSQL’s MVCC feature?
A) Simplifies security
B) Improves data consistency and concurrency
C) Reduces storage needs
D) Limits data scalability
3. Installing PostgreSQL (Linux, Windows, macOS)
What package manager is commonly used to install PostgreSQL on Ubuntu?
A) pip
B) yum
C) apt
D) brew
Which tool is used to install PostgreSQL on Windows?
A) Visual Studio
B) pgAdmin
C) PostgreSQL installer
D) Command Prompt
PostgreSQL is pre-installed on which operating system?
A) macOS
B) Linux (some distributions)
C) Windows 10
D) None
The default port for PostgreSQL is:
A) 1433
B) 3306
C) 5432
D) 1521
On macOS, PostgreSQL can be installed using:
A) Homebrew
B) App Store
C) pgAdmin only
D) Apache HTTP server
Which command initializes a new PostgreSQL database cluster in Linux?
A) pg_init
B) initdb
C) createdb
D) startdb
After installation, the PostgreSQL service can be started using:
A) pgstart
B) service postgresql start
C) start postgres service
D) launch postgres
4. PostgreSQL Architecture
The main memory component of PostgreSQL is:
A) Shared Buffers
B) WAL
C) pg_hba.conf
D) Background writer
The Write-Ahead Logging (WAL) feature in PostgreSQL ensures:
A) High read speeds
B) Data integrity and crash recovery
C) Lower storage usage
D) Automatic backup generation
Which component in PostgreSQL manages database connections?
A) Postmaster
B) pgAdmin
C) SQL Shell
D) WAL Logger
What is a PostgreSQL “Tablespace”?
A) Memory location for temporary files
B) Disk location for storing database objects
C) Networking layer for queries
D) Cache for query plans
Which PostgreSQL process ensures that data changes are written to disk?
A) Autovacuum
B) Background Writer
C) Checkpointer
D) WAL Writer
The PostgreSQL architecture follows which type of model?
A) Client-server model
B) Peer-to-peer model
C) Decentralized model
D) Monolithic model
Answer Key
Qno
Answer (Option with Text)
1
B) Relational database management system
2
B) Postgres
3
B) Fully-featured, enterprise-class database
4
A) Open-source and free
5
B) C
6
B) Multi-version concurrency control (MVCC)
7
D) Web hosting services
8
C) Both A and B
9
B) Support for advanced data types like JSON
10
B) B-tree, GiST, and GIN indexing
11
B) ACID properties
12
B) Extensive support for SQL and NoSQL data models