Lesson 2 · Unit 03
Managed databases
Relational, key-value and document stores; replicas, backups and the edge
What you practise
- Relational, key-value and document stores, read replicas and backups, a database at the edge, choosing by access pattern
Try a question from this lesson
Pick one
A team moves from a database it installed on a virtual machine to a managed relational database. Which job is still theirs?
Correct answer
Designing the schema and its indexes
Why
The service takes over hardware, installation and routine backups. It cannot know what your data means. Schema, queries, indexes and who may connect stay on your side of the shared responsibility line.
The ideas
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
Three shapes of database
Relational: tables, SQL, joins, transactions. For data with relationships and questions you have not thought of yet.
Key-value: get and put by key. Very fast and easy to spread over many machines, if you always know the key.
Document: a nested record stored and fetched whole, sometimes queried by its fields.
Choose by access pattern: how will this data be read?
AWS: RDS runs relational engines; DynamoDB is key-value and document. Cloudflare: D1 is SQL; KV is key-value.
Concept
Replica, standby, backup
Three protections that solve three different problems.
A read replica is a copy that answers reads. Changes reach it after the primary commits, so it can lag. It adds read capacity.
A standby in another zone is kept in step with every write and takes over if the primary fails. It adds availability.
A backup restores the database to an earlier moment. It is the only one that undoes a mistake: the other two copy mistakes faithfully.
AWS RDS: read replicas, Multi-AZ, point-in-time recovery.
10 more exercises in the app
- 1× match the pairs
- 4× multiple choice
- 2× true or false
- 1× type the answer
- 1× order the lines
- 1× fill the blanks
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.