Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

AC 2.4: What database and spreadsheet software make easy

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

55 minutes

A hammer is good at nails

A hammer makes nails easy and screws hard. Software is the same. Each kind makes some jobs easy and others slow or risky.

A data analyst picks the tool that makes the job easy. First you need to know what each tool is good at.

Key words

WordWhat it means
Functiona job the software can do, such as sorting or adding
Affordancewhat a tool makes easy to do, because of how it is built
Database softwaresoftware that stores linked tables and answers questions about them
Spreadsheet softwaresoftware that shows data in cells with formulas that recalculate
Queryone question asked of a database, written in SQL
SQLthe language used to ask a database for data
Databasean organised store of tables that you can ask questions
Integritydata that stays correct and in agreement with itself

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can say what database software and spreadsheet software are good at, and what each makes hard.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

What database software is good at

FunctionWhat it means for the analyst
Linked tablesEach fact is stored once and tables are joined by keys
QueriesAsk any question with SQL and get the rows back
Rules on fieldsTypes, required fields and limits refuse bad data
Many users at onceStaff can read and write together, with permissions
Large amounts of dataMillions of rows stay fast
IntegrityA sale cannot point at a product that is not there

The cells students fill in are left blank in this preview.

A database refuses bad data

Code: sql
CREATE TABLE pupils (
  name TEXT NOT NULL,
  year INTEGER CHECK (year BETWEEN 7 AND 13)
);

INSERT INTO pupils VALUES ('Bo', 99);
-- Error: CHECK constraint failed: year BETWEEN 7 AND 13
-- The row is not saved. Run in the sqlite3 client; wording can differ.

Try it: ask a database a question

Code: sql
-- Which products sold, and how many times? A join and a group in one query.
SELECT products.name, COUNT(*) AS sales
FROM sales
INNER JOIN products ON sales.product_id = products.product_id
GROUP BY products.name
ORDER BY sales DESC, products.name;

What spreadsheet software is good at

FunctionWhat it means for the analyst
Cells and formulasChange one number and every answer updates
What-if workTry a different price and see the total change
Quick layoutColour, columns and notes are free to arrange
Charts and pivot tablesA picture or a summary in a few clicks
Sort and filterLook at one list in many ways
Easy for one personNo set-up: open it and start

The cells students fill in are left blank in this preview.

No spreadsheet here

Important

This platform has no spreadsheet program, so you cannot try these functions here. On site you use a real one. The database ideas can be run: the block above asks one question of a table.

The lesson goes on

5 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.