Wirewalk Instituteof AI
dev-207 Intermediate Waitlist

SQL and Databases with AI: pgvector, In-Database AI and Text-to-SQL

For database developers and data engineers who need to store and search embeddings in SQL, call models from inside the database, and build text-to-SQL that is safe to point at real data.

The curriculum is being prepared and reviewed. Enrollment is not open yet.

About this course

Most enterprise data that AI features need sits in relational databases and warehouses, and the databases have moved to meet that need. PostgreSQL has pgvector (with HNSW and IVFFlat indexes, halfvec and sparsevec types, and iterative index scans) plus pgvectorscale; SQL Server 2025 has a native VECTOR type and AI_GENERATE_EMBEDDINGS; Oracle AI Database 26ai has AI Vector Search; and the cloud warehouses expose model calls as SQL functions, such as Snowflake Cortex AI Functions, BigQuery AI.GENERATE and Databricks ai_query.

This course teaches you to use these capabilities soundly. You will design vector columns and indexes, tune recall against latency, and combine vector similarity with full-text search and ordinary SQL filters. You will build embedding pipelines that keep vectors consistent with changing rows (triggers, queues or change data capture) now that one-step tools such as the Timescale pgai extension are no longer maintained. You will call models from SQL for classification, extraction and summarization at warehouse scale and control their cost. Then you will build text-to-SQL properly: schema and semantic-layer grounding, few-shot examples, read-only roles, query validation, row limits, and evaluation against your own question set, informed by public benchmarks such as Spider 2.0 and BIRD. Feature availability differs by product and some features (for example SQL Server 2025 vector indexes) are still in preview; all such facts are stated as of October 2026.

What you will be able to do

  • Design vector columns, choose an index type (HNSW, IVFFlat or DiskANN-style) and tune it for a target recall and latency in PostgreSQL with pgvector
  • Write hybrid queries that combine vector similarity, full-text ranking and relational filters, and explain how filtering interacts with approximate indexes
  • Build an embedding pipeline that keeps vectors in sync with source rows, including re-embedding when the model changes
  • Use in-database AI functions in at least one cloud warehouse to classify or extract from text at scale with a cost estimate
  • Build a text-to-SQL feature with schema grounding, a read-only execution role, query validation and result limits
  • Evaluate text-to-SQL accuracy with an execution-based test set and explain why public benchmark scores may not transfer
  • Compare vector and AI capabilities across PostgreSQL, SQL Server 2025, Oracle, MySQL HeatWave, SQLite and DuckDB for a given workload

Syllabus

5 modules · 16 lessons · about 14 hours

Module 1: Vectors as a Data Type

Storing embeddings in SQL and indexing them properly.
3 lessons
  1. pgvector fundamentals: vector, halfvec and sparsevec types and distance operators
  2. HNSW versus IVFFlat, pgvectorscale DiskANN, and reading EXPLAIN for vector queries
  3. Vectors beyond PostgreSQL: SQL Server 2025, Oracle AI Vector Search, MySQL HeatWave, sqlite-vec and DuckDB vss

Module 2: Search Patterns in SQL

Retrieval queries that real applications need.
3 lessons
  1. Filtered vector search and iterative index scans
  2. Hybrid search: combining full-text ranking and vector similarity with reciprocal rank fusion
  3. Multi-tenant schemas, partitioning and access control for embeddings

Module 3: Embedding Pipelines That Stay Correct

Generating and maintaining embeddings as data changes.
3 lessons
  1. Where to compute embeddings: application code, workers or database-side functions
  2. Keeping vectors in sync: triggers, queues and change data capture
  3. Model upgrades, re-embedding and dual-column migrations

Module 4: Calling Models from SQL

In-database and in-warehouse AI functions, and when to use them.
3 lessons
  1. AlloyDB AI and the Azure PostgreSQL azure_ai extension
  2. Snowflake Cortex AI Functions, BigQuery AI.GENERATE and Databricks ai_query
  3. Batch classification and extraction in SQL: prompts, structured output and cost control

Module 5: Text-to-SQL That You Can Trust

Natural-language query over production data without the usual failures.
4 lessons
  1. Schema grounding: metadata, semantic layers and curated examples
  2. Guardrails: read-only roles, statement validation, row limits and timeouts
  3. Database access for agents through MCP servers, and the risks involved
  4. Evaluating text-to-SQL: execution accuracy, your own test set and lessons from Spider 2.0 and BIRD

Exam and certificate

The exam unlocks once you have completed every lesson. It draws 20 questions from a larger bank, spread across the modules, with the answer options shuffled for each attempt. You have 40 minutes and need 80% to pass. After a failed attempt you can try again after 24 hours, up to 3 attempts in total. Feedback is given per module, never as the answer key.

Passing earns a certificate of completion and assessment from the Wirewalk Institute of AI with a unique ID that anyone can check at institute.wirewalk.com/verify. It is not an accredited qualification or a vendor certification. How certification works.

The Wirewalk Institute of AI is independent. This course teaches publicly documented products and is not affiliated with or endorsed by PostgreSQL (pgvector, pgvectorscale), Microsoft (SQL Server 2025, Azure Database for PostgreSQL), Oracle (Oracle AI Database 26ai), Google (AlloyDB AI, BigQuery), Snowflake (Cortex AI Functions), Databricks (AI Functions), MySQL HeatWave, SQLite (sqlite-vec), DuckDB, or Model Context Protocol. Product and company names are trademarks of their respective owners.

More in AI in Software Development

All 19 courses in this track
dev-001 Free intro Available

Your First AI API Call: A One-Hour Hands-On Start

A free, one-hour, hands-on start built on one realistic job: sorting a property manager's 1,150 monthly maintenance requests. You get an API key the safe way, make real calls with curl and an official Python SDK, run them over forty work orders, read stop reasons, usage and errors, estimate the monthly cost, and decide whether the script is ready. Exercises run on your own provider account for well under a dollar.

1 h · 7 lessons Free intro
dev-201 Intermediate Available

Python AI Integration: SDKs, Async, Pydantic, Packaging and Testing

A code-first course on integrating LLMs into Python the way production code needs it: uv projects and secrets, the OpenAI, Anthropic and Google GenAI SDKs side by side, async concurrency and streaming, Pydantic structured outputs and tools, retries, local models, embeddings and RAG, FastAPI and pandas integration, testing and evals with pytest, observability, cost tracking and deployment.

15 h · 19 lessons See price at checkout
dev-202 Intermediate Waitlist

Perl and AI: Modernizing Scripts and Text Pipelines with LLM APIs

Call OpenAI, Anthropic, Gemini and local Ollama models from Perl with real CPAN modules, add streaming, concurrency and validated JSON output to text pipelines, and use AI coding assistants to modernize legacy Perl behind characterization tests.

12 h · 18 lessons Join the waitlist