Week 8 brief · Keeper · Data and Database Fundamentals

Keeper Week: Data, Databases and Backups

Mon, Nov 30 – Tue, Dec 1 · 2:30–4:00 PM · Room 105 or live on Zoom

This week

See how databases connect tables, write real SQL, and plan backups that survive a disaster. Tuesday is the Keeper Gate.

Heads up

  • Welcome back from Thanksgiving break. Do the Monday read-ahead over the weekend.
  • Only two zones left after this one.

Read-aheads

Before Monday (15 minutes)
  • Read the Data and databases and SQL notes below.
  • Think of your class schedule as a table. What would the columns be? What one column could tell every row apart?
  • Do 15 Keeper study cards.
Before Tuesday (20 minutes)
  • Read the Backups notes below.
  • Count where your own photos are saved. Do you have 3 copies? On 2 kinds of storage? 1 somewhere else?
  • Finish the Keeper Study Path and try the Check yourself questions.

The missions

Monday, Nov 30 · Day 15

9A · LabDatabase Detective

A school library database has tables for books, students, and checkouts. Your crew learns how rows, columns, primary keys, and foreign keys connect them, then writes real SQL to answer questions like who has an overdue book. Structured data starts making sense.

  1. Map the three tables and mark every primary key and foreign key.
  2. Write and run SELECT statements with WHERE to answer four detective questions.
  3. Write one INSERT to add a new checkout and verify it with a SELECT.

Turn in: Table map with keys marked and the five SQL statements with their results.

Tuesday, Dec 1 · Day 16

Keeper Gate today. You must pass the Coder Gate first.

9B · Gate dayBackup Disaster Drill

A simulated ransomware attack just wiped the crew's project drive. Can you recover? Your crew applies the 3-2-1 rule, compares full and incremental backups, and restores from the right copy. Then take the Keeper Gate for badge five.

  1. Design a 3-2-1 backup plan for the project drive and label each copy's location and media type.
  2. Choose which backup to restore from in the drill scenario and justify the choice.
  3. Take the 20-question Keeper Gate solo; 17 of 20 (85 percent) passes.

Turn in: Backup plan diagram, restore decision with reasoning, and each member's Keeper Gate result.

Notes

Data and databases

  • Data is raw facts. Information is data organized so it means something.
  • Structured data fits rows and columns (a grade table). Unstructured data doesn't (photos, videos, voice recordings).
  • In a table, each row is one record (one student) and each column is one field (LastName).
  • Primary key: a column that makes every row unique, like StudentID.
  • Foreign key: a column that points to another table's primary key. It links the tables, like CustomerID inside an Orders table.
  • Schema: the blueprint of the database: its tables, columns, data types and links.
  • A flat file (like a CSV) is one plain table with no links. NoSQL databases store flexible documents where each record can have different fields.

SQL you will use

  • SELECT Name FROM Students; reads data.
  • SELECT * FROM Students WHERE Grade = 10; filters to rows that match.
  • INSERT adds a new row. UPDATE changes rows. DELETE removes rows.
  • ORDER BY sorts the results.

Backups

  • The 3-2-1 rule: 3 copies of your data, on 2 different kinds of storage, with 1 copy off-site (another building or the cloud).
  • Full backup: copies everything. Incremental: copies only what changed since the last backup, so it's faster and smaller.
  • Persistence means data survives a restart, like a saved game.
  • Backups kept separate from the computer let you recover from ransomware without paying.

Vocabulary

RecordOne row in a table
FieldOne column in a table
Primary keyA unique ID for each row
Foreign keyA link to another table's primary key
QueryA request for data, often in SQL
Off-siteStored in a different location

Check yourself

  1. Which SQL word filters results to only matching rows?
  2. A Checkouts table has a StudentID column that points to the Students table. What kind of key is it in Checkouts?
  3. The school building floods. Which backup copy saves you?
Show answers
  1. WHERE
  2. A foreign key
  3. The off-site copy (another site or the cloud).

Bring

  • A charged device
  • Your student ID card