CourseAI Engineering: The Complete Course · Module 11: Data Stores · part 84 of 105
Part 84 · Module 11: Data Stores

Lesson 2: PostgreSQL for the assistant's real data

19 min read·13 Oct 2026
Module 11 · Lesson 2 · About 50 minutes · Needs: Lesson 1 (SQL in SQLite), Module 8 Lesson 2 (embeddings and vector search)

The situation

Dev is moving BrightCart's assistant off Lesson 1's SQLite file. The Module 10 service runs as several processes, and the article embeddings sit in a separate vector store. He wants one PostgreSQL database for orders, tickets and vectors.

This lesson runs a real PostgreSQL 16 in the notebook and follows one ticket through it: Aisha Rahman's "The vacuum stopped charging after 3 months.", about order 5521. You will pool connections, migrate its table, fetch orders concurrently, search articles by meaning and by words, and filter its metadata.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.