InterviewTreedInterviewTreed

The question library

Technical interview questions and answers

Explore practical questions, clear explanations, and code examples across developer technologies.

Showing 3241–3252 of 3610 questions

SQL & Database DesignIntermediate1 min read

How do you choose a primary key?

Choose a key that is unique, non-null, stable, and practical for references. Compare natural and surrogate candidates based on business semantics, size, an

SQL & Database DesignIntermediate1 min read

How do you model soft deletes?

A soft delete marks a row as inactive or deleted rather than physically removing it. Queries must consistently filter deleted rows, and uniqueness rules ne

SQL & Database DesignIntermediate1 min read

What is a temporal table?

A temporal table stores row history over time in supported database engines, allowing queries of past versions. Implementations and syntax differ by engine

SQL & Database DesignIntermediate1 min read

What is a slowly changing dimension?

In data warehousing, a slowly changing dimension (SCD) strategy manages attribute changes over time. Type 1 overwrites; Type 2 adds a new version row with

SQL & Database DesignIntermediate1 min read

What is a star schema?

A star schema has a central fact table connected to denormalized dimension tables. It is common in analytical warehouses for understandable, performant rep

SQL & Database DesignIntermediate1 min read

What is the grain of a fact table?

Grain states exactly what one row represents, such as one product per order line or one daily total per store. Keys and measures should align with that gra

SQL & Database DesignIntermediate1 min read

What is OLTP versus OLAP?

OLTP systems support frequent transactional reads and writes with integrity constraints. OLAP systems support analytical queries over large volumes, often