Mô tả

This comprehensive course is designed for users who have some knowledge of SQL, and it aims to teach you how to leverage the power of SQLAlchemy and Alembic to streamline your work with databases. By learning the techniques taught in this course, you will have a better understanding of Object Relational Mapping (ORM), how to create and manipulate database tables using Python, and how to manage and track changes using Alembic migrations.


Throughout the course, you will gain hands-on experience by working on various practical examples and exercises. The course will be easy to follow, with a focus on making complex tasks easier to understand and apply in your own projects.


Key topics include:


1. Introduction to SQLAlchemy and Alembic

    - Overview of SQLAlchemy and its benefits

    - Getting started with Alembic for database migrations


2. Creating tables with SQLAlchemy

    - Declarative base and table class creation

    - Working with different column types and constraints

    - Using Mixin classes to reuse column and key definitions


3. Working with data using ORM

    - Inserting, updating, and deleting rows

    - Querying data and using filtering options

    - Working with relationships and joins.


4. Handling schema changes and migrations with Alembic

    - Setting up an Alembic environment and configuration

    - Generating, reviewing, and customizing migration scripts

    - Upgrading and downgrading database schemas


5. Advanced SQLAlchemy features

    - Query optimizations

    - Building complex queries

    - Managing transactions and session handling


6. Best practices and real-world case examples

    - Implementing reusable patterns

    - Scaling and performance considerations

    - Common SQLAlchemy pitfalls and solutions


Upon completion of this course, you will have a strong foundation in using SQLAlchemy and Alembic to manage your databases effectively. You will be equipped with the skills necessary to create and manipulate databases with ease, enabling you to bring value to your projects and organization.

Bạn sẽ học được gì

Understand the fundamentals of SQLAlchemy and Object Relational Mapping (ORM) in Python

Create, define, and manage database tables using SQLAlchemy's ORM

Utilize Alembic, a database migration tool for SQLAlchemy, to create, manage, and track changes in their database schema

Apply best practices for using SQLAlchemy and Alembic in real-world projects

Yêu cầu

  • Basic Python programming knowledge: Understanding of Python data types, functions, classes, and syntax is essential for following the tutorial.
  • Familiarity with SQL: Learners should have a basic understanding of SQL concepts like tables, primary keys, foreign keys, and CRUD operations (Create, Read, Update, and Delete).
  • Object-Oriented Programming (OOP) understanding: Since the tutorial uses Object Relational Mapping (ORM) for creating tables, having some experience with OOP and Python classes would be beneficial.
  • Python environment: Learners should have a Python development environment set up on their machine (Python 3.x and pip) or have access to a Jupyter Notebook environment where they can install packages and run code snippets as demonstrated in the tutorial
  • Database access: Access to a PostgreSQL database server for hands-on practice is crucial. Familiarity with creating databases and user accounts would be useful but not required, as it can be learned along the way.

Nội dung khoá học

6 sections

Introduction and Setup

6 lectures
Introduction to the course
03:48
Introduction to SQLAlchemy and Alembic
5 questions
Section 1 - Jupyter Notebook
00:03
Setting Up Virtual Environment and Required Libraries
05:55
Setting Up PostgreSQL with Docker
03:55
Establishing Database Connection
11:50

Working with Tables

6 lectures
Section 2 - Jupyter Notebook
00:03
Executing Your First Queries
11:29
Introduction to Creating Tables
14:02
Creating the User Table
12:35
Utilizing Mixins in SQLAlchemy
05:51
Annotated Column Creation and Additional Tables
13:59

Alembic for Database Management

5 lectures
Section 3 - Jupyter Notebook
00:03
Using SQLAlchemy to Create Tables in the Database
10:12
Getting Started with Alembic
13:47
Creating Your First Database Migrations
15:15
Modifying the Database Structure with Alembic
11:49

Querying with SQLAlchemy ORM

9 lectures
Section 4 - Jupyter Notebook
00:03
Insert Queries Using the ORM
11:17
Advanced Select Queries with SQLAlchemy ORM
12:28
Combining Insert, Select and Update in a Single Query
05:16
Seeding Initial Data to Database
11:03
Establishing Relationships in Tables
10:00
ORM JOIN Queries (INNER, OUTER)
08:08
Advanced Select Queries with Joins with SQLAlchemy ORM
15:28
Aggregated Queries using SQLAlchemy
08:49

Modifying Data with ORM

4 lectures
Section 5 - Jupyter Notebook
00:03
Update Queries with ORM
02:19
Delete Queries with ORM
01:08
Bulk Insert Operations with ORM
06:32

Advanced Topics

2 lectures
Migrating to Asynchronous Mode
09:22
Section 6 - Jupyter Notebook
00:03

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.