Join
A query that combines rows from two or more tables using a column they share.
Example
Join orders with users on user_id to show "Ana bought 3 books" in a single query.
Test yourself: Join
SQL databases
Changing the ___ of a big SQL database is hard and slow.
Adding 1 column to 1 billion rows can take hours: every row must be touched.
0/1
â–¶ PlayLessons that use it
Public and private IP
One IP outside, many inside
Static and dynamic IP
Does it change or not?
RAID
Many disks, one team
Storage types
Where data lives
Dynamic lists
An array that grows by itself
Queues
First in, first out
Deques
In and out at both ends
Hash collisions
When 2 keys want the same spot
Walking a tree
By levels or by branches
Graphs
Points and connections
Quick sort
A pivot and 2 sides
Merge sort
Split in half and merge in order
Bucket sort
Split into buckets and sort each one
Divide and conquer
Split, solve and combine
SQL databases
Tables that relate
SQL or NoSQL
Picking the right database
Measure and optimize
Measure first
Normalize and denormalize
Each piece of data in one place
Sharding
Splitting the database into pieces
Consistent hashing
A ring to split the load
Database federation
Several databases that look like one
Publish-subscribe
1 message, many listeners
Event-driven architecture
Announcing what happened
CQRS
Write on one side, read on the other
The design steps
From data to bottlenecks
Designing WhatsApp
2 billion messages a day
