Skip to content
Edition NigeriaGlobal
Country: Barbados

You are in the Barbados edition. Type your country to switch.

Set up your profile

You are learning in the Barbados edition, with examples in dollars and from Barbados.

Data skills: SQL and Python basics · Lesson 1 of 7

How data is organised: tables, rows, columns and keys

Almost all business data lives in tables: one row per thing, one column per fact about it. This lesson explains rows, columns, data types, primary and foreign keys, why each fact should live in one place, and how a CSV file stores a table as plain text.

Beginner11 min read6 steps

This lesson is complete in writing. A video for it is on its way.

What you will learn

  • By the end you can describe a table in terms of rows, columns and data types.
  • You can explain what a primary key and a foreign key do, using a sales and a products table.
  • You can say why each fact should live in only one place, and what goes wrong when it does not.
  • You can read a CSV file and picture the table it stores.

Key terms in this lesson

Data type
What kind of value a column holds, such as a whole number, a decimal, text or a date. Numbers stored as text cannot be added or averaged.
Primary key
A column or set of columns that identifies each row in a database table uniquely, such as ticker plus date in a daily price table.
Foreign key
A column in one table whose values point to the primary key of another table, such as a product code in a sales table that refers to a row in a products table.
Relational database
A database that stores data in tables of rows and columns and links the tables through shared key values, so each fact can be kept once and combined when needed.
Database normalisation
Arranging data so that each fact is stored in only one place, splitting repeated details into their own table and linking them with keys, which prevents copies drifting apart.
CSV file
Comma-separated values: a plain-text file in which each line is a row and commas separate the columns. The most common format for exchanging tables of data.

Step 1 of 6

Why almost all data is a table

Opening this step…

Step 2 of 6

Meet the example tables

This step opens when you finish the one above.

Step 3 of 6

Columns have data types

This step opens when you finish the one above.

Step 4 of 6

Primary keys and foreign keys

This step opens when you finish the one above.

Step 5 of 6

One fact, one place

This step opens when you finish the one above.

Step 6 of 6

Tables as plain text: CSV files

This step opens when you finish the one above.

Key takeaways

The key takeaways open when you finish every step.

Lesson quiz

6 questions. You need 85% to pass.

The quiz opens when you finish every step.

Stockertim Learn is education. It explains how investing works and never recommends buying or selling anything.

Up next

Skills for the AI ageSQL basics: SELECT, WHERE and OR…Read nowSQL basics: SELECT, WHERE and ORDER BYSkills for the AI age · Beginner · 15 minSkills for the AI ageSummarising with SQL: GROUP BY, …Read nowSummarising with SQL: GROUP BY, COUNT, SUM and AVGSkills for the AI age · Beginner · 15 minSkills for the AI ageJoining tables: SQL JOIN for beg…Read nowJoining tables: SQL JOIN for beginnersSkills for the AI age · Beginner · 15 minSkills for the AI agePython basics: variables, lists,…Read nowPython basics: variables, lists, loops and functionsSkills for the AI age · Beginner · 15 minAI at workAudit analytics and full-populat…Read nowAudit analytics and full-population testingAI at work · Intermediate · 15 minMedia strategy & planningBuying out-of-home, print and ci…Read nowBuying out-of-home, print and cinemaMedia strategy & planning · Intermediate · 5 minHuman resourcesEmployee personal data across th…Read nowEmployee personal data across the lifecycleHuman resources · Advanced · 15 minMedia strategy & planningGRPs, TRPs and impressionsRead nowGRPs, TRPs and impressionsMedia strategy & planning · Intermediate · 5 minMarket operationsMargin and risk desks in operati…Read nowMargin and risk desks in operationsMarket operations · Intermediate · 15 minRisk, governance & ethicsEthical decision-making: a step-…Read nowEthical decision-making: a step-by-step frameworkRisk, governance & ethics · Beginner · 15 minBarbadian marketsBarbados Stock Exchange (BSE)Read nowWhat is the Barbados Stock Exchange (BSE)?Barbadian markets · Beginner · 15 minFinancial journalismAttribution and quotes: who says…Read nowAttribution and quotes: who says so, and whereFinancial journalism · Beginner · 15 min
English