Module 07 of 10

Databases & ORMs

Lessons

About This Module

Almost every real application needs to store data somewhere: users, orders, messages, settings. Databases give you a reliable way to save that data and ask questions about it later, and SQL is the language used to do it.

You'll start with SQL fundamentals, then use Python's built-in sqlite3 module to create a database, insert, select, update, and delete data. From there you'll move up to an ORM (Object-Relational Mapper): SQLAlchemy lets you work with tables as Python classes instead of writing raw SQL, and you'll see how it plugs into a web app with Flask-SQLAlchemy.

With your data layer in place, you'll be ready for the next module, Web Frameworks & APIs, where you'll build web applications on top of it.

Lessons

4 videos
01

SQL Tutorial - Full Database Course for Beginners

A full introduction to relational databases and SQL: creating tables, inserting and querying data, joins, and designing a database schema.

02

Python SQLite Tutorial: Complete Overview - Creating a Database, Table, and Running Queries

How to use the built-in sqlite3 module: creating a database and a table, then inserting, selecting, updating, and deleting data from Python.

03

SQLAlchemy: The BEST SQL Database Library in Python

What an ORM is and why SQLAlchemy is so popular: defining models as Python classes, connecting to a database, and querying without writing raw SQL.

04

Python Flask Tutorial: Full-Featured Web App Part 4 - Database with Flask-SQLAlchemy

How to add a database to a web app with Flask-SQLAlchemy: creating models, defining relationships, and adding and querying data.