
Databases and SQL for Data Science with Python

Databases and SQL for Data Science with Python
This course is part of multiple programs.


Instructors: Hima Vasudevan
679,981 already enrolled
Included with •Learn more
22,747 reviews
Recommended experience
22,747 reviews
Recommended experience
What you'll learn
Analyze data within a database using SQL and Python.
Create a relational database and work with multiple tables using DDL commands.
Construct basic to intermediate level SQL queries using DML commands.
Compose more powerful queries with advanced SQL techniques like views, transactions, stored procedures, and joins.
Skills you'll gain
Tools you'll learn
Details to know

Add to your LinkedIn profile
See how employees at top companies are mastering in-demand skills

Build your subject-matter expertise
- Learn new concepts from industry experts
- Gain a foundational understanding of a subject or tool
- Develop job-relevant skills with hands-on projects
- Earn a shareable career certificate

There are 6 modules in this course
Whether you want to become a Data Scientist, Data Analyst, or Data Engineer, knowing how to work with SQL (Structured Query Language) is an essential skill. SQL is a powerful language used for communicating with and extracting data from databases.
In this hands-on course, you’ll learn how to retrieve, organize, and manage data using SQL, starting with the fundamentals and moving to more advanced techniques. You’ll also explore how to combine SQL with Python to work with databases and analyze data. By the end of this course, you’ll be able to: - Write SQL queries using SELECT, INSERT, UPDATE, and DELETE to retrieve and manage data. - Filter and organize data using WHERE, COUNT, DISTINCT, LIMIT, ORDER BY, GROUP BY, and built-in database functions. - Create and manage database tables using CREATE, ALTER, and DROP, and understand the differences between DDL and DML. - Query complex datasets using subqueries, string patterns, ranges, and INNER and OUTER JOINs to work with data across multiple tables. - Connect SQL with Python using Jupyter notebooks to access databases and integrate SQL into your data science workflow. - Explore advanced database concepts such as Stored Procedures, Views, and ACID transactions. Throughout the course, you will complete hands-on labs, work with real databases on the Cloud, and gain experience with real data science tools. In the final project, you’ll analyze multiple real-world datasets to demonstrate your ability to query and work with data. Ready to build your SQL skills? Join over 670,000 learners who have enrolled in this course. Earn a shareable certificate to showcase your data science skills on LinkedIn, your resume, or your CV.
In this module, you will be introduced to databases. You will learn how to use basic SQL statements like SELECT, INSERT, UPDATE and DELETE. You will also get an understanding of how to refine your query results with the WHERE clause as well as using COUNT, LIMIT and DISTINCT.
What's included
6 videos4 readings2 assignments3 app items
6 videos•Total 19 minutes
- Course Introduction•3 minutes
- Introduction to Databases•4 minutes
- SELECT Statement•4 minutes
- COUNT, DISTINCT, LIMIT•2 minutes
- INSERT Statement•3 minutes
- UPDATE and DELETE Statements•3 minutes
4 readings•Total 23 minutes
- Course Overview•3 minutes
- SELECT statement examples•10 minutes
- Module Summary: Getting Started with SQL•5 minutes
- SQL Cheat Sheet: Basics - SELECT, INSERT, UPDATE, DELETE, COUNT, DISTINCT, LIMIT•5 minutes
2 assignments•Total 20 minutes
- Practice Quiz: Basic SQL•10 minutes
- Graded Quiz: Basic SQL•10 minutes
3 app items•Total 70 minutes
- Hands-on Lab: Simple SELECT Statements•20 minutes
- Hands-on Lab: COUNT, DISTINCT, LIMIT•30 minutes
- Hands-on Lab: INSERT, UPDATE, and DELETE•20 minutes
In this module, you’ll learn more about relational database concepts and their importance. This module helps you to understand the process of creating a table in your database on MySQL using the graphical interface and SQL scripts. Further, you will also learn how to alter the entries or delete the entries for any table in the database, or even delete the table itself.
What's included
5 videos7 readings2 assignments3 app items
5 videos•Total 22 minutes
- Relational Database Concepts•6 minutes
- Types of SQL statements (DDL vs. DML)•2 minutes
- CREATE TABLE Statement•4 minutes
- ALTER, DROP, and Truncate Tables•4 minutes
- How to create a Database instance on Cloud•6 minutes
7 readings•Total 45 minutes
- Examples to ALTER and TRUNCATE tables using MySQL•10 minutes
- Examples to CREATE and DROP tables•10 minutes
- Understanding Relational Model Constraints•10 minutes
- SQL Scripts - Uses and Applications•7 minutes
- Summary: Relational Database Concepts and Tables•2 minutes
- SQL Cheat Sheet: CREATE TABLE, ALTER, DROP, TRUNCATE•5 minutes
- [Optional] Hands-on Lab Using IBM DB2•1 minute
2 assignments•Total 25 minutes
- Practice Quiz: Introduction to Relational Databases and Tables•10 minutes
- Relational DB Concepts and Tables•15 minutes
3 app items•Total 70 minutes
- Hands-on Lab : CREATE, ALTER, TRUNCATE, DROP•20 minutes
- Hands-on Lab: Create and Load Tables using SQL Scripts•20 minutes
- Obtain IBM Cloud Feature Code and Activate Trial Account•30 minutes
This module helps you learn how to use string patterns and ranges to search data and how to sort and group data in result sets. You will also practice composing nested queries and execute select statements to access data from multiple tables.
What's included
7 videos6 readings4 assignments4 app items
7 videos•Total 31 minutes
- Using String Patterns and Ranges•4 minutes
- Sorting Result Sets•3 minutes
- Grouping Result Sets•4 minutes
- Built-in Database Functions•6 minutes
- Date and Time Built-in Functions•3 minutes
- Sub-Queries and Nested Selects•5 minutes
- Working with Multiple Tables•6 minutes
6 readings•Total 22 minutes
- [Optional] Hands-on Labs Using IBM Db2•1 minute
- Summary: Refining Your Results•5 minutes
- SQL Cheat Sheet: Intermediate - LIKE, ORDER BY, GROUP BY•5 minutes
- [Optional] Hands-on Labs Using IBM Db2•1 minute
- Summary: Functions, Multiple Tables, and Sub-queries•5 minutes
- SQL Cheat Sheet: FUNCTIONS and Implicit JOIN•5 minutes
4 assignments•Total 50 minutes
- Practice Quiz: Refining Your Results•10 minutes
- Practice Quiz: Functions, Multiple Tables, and Sub-queries•10 minutes
- Graded Quiz: Refining Your Results•15 minutes
- Graded Quiz: Functions, Multiple Tables, and Sub-queries•15 minutes
4 app items•Total 90 minutes
- Hands-on Lab: String Patterns, Sorting and Grouping•30 minutes
- Hands-on Lab: Built-in functions•20 minutes
- Hands-on Lab: Sub-queries and Nested Selects•20 minutes
- Hands-on Lab: Working with Multiple Tables•20 minutes
In this module you will learn the basic concepts of using Python to connect to databases. In a Jupyter Notebook, you will create tables, load data, query data using SQL magic and SQLite python library. You will also learn how to analyze data using Python.
What's included
6 videos3 readings2 assignments7 app items
6 videos•Total 33 minutes
- How to Access Databases Using Python•6 minutes
- Writing code using DB-API•6 minutes
- Accessing Databases with SQL Magic•6 minutes
- Analyzing data with Python•10 minutes
- Connecting to a database using ibm_db API•2 minutes
- Creating tables, loading data and querying data•4 minutes
3 readings•Total 13 minutes
- Summary: Accessing databases using Python•2 minutes
- SQL Cheat Sheet: Accessing Databases using Python•10 minutes
- [Optional] Hands-on Labs Using IBM Db2•1 minute
2 assignments•Total 25 minutes
- Practice Quiz: Accessing Databases using Python•10 minutes
- Graded Quiz: Accessing databases using Python•15 minutes
7 app items•Total 200 minutes
- Hands-on Lab: Creating tables, inserting and querying Data•20 minutes
- Hands-on Tutorial: Accessing Databases with SQL magic•20 minutes
- Hands-on Lab: Analyzing a Real-World Data Set•45 minutes
- (Optional) Db2 Lab: Connecting to a database instance•20 minutes
- (Optional) Db2 Lab: Creating tables, inserting and querying Data•30 minutes
- (Optional) Db2 Lab: Tutorial, Accessing Databases with SQL magic•20 minutes
- (Optional) Db2 Lab: Analyzing a real World Data Set•45 minutes
In this module, you will be working with multiple real-world datasets for the city of Chicago. You will be asked questions that will help you understand the data just as you would in the real world. You will be assessed on the correctness of your SQL queries and results.
What's included
2 videos4 readings2 assignments3 app items
2 videos•Total 8 minutes
- Working with Real World Datasets•6 minutes
- Getting Table and Column Details•2 minutes
4 readings•Total 5 minutes
- Summary and Highlights•1 minute
- [Optional] Hands-on Labs Using IBM Db2•1 minute
- Congratulations & Next Steps•2 minutes
- Thanks from the Course Team•1 minute
2 assignments•Total 60 minutes
- Graded Quiz on Assignment•30 minutes
- Final Exam•30 minutes
3 app items•Total 105 minutes
- Hands-on Lab: Working with a real world data-set•30 minutes
- (Optional)Hands-on Lab: Practice Querying Real World Datasets•45 minutes
- Final Assignment: Database Querying using SQLite•30 minutes
This module covers some advanced SQL techniques that will be useful for Data Engineers. In this module, you will learn how to build more powerful queries with advanced SQL techniques like views, transactions, stored procedures, and joins. If you are following the Data Engineering track, you must complete this module. Completion of this module is not required for those completing the Data Science or Data Analyst tracks.
What's included
6 videos6 readings2 assignments4 app items
6 videos•Total 24 minutes
- Views•4 minutes
- Stored Procedures•4 minutes
- ACID Transactions•4 minutes
- Join Overview•4 minutes
- Inner Join•3 minutes
- Outer Joins•6 minutes
6 readings•Total 29 minutes
- About this Bonus Module•2 minutes
- [Optional] Hands-on Labs Using IBM Db2•2 minutes
- Summary: Views, Stored Procedures, and Transactions•5 minutes
- SQL Cheat Sheet: Views, Stored Procedures and Transactions•10 minutes
- Summary: JOIN Statements•5 minutes
- SQL Cheat Sheet: JOIN Statements•5 minutes
2 assignments•Total 20 minutes
- Practice Quiz: Views, Stored Procedures, and Transactions•10 minutes
- Practice Quiz: Join Statements•10 minutes
4 app items•Total 80 minutes
- Hands-on Lab: Using Views•20 minutes
- Hands-on Lab: Stored Procedures•20 minutes
- Hands-on Lab: Committing and Rolling Back a Transaction•20 minutes
- Hands-on Lab: Joins•20 minutes
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV. Share it on social media and in your performance review.
Instructors


Offered by
Why people choose Coursera for their career

Felipe M.

Jennifer J.

Larry W.

Chaitanya A.
Learner reviews
22,747 reviews
- 5 stars
75.37%
- 4 stars
18.29%
- 3 stars
3.82%
- 2 stars
1.09%
- 1 star
1.40%
Showing 3 of 22747
Reviewed on Dec 27, 2019
Course is god enough. However the last assessment is not. Misprints and not clear questions lead to disappointing marks in the end. Also other students marked assessments based on their understanding.
Reviewed on Apr 25, 2023
Great course easy to follow, very good notes, videos and guidance on how to complete the assignments. This is a great introduction course to begin your knowledge and training to be a Data Scientist.
Reviewed on Dec 24, 2019
One of the best course I completed on Coursera. All the learning material is well organised and easy to understand. Also the non-graded sections regarding relational databases are interesting.
What brings you to Coursera today?
Advance your career with an online degree
Earn a degree from world-class universities - 100% online
Frequently asked questions
To access course materials, assignments, and earn a Certificate, you'll need to purchase the Certificate experience when you enroll in a course. Eligible learners may also have the option to start with a Free Trial. Some courses may also offer a Full Course, No Certificate option. This lets you access course materials, submit required assessments, and receive a final grade, but you won't be able to earn or purchase a Certificate.
When you enroll in the course, you get access to all of the courses in the Certificate, and you earn a certificate when you complete the work. Your electronic Certificate will be added to your Accomplishments page - from there, you can print your Certificate or add it to your LinkedIn profile.
More questions
Financial aid available,
¹ Some assignments in this course are AI-graded. For these assignments, your data will be used in accordance with Coursera's Privacy Notice.



