In SCD type 2, what do we do?
1Times asked
Jul 2026Last seen
Jul 2026First seen
💡 Model Answer
In SCD type 2, we maintain a full history of changes to dimension attributes. When a new record arrives that differs from the current dimension values, we first mark the existing row as inactive by setting an end date or a flag. Then we insert a new row with the updated values, a start date, and an active flag. This approach allows us to track how dimension attributes evolve over time and to answer queries such as "What was the product price on a specific date?".
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500