Code Editor

Query Results

Run a query to see results.

Database Schema

Schema undefined.
SELECT * FROM celebs;

Nice work. In one line of code, you returned information from a relational database. We'll take a look at what this code means soon, for now let's focus on what relational databases are and how they are organized.

1. A relational database is a database that organizes information into one or more tables. Here the relational database contains one table.
2. A table is a collection of data organized into rows and columns. Tables are sometimes referred to as relations. Here the table is celebs.
3. A column is a set of data values of a particular type. Here id, name, and age are each columns.
4. A row is a single record in a table. The first row in the celebs table has:

  • An id of 1
  • A name of Justin Bieber
  • An age of 22

All data stored in a relational database is of a certain data type. Some of the most common data types are:

1. Integer, a positive or negative whole number
2. Text, a text string
3. Date, the date formatted as YYYY-MM-DD for the year, month, and day
4. Real, a decimal value


Now that you have an understanding of what relational databases are, let's take a closer look at SQL syntax.

Click Next to Continue.

Report a Bug
If you see a bug or any other issue with this page, please report it here.