AITeky Learn

AiTeky Original Interactive Learning & Practice Intermediate

Database design and internals: keys, indexes and transactions

Split a messy sheet into clean tables with keys, see an index turn a full scan into a lookup by counting the work the database does, protect a money transfer with a transaction, and choose keys and indexes for a busy orders table.

Every app that stores data makes the same three choices, usually without noticing: how to split the data into tables, how to find a row quickly, and how to keep the data correct when two things happen at once. This course shows each choice with a real database that runs right here in your browser.

Nothing is installed. Each lesson uses SQLite, a small real database, driven from Python. The table sizes and the work counts you see come from actual runs. The shop, the rupee amounts and the traffic figures in the last lesson are made up for teaching.

  • Learn lessons explain one idea at a time and let you measure it.
  • Industry ready lessons decide and justify, and end with the interview questions that go with them.

You only need basic SQL: SELECT, WHERE and INSERT. The SQL course covers those.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 35 min Free sample 🔒 AiTeky Pass One fact in one place: tables, keys and normal forms Take one wide sheet where a customer's phone number is typed on every order, watch an update go wrong, then split it into tables joined by primary and foreign keys so every fact is stored once, and let the database refuse bad data.
  2. 02 35 min 🔒 AiTeky Pass Indexes: finding one row among fifty thousand Count the work SQLite does to find one order with and without an index, read the query plan, see that an index on the wrong column or the wrong order helps nothing, and pay the price an index has on every write.
  3. 03 30 min 🔒 AiTeky Pass Transactions: all of it happens, or none of it Move money between two accounts, crash half way and see the money vanish, then wrap the two updates in a transaction so the database undoes a half-finished job, and meet the four promises called ACID.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 04 40 min 🔒 AiTeky Pass On the job: choosing indexes for a busy orders table A food-delivery app has three frequent queries and 40 orders written every second at peak. Measure four index choices by the work they save on reads and the work they add to writes, pick one, and write the recommendation for the engineering lead.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in