Sample Exam Questions

From the objective of OSS-DB Exam Silver
- Operation management - Installation method

Sample Question

1.58

From the descriptions below about database templates, choose one that is incorrect.

  1. Immediately after executing the initdb command, the database cluster will have two template databases, template0 and template1.

  2. When you run the createdb command, by default, a copy of template1 is created.

  3. When a template database is newly added to the database cluster, its name will automatically be a combination of template and number, such as template2, template3.
  4. The contents of the postgres database immediately after executing the initdb command are the same as the template database template1.

  5. The template database template0 should not be updated.

※This sample exam is different from those that appear in the actual OSS-DB Exam.
2019/05/30

Answer and Explanation

The initdb command creates a new database cluster, which contains two template databases, template0, template1 and a regular database named postgres.

When creating a new database with the createdb command or the CREATE DATABASE statement, internally a copy of the template database is created. The database to be used as a template can be specified as an option, but template1 is used by default.

Since the postgres database just after executing the initdb command is a copy of template1, these contents are the same.

template0 consists only of objects defined by the system as standard and can not be updated.

Template database other than template0 can be updated, it can be created with CREATE DATABASE or deleted with DROP DATABASE. You can affix the database name freely.

 

Since it is a matter of choosing what is wrong, the correct answer is C.