What a database adds
This term taught one way to question a table: walk the rows. A row is kept when it meets the condition. It is passed over when it does not.
- Five rows, no marks yet.
- Each row is kept or passed, in turn.
- The count grows only when a row is kept.
- The answer comes back after every row.
The rule
One query means the same as a walk. Read the condition, take each row, keep it or pass it. Hand back what you kept. A database program can give the same answer. A report with empty groups must list them first.
A database is an organised set of tables. A database program keeps them and answers questions, fast.
Your walk looks at twelve rows. A real table can hold thousands. A database program is made for tables that big. Its answer must match your walk's answer.
Databases have their own written language for asking. Here you wrote each question as a program yourself.
Walk the query below, one record at a time.
Loading lab…
This walk gives the answer a database program must match.