Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Database | Database and Nested Queries
Data Manipulation using SQL
course content

Contenido del Curso

Data Manipulation using SQL

Data Manipulation using SQL

1. Database and Nested Queries
2. SQL Joining Tables
3. SQL Tasks

book
Database

In this course, we'll work with multiple tables: songs, singers, and albums. They are connected to each other, and this is shown in the schema:

Each record in these tables has an id, and these ids are presented in other tables. For example, singer Britney Spears has an id = 2, so the song 'Sometimes' has a column singer_id with value 2 in it.

It's much more comfortable to use id values instead of raw values to avoid mistakes and keep it consistent. You can see the content of each table below:

songs

albums

singers

We can see that NULL fields appeared. We may also notice that some albums and singers' records are not using in the songs table, but we still keep it.

Records' ids have values starting with 1, but these values can be not integers, but strings, or fixed-bitness numbers (from 10000 to 99999, for example), etc. and some numbers can be missed.

Note that there are repeated names for columns in different tables (for example, id is present in all tables). To select some columns from a specific table, we have to refer to the column with the table's name: for example, songs.id instead of id. It is more clear to specify the column name with a table name to understand what data we work with. But if the column's name is unique among all columns, we can refer column by its name only, and it will still be correct.

Tarea
test

Swipe to show code editor

Remember how to retrieve the data from the table: return all records from the songs table.

During the course, you'll complete a lot of tasks, and for some attempts to send a query you may receive the Internal Server Error as an output. Most likely, it means that the result of your query is empty (there is no matching record, or the database is empty, for example). Try to change the query so the result is non-empty, and send it again.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 1
toggle bottom row

book
Database

In this course, we'll work with multiple tables: songs, singers, and albums. They are connected to each other, and this is shown in the schema:

Each record in these tables has an id, and these ids are presented in other tables. For example, singer Britney Spears has an id = 2, so the song 'Sometimes' has a column singer_id with value 2 in it.

It's much more comfortable to use id values instead of raw values to avoid mistakes and keep it consistent. You can see the content of each table below:

songs

albums

singers

We can see that NULL fields appeared. We may also notice that some albums and singers' records are not using in the songs table, but we still keep it.

Records' ids have values starting with 1, but these values can be not integers, but strings, or fixed-bitness numbers (from 10000 to 99999, for example), etc. and some numbers can be missed.

Note that there are repeated names for columns in different tables (for example, id is present in all tables). To select some columns from a specific table, we have to refer to the column with the table's name: for example, songs.id instead of id. It is more clear to specify the column name with a table name to understand what data we work with. But if the column's name is unique among all columns, we can refer column by its name only, and it will still be correct.

Tarea
test

Swipe to show code editor

Remember how to retrieve the data from the table: return all records from the songs table.

During the course, you'll complete a lot of tasks, and for some attempts to send a query you may receive the Internal Server Error as an output. Most likely, it means that the result of your query is empty (there is no matching record, or the database is empty, for example). Try to change the query so the result is non-empty, and send it again.

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 1. Capítulo 1
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt