CompTIA DataSys+ (DS0-002) Practice Questions

CompTIA DataSys+ (DS0-002 V2) exam preparation

CompTIA DataSys+ (DS0-002) practice questions in English: 180 questions with explanations. The mock exam has 90 questions and 90 minutes.

CompTIA DataSys+ (DS0-002) free question 3 / 10 · Domain 2: Database Deployment

A DBA creates dozens of tenant databases with CREATE DATABASE and wants them to start from a prepared baseline. What do the template databases created by initdb provide?

  1. Backup copies that the server restores when a tenant database fails
  2. Replica databases that the server keeps current with the tenant databases
  3. Log databases that record the changes made in the tenant databases
  4. Source databases that CREATE DATABASE copies as a starting point
Show the answer and explanation

Answer: D

Why this is correct
The initdb page lists template1 and template0 among the databases created with a new cluster and says they are meant as source databases to be copied by later CREATE DATABASE commands. The postgres database is a default database for users, utilities and third-party applications. A prepared baseline therefore lives in template1, and new databases start as copies of it. The source reads: "template1 and template0 are meant as source databases to be copied by later CREATE DATABASE commands." Source page: initdb, section "Description".

Why the other options are wrong
"Backup copies that the server restores when a tenant database fails" … The templates are source databases for new databases. They are not backups of existing ones.
"Replica databases that the server keeps current with the tenant databases" … A template is copied when a database is created. It is not kept in step with the databases made from it.
"Log databases that record the changes made in the tenant databases" … Change records are kept in the write-ahead log. The templates are starting points for new databases.

Key points
New databases are created by copying a template database.

Go to the CompTIA DataSys+ (DS0-002) practice app (10 free questions; purchase unlocks all questions)

See the full practice set