Give an AI application a real storage design. You turn Larkfield's ticket API into a service that owns its data in PostgreSQL, keeps files in object storage and vectors next to the records, stays fast on large data, and can be restored after a mistake.
Read every lesson as a guest, or sign in to enroll and track your progress.
Enroll to save the lessons that you complete. It is free.
To get your certificate, mark every knowledge check as matching. These lessons have checks to finish:
What you'll learn
By the end of this course, you will be able to:
Choose storage based on access patterns.
Design a relational schema with integrity constraints.
Diagnose slow queries and manage connections.
Store files and vectors with clear ownership and lifecycle rules.
About this course
An AI application stores more than one kind of data. Larkfield, the made-up online shop for home and garden products from the SQL course, has a help desk. It keeps customers and tickets, the photos and receipts that customers attach, the documents its assistants read, a record of every model run with its cost, and vectors for finding similar tickets. Each kind has a different shape, size and lifetime, and each one can be lost or corrupted in its own way.
In this course, you give Larkfield’s ticket API a real storage design, one change at a time. You decide what goes where. You design tables whose rules reject bad data. You call the database from the API through a connection pool, with safe queries and short transactions. You make a slow list endpoint fast and prove it with measurements on large data.
Then you add files and vectors with clear owners. Files go to object storage, and the database keeps their details. Vectors live next to the records they describe, with a version. Finally, you restore a backup to prove that it works, and you delete a customer’s data from every store.
Everything runs on your computer: PostgreSQL with pgvector (an extension that stores vectors), an object-storage emulator and a made-up dataset that is large enough to be slow. Every query plan and timing in the lessons comes from a real run.
Before you start
You completed SQL and Data Preparation for AI and Build and Deploy Your First API, or you have the same skills. The Docker and CI/CD courses are useful but not required. You do not need an account or money. PostgreSQL, the object storage and the embeddings all run on your computer, with Docker or without it.
People who can write SQL and build a small API, as in SQL and Data Preparation for AI and Build and Deploy Your First API, and now need to store an AI application's data safely. Developers, data scientists and data engineers moving into AI engineering.
How we made this course
Experienced AI practitioners designed this course. AI helped us draft the content; people chose the teaching approach and the examples, and reviewed every lesson. The outputs that you see are the actual results of running the code. How we make our courses
Inside the course
Module 1Choose storage by workload
4 lessons
Choose storage by how the data is used. Move from a SQLite file to a PostgreSQL server, list the help desk's access patterns, compare four kinds of store, and decide which store keeps the original of each piece of data.
Design a schema that protects itself. Model customers, tickets, files, documents and AI runs, let constraints reject duplicates and orphans, and use transactions so that a change happens completely or not at all.
Call the database safely from the API. Use parameters instead of string building, share connections through a pool, keep transactions short, and change the schema with migrations tested on large data.
Make a slow endpoint fast, with proof. Read query plans, add the one index a query needs and measure what it costs, and return pages instead of whole tables.
Store files and vectors with clear owners. Upload and download files with signed links, search similar tickets with pgvector, and practise a restore and a deletion that reaches the database, the files and the vectors.
Two end-to-end case studies on open data. Design and tune storage for a large public dataset, and build vector search over an open document collection. Complete at least one for the certificate; each one is a portfolio piece.
Complete at least one case study for the certificate. The others are optional. What each one covers
Realistic projects from start to finish, on real data, with every output explained. Each one makes a portfolio piece. Complete at least one for the certificate; the others are optional.
Load a large open public dataset into PostgreSQL with a schema and constraints, list its access patterns, and measure index and pagination improvements on its real queries.
Store embeddings of an open document collection in pgvector, compare exact and approximate search on recall and time, filter by metadata, change the embedding version and delete a document everywhere.
Reviews
Loading the reviews…
Took this course? Sign in to review it. Learners can write a review after they complete 25% of the lessons.