These PostgreSQL multiple-choice questions and their answers will help you strengthen your grip on the subject of PostgreSQL. You can prepare for an upcoming exam or job interview with these PostgreSQL MCQs.
So scroll down and start answering.
A. True
B. FALSE
A. The value is not relevant for this particular row.
B. The value is undetermined
C. The value is undetermined at this time
D. All of these
A. False
B. True
A. Workstation
B. Thin Client
C. Interface
D. Client
A. newdb
B. add_DB
C. NEW_DB
D. createdb
A. SELECT FROM
B. \dt
C. \i<filename>
D. ORDER BY
A. An open-source ORDBMS developed at UC Berkley, which supports many modern features.
B. Enterprise-class proprietary software developed at Bell Labs, with a basic set of features.
C. A NoSQL solution.
D. An open-source SMTP server.
A. an XML database management system.
B. a network-type database management system.
C. a hierarchical database management system.
D. a relational database management system.
A. SQL Sub-selects
B. All of the above
C. Views
D. Complex SQL queries
A. from the source code
B. from Linux binaries
C. on a Windows computer via the PostgreSQL installer
D. All of these
A. Windows only
B. all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows.
C. on all UNIX versions except Solaris.
D. Linux and Windows only.
A. Use function calls (APIs) to prepare and execute SQL statements, scan result sets, and perform updates from a large variety of different programming languages.
B. Embed SQL directly into your application
C. Use a command-line application to execute SQL statements
D. All of these
A. All of the above
B. DELETE statements
C. INSERT statements
D. UPDATE statements
A. UPDATE
B. ADD
C. SELECT
D. INSERT
A. VALUES
B. INSERT INTO
C. SELECT
D. GROUP BY
A. Write
B. Send
C. Execute
D. Insert
A. Schema
B. View
C. Diagram
D. Trigger
A. Commit
B. Send
C. Apply
D. Execute
A. IN
B. DISTINCT
C. LIKE
D. BETWEEN
A. table management
B. Views
C. temporary tables
D. Foreign Key Constraints
A. The purpose of a particular database.
B. A cluster's purpose.
C. A server's purpose within a cluster.
D. A template for authorization to various database objects.
A. \do
B. \h
C. \dT
D. \dt
A. True - This was addressed in version 9.0
B. False - This was addressed in version 9.0
A. Write Anywhere List
B. Write Anywhere Logging
C. Write Ahead Log
D. Write Ahead List
A. Two users try to access the same table at the same time.
B. Two users are connected to the same database at the same time.
C. Data is being written to the same cell by separate processes at the same time.
D. Two transactions hold exclusive locks on resources they both need.
A. False
B. True
A. Allow an administrator to designate specific locations in a file system where database objects can be stored.
B. Are a fancy name for table.
C. Are the width, or number of columns, of a particular table.
D. Are the amount of disk space a table is using.
A. in ascending order
B. in a random order
C. grouped together by field type
D. in descending order
A. True
B. False
A. right outer
B. left outer
C. union
D. self
A. False
B. True
A. False
B. True
A. VB and VB.NET interfaces
B. The C and embedded C interfaces
C. Ruby and PHP interfaces
D. C++ and Java interfaces
A. All of these
B. To recover or reuse disk space occupied by updated or deleted rows.
C. To update data statistics used by the PostgreSQL query planner.
D. To protect against loss of very old data due to transaction ID wraparound.
A. False
B. True
A. Optional
B. Text
C. Required
D. Integers
A. psql> describe table_name
B. psql> \D table_name
C. psql> DESCRIBE table_name
D. psql> \d table_name
A. debug_print_parse
B. All of these
C. debug_print_rewritten
D. debug_print_plan
A. Backslash character (\)
B. Dollar sign ($)
C. Question mark (?)
D. Forwardslash character (/)
A. the special CREATETBL privilege
B. have a script do it.
C. be a superuser.
D. be an admin
A. Nothing, it's invalid SQL
B. Creates a non-write-locking index
C. Modifies an index in place to be lowercase
D. Creates a new index with a special operator class 'lower' for case insensitive comparisons.
E. Creates an index for efficient case-insensitive searches on the titles column within the books table
A. \ed
B. edit sql #go
C. \edit
D. \e
A. 4 billion transactions
B. 3 billion transactions
C. 2 billion transactions
D. 5 billion transactions
A. May cause recent transactions to be lost
B. None of these
C. All of these
D. Allow transactions to complete more quickly
A. Takes the output of the parser, one query tree, and the user-defined rewrite rules, which are also query trees with some extra information, and creates zero or more query trees as result.
B. Operates between the parser and the planner.
C. None of these
D. All of these
A. False
B. True
A. \start time
B. \timing
C. \on timing
D. \time start
A. A client is connected, and the server is awaiting input.
B. The server is idle, awaiting a client connection.
C. A transaction is possibly hung.
D. A user issued an IDLE statement to the database.
A. max_connections
B. None of these
C. max_locks_per_transaction
D. All of these
A. Collations
B. Index
C. Data Types
D. Database