No SQL Modelling Flashcards

(4 cards)

1
Q

What is Query Driven Modelling

A

You design your data schema starting from the exact queries you need to run — not from entities or relationships.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Traditional (Entity-driven) modelling

A

You start with Entities and Relationships and then you write queries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Query-driven modelling

A

You start with questions, not tables.
Get all orders for a customer in last 30 days”
“Get all orders for a restaurant today”
“Get delivery updates for an order”
Create one table per query
OrdersByCustomer(customer_id, order_time) → order_data
OrdersByRestaurant(restaurant_id, order_time) → order_data
DeliveryUpdatesByOrder(order_id, update_time) → status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When to use

A

Queries are known and stable
Reads must be very fast
Write amplification is acceptable - Same data written to multiple tables.
Scale > flexibility

How well did you know this?
1
Not at all
2
3
4
5
Perfectly