Skip to main content

Introduction to Relational Databases in SQL

Learn how to create one of the most efficient ways of storing data - relational databases!

Start Course for Free
4 Hours13 Videos45 Exercises85,774 Learners
3600 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

You’ve already used SQL to query data from databases. But did you know that there's a lot more you can do with databases? You can model different phenomena in your data, as well as the relationships between them. This gives your data structure and consistency, which results in better data quality. In this course, you'll experience this firsthand by working with a real-life dataset that was used to investigate questionable university affiliations. Column by column, table by table, you'll get to unlock and admire the full potential of databases. You'll learn how to create tables and specify their relationships, as well as how to enforce data integrity. You'll also discover other unique features of database systems, such as constraints.

  1. 1

    Your first database


    In this chapter, you'll create your very first database with a set of simple SQL commands. Next, you'll migrate data from existing flat tables into that database. You'll also learn how meta-information about a database can be queried.

    Play Chapter Now
    Introduction to relational databases
    50 xp
    Attributes of relational databases
    50 xp
    Query information_schema with SELECT
    100 xp
    Tables: At the core of every database
    50 xp
    CREATE your first few TABLEs
    100 xp
    100 xp
    Update your database as the structure changes
    50 xp
    RENAME and DROP COLUMNs in affiliations
    100 xp
    100 xp
    Delete tables with DROP TABLE
    100 xp
  2. 3

    Uniquely identify records with key constraints

    Now let’s get into the best practices of database engineering. It's time to add primary and foreign keys to the tables. These are two of the most important concepts in databases, and are the building blocks you’ll use to establish relationships between tables.

    Play Chapter Now

In the following tracks

Data AnalystData Analyst Data Analyst Data EngineerSQL for Database AdministratorsSQL Server for Database Administrators


Sumedh PanchadharChester IsmayMona Khalil


Introduction to SQL
Timo Grossenbacher Headshot

Timo Grossenbacher

Project Lead Automated Journalism at Tamedia

Timo Grossenbacher is a project lead for automated journalism at Swiss publisher Tamedia. Prior to that, he used to be a data journalist working with the Swiss Public Broadcast (SRF), where he used scripting and databases for almost every data-driven story he published. He also teaches data journalism at the University of Zurich and is the creator of – resources for doing data journalism with R. Follow him at grssnbchr on Twitter or visit his personal website.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA