
Answer-first summary for fast verification
Answer: Type 3 SCD – Changes are tracked using column addition. A new column is added for the current value while the original value is retained.
Type 3 SCD is the correct choice because it allows for tracking changes by adding a new column for the current value while retaining the original value in another column. This method does not increase the number of rows in the table, fulfilling the requirement to store both the last and current salary of employees without adding more rows. Type 1 SCD overwrites the old record, Type 2 SCD appends a new record and marks the old one as not-active, and neither Type 0 nor Type 4 SCD are relevant to this scenario.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
An organization stores employee salaries in the emp_sal delta table. The requirement is to keep track of both the last and current salary of all employees without increasing the number of rows in the table. Which type of table should be selected to meet this requirement?
A
Type 1 SCD – The old record is overwritten by the new record.
B
Type 3 SCD – Changes are tracked using column addition. A new column is added for the current value while the original value is retained.
C
Type 0 SCD
D
Type 2 SCD – The new record is appended to the table whereas the old record is set to not-active either by using the end_date or active column.
E
Type 4 SCD
No comments yet.