Home / Hands-on activities / Data Detective

Coding activity

Data Detective

Sort and organize items into groups! Put animals in one pile, foods in another, and colors in a third. Learn that organizing information helps us find things faster.

Hands OnAbout 20 minutesScreen-freeParent help expected

Materials and setup

How this changes by age

Pre-K (ages 3–4)

Sort and organize items into groups! Put animals in one pile, foods in another, and colors in a third. Learn that organizing information helps us find things faster.

Difficulty 1 of 3

Steps

  1. Dump a mixed pile of small items on the table: toy animals, crayons, play food, blocks.
  2. Ask: 'Can you put all the animals together? All the food together? All the blocks together?'
  3. Child sorts items into labeled trays or bowls.
  4. Now ask: 'How many animals do we have? How many foods? Which group is biggest?'
  5. Discuss: 'When things are organized, we can find what we need quickly!'
  6. Tell a grown-up one thing that surprised you.

Learning objectives

  • Sort mixed items into categories based on shared attributes
  • Count items within each category and compare group sizes
  • Understand that organizing information makes it easier to use

Kindergarten (ages 5–6)

Become a data detective! Collect information about your family or toys, organize it into lists and charts, and answer questions using your data. Learn that organized data tells stories.

Difficulty 2 of 3

Steps

  1. Survey: ask 5 family members or friends their favorite color, food, and animal. Write each answer on an index card.
  2. Sort the cards: group all the color answers together, all the food answers, all the animal answers.
  3. Make a tally chart: how many people said 'blue' versus 'red' versus 'green'?
  4. Answer questions using your data: 'What is the most popular color? Do more people like dogs or cats?'
  5. Discuss: 'You just created a database! Scientists and businesses collect data just like this to learn things.'
  6. Tell a grown-up one thing that surprised you.

Learning objectives

  • Collect data through a simple survey and record it on cards
  • Organize data into categories and create a tally chart
  • Answer questions by analyzing organized data

Early elementary (ages 6–8)

Build a paper database! Create records with multiple fields, organize them by different attributes, and run queries to answer questions. Learn how computers store and search through information.

Difficulty 2 of 3

Steps

  1. Create 15 'data cards' about animals: each card has fields for Name, Type (mammal/bird/fish), Size (small/medium/large), Habitat (land/water/air), and Diet (herbivore/carnivore/omnivore).
  2. Organize cards by Type. How many mammals? Birds? Fish? Record the counts.
  3. Re-sort by Size. Now by Habitat. Notice: the same data can be organized many different ways!
  4. Run queries: 'Find all large mammals.' 'Find all animals that live in water AND are carnivores.' Search through your cards.
  5. Create a simple table (spreadsheet-style) on paper with all 15 animals and their attributes in columns.
  6. Discuss: 'Databases let computers search millions of records in seconds. Your paper database works the same way, just slower!'
  7. In one sentence, tell a parent or sibling what surprised you today.

Learning objectives

  • Create structured data records with consistent fields
  • Sort and re-sort the same dataset by different attributes
  • Execute queries using AND/OR logic to filter records

Upper elementary (ages 8–10)

Master database concepts. Design a relational database with multiple tables (using clear, unambiguous column names), write queries in plain English that match SQL logic, normalize data to avoid redundancy, and analyze a real dataset to find patterns and insights.

Difficulty 3 of 3

Steps

  1. Design a database for a school. Use clear column names so the same word never means two different things. Table 1 = Students (StudentID, Name, GradeLevel, Homeroom) where GradeLevel means 3rd / 4th / 5th. Table 2 = Classes (ClassID, Subject, Teacher). Table 3 = Enrollment (StudentID, ClassID, LetterGrade) where LetterGrade means A / B / C / D / F.
  2. Create 10 student records, 5 classes, and enroll each student in 3 classes. Write it all on paper in table format.
  3. Write queries in plain English, using the precise column names: 'Find all students where GradeLevel = 5.' 'Find all students taking Math where LetterGrade = A.' 'Which teacher has the most students?'
  4. Trace through your tables to answer each query. Count how many records you had to check.
  5. Discuss why renaming 'Grade' to 'GradeLevel' and 'LetterGrade' matters: if both columns were just called 'Grade', queries like 'Grade = 5' would be ambiguous. Clear names prevent bugs.
  6. Real-world project: collect data about 20 items (books, movies, games). Design a database, enter the data, and discover 3 interesting patterns.
  7. In one sentence, tell a parent or sibling what surprised you today.

Learning objectives

  • Design a relational database with multiple linked tables
  • Write and execute English-language queries that mirror SQL logic
  • Understand data normalization and why it prevents redundancy and errors

Safety and evidence note

Read the full activity before beginning. An adult should supervise tools, heat, food, outdoor work, movement, and experiments as appropriate. Completion records that the activity was done; the child’s explanation, work sample, photo, or demonstration is stronger evidence of learning than a completion check alone.

Related coding activities

Browse all 575 activities · Explore course syllabi