Rullst AcademyRullst Academy/Lesson
Databases and SQL I · Lesson 01 / 12

A catalog to understand

Distinguish database, table, row, column and SQL; run a query.

Learning paths12 min

Let's discover together

  1. 1

    This first Building track uses tables, files and basic Python. The system-specific Python setups and Python I help. On a phone you can read and answer; the executable lab needs a computer.

  2. 2

    SQLite is the database system; SQL is the instruction language. A table has columns and rows. Each record has an id: two materials can be called Orbit, but their ids distinguish them.

  3. 3

    Our project uses kits and loans: fictional materials and loans, without personal data. Spreadsheets can also solve simple problems; here we want explicit relationships and rules between records.

  4. 4

    Extract the kit and run python lab.py run lesson.sql in its folder; adapt to python3 or py for your setup. Real SQLite computes the output. Every run starts with fresh in-memory data, without automatically saving a database.

Your data workbench

Our model: kits.id ← loans.kit_id. One material can have many loans; names may repeat. We use fictional data only.

Predict before opening the reference. It shows verified output from the original example, not execution of your text. Run your changes with the kit on your computer.

-- A catalog to understand
SELECT id, label FROM kits ORDER BY id;
Compare with reference output
[
  {
    "columns": [
      "id",
      "label"
    ],
    "rows": [
      [
        1,
        "Orbit"
      ],
      [
        2,
        "Sprout"
      ],
      [
        3,
        "Orbit"
      ],
      [
        4,
        "Nova"
      ]
    ]
  }
]

Run the command in the extracted folder’s terminal. Use python3 on macOS/Ubuntu or py if that is your Windows launcher. Every run starts in memory; read README.md for saving files and recovery practice.

python lab.py run lesson.sql
My files and GitHub

The editor saves your .sql draft in this browser. Download it and replace lesson.sql in the kit; for the final project, availability.sql. The ZIP remains the original template. GitHub publishing sends only the confirmed file, without executing SQL or sending a database.

Official links and next step

✦
YOUR MISSION

Distinguish database, table, row, column and SQL; run a query.

Now it's your turn

Discovery workshop

Read, predict and check

Distinguish database, table, row, column and SQL; run a query.
Build your answers and check when you are ready.
A moment to understand

What identifies records with repeated names?

I need a hint

SQLite is the database system; SQL is the instruction language. A table has columns and rows. Each record has an id: two materials can be called Orbit, but their ids distinguish them.

Loading your journey…

Take it with you

Add stock to the selected columns. Record a prediction, run and explain the difference.

At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.