The Internet
MachineModule
03/04
MachineModule
03/04
THE MEMORY VAULT
03DATABASE
How does a website remember us?
MODULE 03/04 · THE MEMORY VAULT
How does a website remember us?
DATABASE
Your name, your shopping cart, your order history — all of it is kept in a strictly organized vault. This book opens the drawers so you can store, search and connect data yourself.
When you finish, you’ll understand
- How tables, rows and columns work together
- Creating, reading, updating and deleting data (CRUD)
- How primary keys and foreign keys connect data
- Why a database always sits behind the server
The world of this book
A world of vaults, storage boxes, relationships and structure
Who it’s for
Best after Book 02, but you won’t get lost starting here
Checking your access
Contents
6 chapters
- 01The memory of a website“Why is our data still there after we close the app and open it again?”Open the coffee shop’s database drawers and add, find, edit and delete data with your own hands — then see how two kinds of keys link customers to their orders.Lab 03: The data drawersFree · 16 min
- 02Tables that hold hands“One customer, many orders — how should we store that?”One-to-many and many-to-many relationships, and JOINing data from several tables together.Checking your access
- 03Asking questions with SQL“How do you ask a database “which drink sold best this month?””SELECT, WHERE, ORDER BY and summarizing data — the language for asking a data vault questions.Checking your access
- 04Design the drawers right from the start“Why does storing the same data in several places cause trouble?”Schema design and normalization — the art of giving every piece of data a home of its own.Checking your access
- 05Finding one row in a million“How does a database find your name in a split second?”Indexes — structures that work like the index at the back of a book — and the price you pay for using them.Checking your access
- 06Data must not vanish or leak“If the power goes out in the middle of a bank transfer, where does the money go?”Transactions, backups, access permissions and SQL injection — the threats a database has to handle.Checking your access
Other books in the set
- 01 · FRONTENDThe Internet
MachineModule
01/04THE VISIBLE WORLD
01FRONTENDWhy can we see a website at all?
- 02 · BACKENDThe Internet
MachineModule
02/04THE HIDDEN ENGINE
02BACKENDWhen we press a button, who does the work?
- 04 · WEBSITE ONLINEThe Internet
MachineModule
04/04THE CONNECTED PLANET
04WEBSITE ONLINEHow does a website travel from one computer to the whole world?