Database
113 bites tagged Database — interview questions with model answers, and 60-second explainers.
Managed Time Series Databases (TSDB)
A managed time series database is a hosted service optimized for data with a timestamp. It's used for application monitoring, IoT sensor data, and financial analytics. The main footgun is using a general-purpose database, which fails at high-volume writes.
Managed Graph Databases: When Relationships Are the Data
A managed graph database models data as nodes and edges, making relationship-heavy queries fast. Use it for social networks, fraud detection, or recommendations.
Serverless Databases: Pay for Use, Not for Idle
A serverless database automatically scales compute and storage based on demand, from zero to massive, without you managing any servers. Use it for spiky, unpredictable workloads to avoid paying for idle capacity.
Managed Document Databases: Your Data, Their Ops
A managed document database is like a fully-staffed warehouse for your data. You store JSON-like objects, and the provider handles security, maintenance, and scaling. It's the default for cloud apps, but the convenience isn't free—watch for surprise bills.
Managed Key-Value Databases: Scaling Without Server Chores
A managed key-value database is like an outsourced dictionary. You give it a key, it returns a value, and the cloud provider handles all scaling and server management. It's used for session stores or user profiles where you need fast lookups by a known ID.
Database Multi-AZ: High Availability vs. Read Scaling
Multi-AZ deployment is like a hot spare database in another datacenter for automatic failover. It's for critical systems where downtime is costly. The footgun is assuming all standbys serve reads; only the 'cluster' type does, not the 'instance' type.
Managed Database Backups: Your Cloud's Undo Button
Think of managed backups as your cloud provider's automated safety net for your database. It periodically saves snapshots, letting you restore to a point in time after a failure.
Securing Cloud Database Endpoints
Treat your database endpoint like a public API, even if it's "internal." A Zero Trust approach verifies every connection request, granting access based on identity and context, not network location. This prevents unauthorized data access, a top cloud threat.
Room: Querying Relational Data Without Manual Joins
Room lets you query related objects without writing raw SQL joins, mapping one-to-many or many-to-many relationships into nested objects. This is key for fetching a user and their posts in one go.
Room Database Migrations: Evolving Your Schema Safely
A Room migration is a renovation plan for your database. When you change your schema, you provide SQL instructions to upgrade existing user data without loss, preventing crashes on app updates. The footgun is forgetting to increment the database version.
Room Type Converters: Teach Your Database New Tricks
Room Type Converters are translators for your database, teaching it to store types it doesn't natively understand, like `Date`. They let you persist simple objects by converting them to primitives like `Long`. The footgun is faking object relations with them.
Room Database: SQL Made Simple on Android
Room is an abstraction layer over SQLite that lets you work with Kotlin/Java objects, not raw SQL. It's the standard for local data persistence in Android, like caching network data.
Room DAO: Your App's Type-Safe SQL Interface
A Room DAO is an interface that translates your method calls into SQL queries. It's how your Android app's code talks to its local database without writing boilerplate. The footgun is putting business logic in a DAO; it should only access data.
Room Entity: Your Database Table as a Kotlin Class
A Room Entity is a data class that maps to a database table; each object is a row, each property a column. Use it to define your local SQLite schema in Android. The footgun: forgetting the `@PrimaryKey` annotation, which is required for Room to manage.
Data Masking: Protect Data, Preserve Utility
Data masking creates a realistic but fake version of your data by scrambling sensitive fields. It's used to give developers and analysts safe datasets for testing or analytics without exposing real PII.
Snowflake Schema: Trading Query Speed for Storage
A snowflake schema saves storage by normalizing a star schema's dimensions into smaller, related tables. It's used in data warehouses to reduce redundancy, but the extra joins required can slow down queries, making it a trade-off against a simpler star schema.
Vector Databases: Searching by Meaning, Not Matches
A vector database organizes data by meaning, not just exact values. Instead of finding a record by its ID, you find it by its similarity to a query. This powers AI features like Retrieval-Augmented Generation (RAG), where an LLM finds relevant documents, and recommendation engines. The main footgun is that it finds *approximate* matches, trading perfect accuracy for speed and the ability to search unstructured data.
Get Database bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
Open testing — you’ll join as an early tester.