Step 1 · The problem
Messy notes are hard to use
This is student information written in a notebook. Can you find Sadia’s phone number quickly?
Notebook
Rahim Uddin 8B roll 12 01711-234567
Nusrat Jahan 9A ph 01822345678 r5
roll 21 Tanvir (8, A) 01933-456789
Sadia Sadia 9B r-7 01644-567890
Arif — 8A — 01555-678901 — roll 3
Rahim Uddin?? 8B 27 01799-112233
Every line has a different order. Some names are short or crossed out.
Why the table is better
- Every row looks the same.
- Same order in every row.
- Easy to find any phone number.
Organized table
Let’s put the same information into a table.
A database is an organized collection of data. It keeps data in tables, so a computer can store, find and change it easily.
Step 2 · Parts of a table
Field, record and table
Click a column heading, click a row, or click ALL.
Step 3 · Primary key
Who is who?
Two students have the same name. How do we know which one is which?
PRIMARY KEY A field that is different for every record. Here, it is Roll.
No two students share a roll, and it is never empty.
Names can repeat. Brothers and sisters may share a phone. So Name and Phone are not good keys.
Teacher’s note: In many schools, rolls repeat across classes, so a unique Student ID is the real key.
Step 4 · Try it yourself
Add a new student
Fill in the form and press Add student. The new record appears in the table.
Step 5 · Searching and sorting
Find and order data fast
Type in the search box to find a student. Click a column heading to sort.
This is what a database does for us. It can search and sort thousands of records in less than a second. In a notebook, this would take a very long time.
Step 6 · Quick quiz