Temporal Table with Anonymous History Table - DP-203 Exam

Temporal Table with Anonymous History Table - DP-203 Exam

Question

You need to create a quick object in a test environment and therefore you decide to create a temporal table with an "anonymous" history table.

From the given below statement/remarks about the history table in this context, choose the statement(s) that is/are true.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Correct Answers: B and D

An anonymous history table is automatically built in the same schema as the temporal or current table.

The history table is built as a rowstore table.

If possible, page compression is applied on the history table otherwise the table remains uncompressed.

For example, few table configurations, like SPARSE columns, don't allow compression.

Option A is incorrect.

An anonymous history table is automatically built in the same schema as the temporal or current table.

Option B is correct.

It is true that the history table is built as a rowstore table.

Option C is incorrect.

The history table is created as a rowstore table, not columnstore table.

Option D is correct.

A default clustered index is developed for the history table with an auto-generated name with the format IX_<history_table_name>

This index has the PERIOD columns (end, start).

Option E is incorrect.It is not true that the history table always remains uncompressed.

If possible, page compression is applied on the history table otherwise the table remains uncompressed.

For example, few table configurations, like SPARSE columns, don't allow compression.

To know more about creating a system-versioned temporal table, please visit the below-given link:

In this context, you are trying to create a temporal table with an "anonymous" history table. A temporal table is a table that contains both the current data and the historical data, which is stored in a separate table known as the history table. The history table tracks the changes made to the rows in the temporal table over time, providing a complete history of all changes.

Now, let's examine each statement given in the answer options to determine which ones are true:

A. You need to manually create the anonymous history table and provide its specific schema. This statement is true. When creating a temporal table with an "anonymous" history table, you need to manually create the history table and specify its schema. This is different from creating a regular temporal table with a named history table, where the history table is automatically created based on the same schema as the temporal table.

B. The history table is created as a rowstore table. This statement is not necessarily true. The history table can be created as either a rowstore or a columnstore table, depending on the needs of the application. However, if the history table is created as a columnstore table, it must be uncompressed.

C. The history table is created as a columnstore table. This statement is partially true. As mentioned above, the history table can be created as either a rowstore or a columnstore table. However, if it is created as a columnstore table, it must be uncompressed.

D. A default clustered index is developed for the history table. This statement is not true. Unlike regular tables, history tables do not have a default clustered index. If you want to create a clustered index on a history table, you need to do so manually.

E. A history table is always uncompressed. No compression is ever applied on the history table. This statement is partially true. If the history table is created as a columnstore table, it must be uncompressed. However, if it is created as a rowstore table, compression can be applied.

In summary, the correct statements are:

  • You need to manually create the anonymous history table and provide its specific schema.
  • If the history table is created as a columnstore table, it must be uncompressed.