Please enable JavaScript to use CodeHS

Data and Databases

What is data?

Every app you use stores data. A text message, a game score, a playlist, and a weather forecast all start as pieces of data. In this tutorial, we will learn what data is, how it becomes information, and why structure matters.

Data ~10 min Middle / High School
The Big Idea

Data vs information

Data is a collection of raw facts. 72 is data. F is data. Jenny is data. By itself, each fact might not mean much.

Information is data that has been organized and given context. Jenny got a 72 on her test, which is an F is information. The same facts become useful when they are connected and explained.

Computers are great at storing and organizing huge amounts of data quickly. The challenge for developers is turning that data into meaningful information for users.


Vocabulary

Types of data

Data comes in different forms. A few common types are:

  • Numbers: counts, measurements, scores, prices, temperatures.
  • Text: names, messages, descriptions, addresses.
  • Dates and times: when something happened or will happen.
  • True/false: whether a setting is on or off, whether a user is logged in.
  • Images, audio, and video: larger files that hold visual or sound data.

When you store data, you choose a type so the computer knows how to sort it, search it, and calculate with it. For example, numbers can be added, but text usually cannot.


How It Works

Structured and unstructured data

Structured data is organized into rows and columns, like a spreadsheet or a table. Each row is one record, and each column is one field. A class roster with columns for name, grade, and email is structured.

Unstructured data does not fit neatly into rows and columns. A long essay, a song, a video, or a pile of social media posts are unstructured. They are harder for computers to search and analyze, which is why tools like AI are often used to make sense of them.

Real-world example: A grocery store keeps structured data about prices and inventory. It also collects unstructured data from customer reviews. Both are valuable, but they are stored and searched differently.


Interactive

Sort the data

Drag each item into the structured or unstructured bin. Click the cards if dragging does not work.

Class attendance sheet
Voice memo
Bank transaction list
Funny cat video
Playlist of songs
Group chat conversation

Structured

Unstructured


Code

Data as Python values

Before you store data in a database, you usually represent it as values in code. This Python dictionary is one row of data.


Your Turn

Check yourself

Think of an app you use every day. Name one piece of structured data and one piece of unstructured data it probably stores.

Your answer:

Sample answer: A music app has structured data like your playlists and song lengths. It has unstructured data like album art, lyrics, and user comments.


Check Yourself

Quick quiz

1. What is the difference between data and information?

2. Which is an example of structured data?

3. Why do computers prefer structured data?

Keep learning

You understand what data is. Next, see how databases organize data into tables.

First tutorial in the Data and Databases series.