Fun computer science · Classes 7 to 10
Tables and databases: finding things fast
A school keeps thousands of records. A database stores them in tables so a computer can filter, sort and count in a blink. Predict what a rule will pick, then try it.
1. Filter the table
Set a rule and only the rows that follow it stay lit. Predict the count first.
2. Sort the table
Sorting puts the rows in order by one column. Predict who comes first, then sort.
3. Which column can be a key?
A primary key is different in every row. Pick a column and test whether any value repeats.
Remember in one minute
- A table has rows (records) and columns (fields). A database is an organised collection of tables.
- Filtering keeps only rows meeting a condition. AND needs both conditions; OR needs at least one.
- Sorting orders the rows by a column. Totals and averages are computed over a column, after filtering.
- A primary key is a column whose value is different in every row, such as a roll number.
Practice now: 3 levels, worked answers, progress tracker →
This is a practice aid made by BodhiScore, not a textbook or an official board resource. Your school’s textbook decides the exact syllabus and the way answers are written. Nothing on this page is saved or sent anywhere. This is a practice aid, not a substitute for your school textbook. These are standard computing facts; where a value depends on a convention the question says which one is used.