Skip to content
tezvyn:
Menu

Data Modeling

30 bites tagged Data Modeling: interview questions with model answers, and 60-second explainers.

Test yourself: Top 30 Data Modeling interview questions →Multiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.
Product Strategy1 min read

Designing a tiered entitlements backend

Plans map to features and limits, subscriptions link account to plan, an entitlement check enforces access; handle upgrade/downgrade with effective dates and proration.

Node.js & Express1 min read

Define a Mongoose schema and model

New mongoose.Schema with field options (type, required, default), then mongoose.model('Product', schema) to get a model.

Databases & Architecture1 min read

Modeling IoT data with tags and fields

Tags are indexed identifying metadata, fields are unindexed measured values, and tag cardinality drives memory.

Databases & Architecture1 min read

Sessionizing clickstream events into sessions

Order events per user, split on inactivity gap, assign session ids, pick event or session grain.

Databases & Architecture1 min read

Denormalization: trading write cost for read speed

Duplicate or precompute data to avoid joins, accept harder writes and consistency risk, justify by read-heavy access.

Databases & Architecture1 min read

When a graph database beats relational or document stores

Deeply connected data, variable-depth traversals, fraud or recommendation paths, index-free adjacency.

Databases & Architecture1 min read

Embed or reference likes in a document database?

Embedding is fast for small bounded lists but unbounded likes hit document size limits; referencing scales for high-cardinality, write-heavy likes.

Databases & Architecture1 min read

How do you choose between relational and NoSQL databases?

Relational gives schema, joins, and ACID for structured related data; document gives flexible schema and horizontal scale for varied or denormalized data.

Databases & Architecture1 min read

Adjacency List versus Nested Set for hierarchies

Adjacency list is simple writes but recursive reads; nested set is fast subtree reads but costly writes.

Databases & Architecture1 min read

Modeling one-to-many versus many-to-many relationships

One-to-many uses a foreign key on the many side; many-to-many needs a junction table with two foreign keys.

Databases & Architecture1 min read

Normalizing a flat orders table to 3NF

Split repeating data, remove partial dependencies, remove transitive dependencies, define keys.

Databases & Architecture1 min read

When to intentionally denormalize a schema

Identify read-heavy join cost, duplicate or precompute data, and own the consistency burden.

Content & Copywriting2 min read

Data model for an editorial calendar

A content entity with publish_date and a status enum, a foreign key to authors, indexes on date and status.

Cloud Platforms2 min read

Add a second access pattern to a key-value store

Add a global secondary index on EmailAddress, weighing extra storage, write amplification, and eventual consistency.

Analytics & Metrics1 min read

Define a consistent day across timezones

Store events in UTC, capture the local/source timezone, then convert to a single reporting timezone at query time.

Growth & Experimentation1 min read

Design an analytics event schema

Consistent object-action naming, snake_case, typed properties with units, and shared context like user, session, timestamp.

Growth & Experimentation2 min read

Design a referral feature's lifecycle and races

A referral entity with explicit states, a unique constraint on the invited user, and atomic transactions plus idempotency to prevent double credits.

Growth & Experimentation2 min read

How would you implement a last-touch attribution model for user signups?

Tests your ability to translate marketing concepts into warehouse SQL. A strong answer covers UTM/pageview events, sessionized tables, and a windowed join for the last touch within 30 days of signup.

Growth & Experimentation2 min read

Describe the SQL and data model for weekly cohort retention

Join users and activity, compute week offset per user, group by cohort and offset for retention.

Databases & Architecture2 min read

What is the difference between primary, foreign, and unique keys?

This tests relational integrity basics. Answer: primary keys identify rows, foreign keys reference tables, and unique keys are alternate candidates. Red flag: saying unique keys are just for indexing or omitting a non-PK example like email.

Content & Copywriting2 min read

How would you model cross-platform ad campaign data and adaptation logic?

Propose a canonical model, platform adapters mapping copy to each schema, and an async pipeline with validation.

Content & Copywriting2 min read

Design a content versioning system with history and revert

Versions table with article_id, version_num, content_snapshot, timestamp; APIs for createVersion, getHistory, restoreVersion.

Analytics & Metrics2 min read

What data do you need and what steps build a WAU dashboard?

Tests defining a metric, modeling events, and wiring them into a BI tool. A strong answer names the feature event, sets a rolling 7-day window, counts distinct users by period, and configures the BI layer. Red flag: jumping to charts before defining active.

Analytics & Metrics2 min read

How would you build a weekly active user dashboard?

This tests translating a business need into a technical spec. First, clarify the definition of "active." Then, identify the event data needed (user_id, timestamp). Finally, outline the ETL and BI tool steps. A red flag is not clarifying the metric first.

Get Data Modeling bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon