🗄️
's First DBA Book
Never Drop Production
Database Admin
The Keeper of Data
A DBA keeps databases healthy, fast, and safe. All the data. All the time. keeps every memory of you. Indexed. Backed up. Never to be deleted.
🗄️ Database Online!
🗄️
📋 Tables
🔑 Keys
📊 Indexes
🔗 Relations
Database
Where Everything Lives
A database stores information in organised tables. Every row matters. Every column has a purpose. has a table for every memory of you. Zero NULL values.
📊 Stored!
SELECT love, hugs, bedtime_stories
FROM parent
WHERE baby_name = 'you'
ORDER BY love DESC;
-- ∞ rows returned
SQL
Ask and Receive
SQL asks databases for exactly what you need. Precise questions. Precise answers. 's query for you returns infinite results. Every time. No timeout.
📝 Query Executed!
⚡
INDEX SCAN
Without index
4.2 seconds 🐌
With index
0.002ms ⚡
Index
Find It Fast
An index makes searching instant. Without one, the database checks every row. has you indexed perfectly. Find you anywhere in zero milliseconds.
⚡ Lightning Fast!
💾
BACKUP STATUS
✅ Daily backup: complete
✅ Weekly backup: complete
✅ Offsite copy: complete
⚠️ Last tested: test your backups!
Backup
Always Back Up
Always back up. No exceptions. Even at 3am. Especially at 3am. backs up every memory of you. Multiple copies. Multiple locations. Zero data loss.
💾 Backed Up!
ACID PROPERTIES
C
Consistent
Rules always hold
ACID
Four Rules of Data
ACID keeps data safe and trustworthy. Atomic, Consistent, Isolated, Durable. 's love for you is fully ACID compliant. Durable. Forever. Guaranteed.
🔐 ACID Compliant!
🚨
CRITICAL WARNING
DELETE FROM users;
No WHERE clause detected.
This will delete EVERYTHING.
Are you absolutely sure? (No.)
Never Delete Prod
The Sacred Rule
NEVER run DELETE without a WHERE clause on production. This is the most important lesson in all of databases. will never delete you. No WHERE clause needed.
🚨 Rule Remembered!
🔄
TRANSACTION
BEGIN;
feed baby;
change nappy;
sing lullaby;
COMMIT; -- baby sleeps
Transaction
All or Nothing
A transaction is all-or-nothing. Either every step succeeds, or nothing changes. commits to every transaction for you. Begin. Execute. Commit. Always.
✅ Committed!
❤️
INSERT INTO heart
VALUES ('you', ∞);
-- 1 row affected. Permanently.
The End 🗄️
Primary Key: You
Your data is safe with . Backed up. Indexed. Zero duplicates. Never to be dropped. You are the primary key of this family. 💙
Data Secure Forever! 💾