Track quiz
Eight lessons, one line each. Keep the table beside the register while you answer.
| Idea | The line to keep |
|---|---|
| One record, one row | A record is one row of values that belong together. The heading row names the columns. One field takes two positions: first the row, then the column. |
| The naming value | A key is a column whose values each name exactly one record. A single value names a record when only one record carries it. |
| Naming the columns | The headers list turns a column's name into a position. Find the position first, then fetch the field. Minus one is an answer. Do not use it as a position. It means no such column exists. |
| One condition | A query walks the rows. It keeps rows where one field meets the condition. The answer is whatever the walk kept — including nothing. |
| Two conditions | Two conditions joined by and keep a row only when both hold. Two conditions keep fewer rows, or the same — never more. |
| The answer in order | Sorting moves whole rows and compares one field at the key's position. The comparison is strict. Tied rows are never swapped with each other. Sorting nothing is not an error. |
| Counting the groups | Count the answer, not the table. This report lists its groups first. So a group with no answer rows still shows a 0. |
| What a database adds | 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. |
The headers list reads ['admission', 'name', 'section', 'due']. What does rows[2][0] fetch?
In this course's runner, a row has four values. What does rows[2][4] do?
Two records are named Ananya Suresh. Why can the name not be the key?
Why can the admission number serve as the key?
What does headers.indexOf('marks') hand back for a register with no marks column?
In this course's runner, a program gets −1 from the headers. It fetches with it anyway. What happens?
The query "the due is 1450" walks the register. What lands in the answer?
After the walk builds the answer, what does the register hold?
Which records does the 10-C query keep?
Section 9-A alone keeps 7 records. What is true of "9-A and due at least 1000"?
When the sort compares two rows, what does it compare?
Two records tie on due. One was already ahead. What does the taught sort do?
After sortRows hands back the sorted answer, what does the register read?
The Friday report reads 9-A: four. The register holds seven 9-A records. What happened?
This report's tally lists its groups first, 10-C included. Why?
A database program answers a question about twelve thousand rows. What must its answer match?
Assertion (A): Adding and to a query never raises the kept count. Reason (R): Every kept row must pass both conditions. What is right?
Case: A new row joins: A-113, Ananya Suresh, 9-B, due 0. Which column can still serve as the key?
That is the whole track: a table, a key, and a question.
Your track is How AI Learns II: Neural Networks Intuition. It will look different — numbers, not rows. You have spent a term asking a table exact questions. You are hard to fool now.