Welcome to Databases and Spreadsheets!

Have you ever wondered how your school library keeps track of thousands of books, or how an animal shelter knows which pets are ready for adoption? They use digital tools to hold and organize large amounts of information. In this chapter, we explore how databases and spreadsheets help us collect, organize, calculate, and display data to answer questions about the world around us.

Note: To learn about setting up your questions before gathering data, see our chapter "Designing a survey and organizing the data". For calculating summaries like mean or mode, explore "Range, mode, median and mean".

Part 1: What is a Database?

A database is an organized collection of information stored electronically. Think of a database like a digital filing cabinet. Instead of flipping through stacks of paper folders, a computer lets us search, sort, and organize facts in seconds!

Key Parts of a Database

To understand a database, it helps to know how the information is structured:

1. Field: A single category of information. For example, in a school library, the fields might be Book Title, Author, and Number of Pages. In a table, a field is usually a column heading.

2. Record: All the information about one specific item or person. In a table, a record is one complete row. For example, a single record might contain: Charlotte's Web (Title), E.B. White (Author), and \(192\) (Pages).

3. File / Table: The entire collection of records grouped together.

Using Databases to Answer Questions (Phase 3)

Once data is entered into a database, we can use it to answer inquiries and solve problems. We do this by searching (finding specific records) and sorting (arranging records in a particular order).

Here are some examples of questions a database can answer easily:

• "Which books in the library were written by Roald Dahl?" (We search the Author field for "Roald Dahl".)
• "Which book has the most pages?" (We sort the Number of Pages field from greatest to least.)
• "How many books have fewer than \(100\) pages?" (We filter the Number of Pages field to show values \(< 100\).)

Creating and Manipulating an Electronic Database (Phase 4)

As you become more confident, you can build your own electronic database! Manipulating a database simply means changing or interacting with the data to discover new patterns. This includes:

• Adding new records when new information arrives.
• Editing records when details change.
• Filtering to view only items that meet certain criteria (such as pets that are "Dogs" AND "Under \(2\) years old").
• Sorting alphabetically (from A to Z) or numerically (from lowest to highest).

Key takeaway: A database stores organized information in fields (categories/columns) and records (individual entries/rows), making it quick and easy to search, sort, and answer questions.

Part 2: What is a Spreadsheet?

A spreadsheet is a special digital tool designed to store numbers and words in a grid. While a database is wonderful for sorting and finding text records, a spreadsheet is especially powerful for working with numbers and performing calculations automatically.

The Grid: Columns, Rows, and Cells

When you open a spreadsheet, you see a large grid made of three main parts:

• Columns: These run vertically (up and down) and are labelled with letters (such as \(A\), \(B\), \(C\)).
• Rows: These run horizontally (left to right) and are labelled with numbers (such as \(1\), \(2\), \(3\)).
• Cell: Each individual box on the grid where a column and a row meet. Every cell has a unique cell address (or reference). For example, the box where column \(B\) meets row \(3\) is named cell \(B3\).

Memory Tip: Always say the Letter first, then the Number, just like reading coordinates on a map! Think: "Column letter, row number: \(A1\), \(B2\), \(C3\)."

Part 3: Working with Simple Formulas in Spreadsheets (Phase 4)

The real magic of a spreadsheet is that it can do calculations for you using formulas! A formula is a set of instructions that tells the spreadsheet how to calculate a value.

The Golden Rule of Spreadsheet Formulas

Every formula in a spreadsheet must start with an equals sign (\(=\)).

Without the \(=\) sign at the beginning, the spreadsheet will treat your entry as plain text or a label rather than doing the math.

Basic Arithmetic Symbols

Computers use standard keyboard symbols for the four basic operations:

• Addition: \(+\) (Example: \(=\!A1 + B1\))
• Subtraction: \(-\) (Example: \(=\!A1 - B1\))
• Multiplication: \(*\) (The asterisk symbol; Example: \(=\!A1 * B1\))
• Division: \(/\) (The forward slash symbol; Example: \(=\!A1 / B1\))

Using Cell References Instead of Fixed Numbers

Why do we write \(=\!A1 + B1\) instead of \(=\!5 + 10\)?

Because if you use cell references, whenever you change the number in cell \(A1\), the spreadsheet automatically recalculates the answer! This is called manipulating data.

Common Simple Formulas

Spreadsheets also have built-in words (called functions) to help you calculate quickly:

• SUM: Adds together all numbers in a selected group of cells (a range).
Example: \(=\!\text{SUM}(A1:A5)\) adds all the numbers from cell \(A1\) down to cell \(A5\).
• AVERAGE: Calculates the mean of a group of numbers by adding them up and dividing by how many there are.
Example: \(=\!\text{AVERAGE}(B1:B10)\)

Step-by-Step Example: Class Snack Shop

Imagine your class is running a healthy snack stand and keeping track of sales:

1. In cell \(A2\), you type the item name: Apples.
2. In cell \(B2\), you type the price: \(\$1\).
3. In cell \(C2\), you type the quantity sold: \(8\).
4. In cell \(D2\), you want the total money collected for apples. You type the formula: \(=\!B2 * C2\).
5. Press Enter, and the spreadsheet instantly displays \(8\)! If you sell \(2\) more apples and change cell \(C2\) to \(10\), cell \(D2\) automatically updates to \(10\).

Key takeaway: Spreadsheets use a grid of columns (letters) and rows (numbers) to form cells. Formulas always start with an equals sign (\(=\)) and update calculations automatically when cell values change.

Part 4: Creating Graphs from Spreadsheets (Phase 4)

Numbers in tables can sometimes be hard to interpret at a glance. Spreadsheets make it easy to turn rows and columns of data into clear visual charts.

How to Create a Graph in a Spreadsheet

1. Organize: Enter your data neatly into columns with clear labels at the top.
2. Select: Highlight the cells that contain the labels and numbers you want to show.
3. Insert Chart: Choose the appropriate graph type from the menu.
4. Label: Check that your graph has a clear title and labelled axes so anyone reading it understands the information.

Note: For guidance on choosing between bar graphs, line graphs, or circle graphs (pie charts), see our chapters "Selecting an appropriate graph form" and "Line graphs and circle graphs (pie charts)".

Common Mistakes to Avoid

• Forgetting the equals sign (\(=\)): If you type \(A1 + B1\), the screen will just show the words "A1 + B1". You must type \(=\!A1 + B1\) to tell the computer to do the calculation.
• Mixing up Columns and Rows: Remember, columns stand up tall like pillars in a building (letters: \(A\), \(B\), \(C\)); rows stretch out flat like rows of desks (numbers: \(1\), \(2\), \(3\)).
• Typing words into number cells: If you type "5 apples" instead of just "\(5\)" in a data cell, the spreadsheet might not be able to use that cell in a mathematical formula.

Quick Review Summary

• A database stores information in fields (columns) and records (rows) to make searching, sorting, and answering questions simple.
• A spreadsheet organizes text and numbers in a grid of cells identified by a column letter and row number (like \(B4\)).
• Formulas always start with an equals sign (\(=\)) and let us calculate totals, averages, and differences automatically.
• Spreadsheets can convert organized numerical data into graphs with a few clicks, helping us see patterns, trends, and relationships clearly.