Skip to content

Latest commit

 

History

History
46 lines (24 loc) · 3.3 KB

2-gathering-data.md

File metadata and controls

46 lines (24 loc) · 3.3 KB

SQL and Relational Databases

Learn how to store and retrieve data using SQL queries and relational databases.


SQL and Databases

Before diving into how to query any database, let's define what a database is. A database is a data store designed for storing, querying, and processing data. Databases store the data we want and expose an interface for interacting with that data. Most technology companies use databases to structure the data coming into the system and later query specific subsets of the data to answer questions or update existing data. Database systems also come with database management software with administrative controls, security and access controls, and a language to interface with the database. Read more about databases here.

In this module we will be learning about SQL (Structured Query Language), which is designed to query, update and modify data stored in a database. SQL is the most common language for working with databases and is an important tool in any data professional's toolkit. While SQL is a language, it's quite different from languages like Python or R. SQL was built specifically for querying and interacting with databases and won't have much of the functionality you can expect in traditional programming languages. Since SQL is a declarative language, the user focuses on expressing what he or she wants and the computer focuses on figuring out how to perform the computation.

A database is a collection of tables, where each table is made up of rows of data and each row has values for the same set of columns across the table. A table is very similar to a DataFrame in Pandas or how a regular CSV file is structured. Both have rows of values with a consistent set of columns.

Querying

SQL is the most popular database querying language on the web. A SQL query has to adhere to a defined structure and vocabulary that we use to define what we want the database to do. The SQL language has a set of general statements that you combine with specific logic to express the intent of that query. Its easy to read syntax makes it more English-like than programming languages.

Databases

There are many different implementations of Relational Database Management Systems. We will focus on SQLite so you can get up-and-running quickly. Later on in the course we will talk about more advanced relational databases. You can read a comparison about them here.


Assignments

  1. Complete all the lessons of SQL Bolt.

  2. Go through the introductory to advanced SQL training modules on Mode Analytics.

  3. Complete the SQLite tutorial.


Projects

  1. Querying (TBD)
  2. DB Creation (TBD)

Feedback (optional)

(1 - 2 minutes)

Please provide us with feedback once you have just completed this page. It will help us improve the program both for you and for fellow students.