Practice basic SQL syntax with Jupyter notebook. SQL is particularly useful in handling structured data where there are relations between different entities and variables of the data. SQL is a very important tool for data scientists and software developers.
This material includes the following hands-on exercises to be done using the Jupyter Notebook.
This tutorial mainly focuses on how to retrieve data from a database and how to add data to a database. The most effective way to learn how to use databases is to continue training through extensive hands-on training.
SQL (Structured Query Language, pronounced "ess-cue-ell) is a domain-specific language used in programming and designed for managing data held in a database management system (DBMS). It is particularly useful in handling structured data where there are relations between different entities and variables of the data. SQL is a very important tool for data scientists and software developers.
A relational database is, simply, a database that stores real world information across multiple tables and allows you to query information in more than one table at the same time. Within a table, the data to be stored is organized in a tabular format with rows and columns. Each row inside a table represents a distinct record with the column headings specifying the corresponding type of data stored. Software that is used to manage a digital database is called a Database Management System (DBMS). There are also other database systems available (such as MySQL, MariaDB, PostgreSQL, and Oracle Database, etc.). You’ll likely find yourself using many different types of databases throughout your education and work. However, all of them are like SQL, so once you've got the hang of the basic SQL syntax you'll be able to work with any of them.
To keep things simple, we will be using a database system called SQLite to practice SQL syntax. SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file. It is the most widely deployed database in the world.
SQL Primer: An Accelerated Introduction to SQL Basics by Rahul Batra. Rahul Batra (2018). https://doi.org/10.1007/978-1-4842-3576-8_7