Training course · OpenAI Codex · SQL & Databases

OpenAI Codex for SQL and Database Professionals

Delegate development work with OpenAI Codex: CLI and cloud agent, AGENTS.md, sandboxing, approvals and team PR workflows.

Duration
2 days (14 hrs)
Format
Online or on-site
Language
German or English
Participants
open dates or exclusive for your team
Certificate
Certificate of attendance

Overview

“OpenAI Codex for SQL and Database Professionals” is designed for roles such as Database and SQL developers, Database administrators for PostgreSQL, SQL Server, Oracle or MySQL and Backend developers responsible for data models and ORM layers and shows step by step how to use OpenAI Codex productively, safely and transparently in SQL & Databases – from the fundamentals to advanced workflows.

OpenAI Codex is a coding agent that runs both locally, as a command-line tool and IDE extension, and as a cloud agent. Locally, Codex reads your repository, proposes changes and runs commands inside a sandboxed environment. In the cloud, it works on delegated tasks in parallel inside isolated containers and returns results as traceable diffs or pull requests. Over two days you will learn how to combine both modes effectively and how to scope tasks so that the agent can complete them reliably and with minimal back-and-forth.

Control and security sit at the heart of the course. With AGENTS.md you hand Codex project knowledge, build and test commands, and conventions. You configure approval modes and sandboxing so that the agent only does what you permit, and you set up cloud environments with suitable setup scripts. You will also integrate Codex into your pull request workflows, use automated code review, and define team rules on which tasks are delegated and how results are checked before they are merged into the main branch.

Databases are the memory of every application, and their performance, consistency and security determine whether entire systems succeed. AI coding assistants and agents support database developers and DBAs in writing complex queries, reading execution plans, designing schemas and index strategies and migrating between database platforms. They translate business questions into SQL, refactor sprawling stored procedures and generate test data. One principle still holds: a syntactically valid query is not necessarily a correct one, and an agent with write access to production data is a serious risk. In this course you learn to use AI productively with schema context, execution plans and tests, and to design access so that your data stays protected at all times.

The course is delivered live – either online in a virtual classroom or on-site in our training rooms in Munich, Salzburg, Berlin, Augsburg, Hanover, Bremen, Stuttgart and Kaiserslautern. We can also run it exclusively for your team.

Who is this course for?

  • Database and SQL developers
  • Database administrators for PostgreSQL, SQL Server, Oracle or MySQL
  • Backend developers responsible for data models and ORM layers
  • Data engineers and analytics engineers
  • BI developers working with complex reporting queries

Typical challenges we address

  • Slow queries and load spikes whose causes are hidden in execution plans
  • Sprawling stored procedures and triggers without documentation or tests
  • Risky schema changes and migrations on live systems
  • Different SQL dialects during platform changes or in multi-database estates

What you will be able to do

  • You use Codex locally and in the cloud for the development tasks each mode suits best.
  • You write an AGENTS.md that guides the agent reliably through your project.
  • You configure approval modes and sandboxing to match your security requirements.
  • You delegate tasks to the cloud agent and review the results systematically.
  • Optimise queries and indexes with AI support based on execution plans rather than guesswork.
  • Plan and test schema changes and database migrations using generated scripts and rollback strategies.
  • Design database access for AI agents securely, with least privilege, read replicas and traceable queries.

Course outline

Day 1

Module 1 Codex at a glance: CLI, IDE and cloud
  • Comparing how Codex works locally and in the cloud
  • Installing the Codex CLI, signing in and starting it in a repository
  • Interactive sessions, non-interactive execution and model choice
  • Distinguishing tasks that suit a coding agent from those that do not
Module 2 Project knowledge with AGENTS.md
  • Building an AGENTS.md with build, test and lint commands
  • Stating conventions, architectural notes and prohibitions precisely
  • Using nested AGENTS.md files for monorepos and sub-projects
  • Checking effectiveness and refining instructions iteratively
Module 3 Sandboxing, approvals and security
  • Choosing approval modes deliberately, from read-only to largely autonomous
  • Understanding sandbox boundaries for file system and network access
  • Handling secrets, dependencies from the internet and prompt injection
  • Configuration files for team standards and safe defaults
Module 4 Delegating tasks to the cloud agent
  • Configuring cloud environments with setup scripts and dependencies
  • Writing tasks with a clear goal, context and acceptance criteria
  • Launching several tasks in parallel and comparing the results
  • Using logs and test output to understand the proposed solutions

Day 2

Module 5 PR workflows and code review in the team
  • Turning results into pull requests and requesting follow-up changes
  • Using automated Codex code review on GitHub
  • Embedding Codex in scripts and CI pipelines
  • Setting team rules for delegation, review duties and accountability
Module 6 Practice lab: SQL & Databases
  • Optimising SQL queries
  • Designing and reviewing schemas
  • Refactoring stored procedures
  • Planning migrations safely
  • Translating dialects
  • Generating test data
Module 7 Data protection, quality & transfer to daily work
  • Databases often hold personal and business-critical data: you learn to give AI tools schemas and anonymised samples instead of production data, manage credentials securely and implement GDPR requirements such as data minimisation and deletion policies.
  • Ground rules for safe AI use in your team
  • Checking results: facts, sources, tests and the four-eyes principle
  • Personal action plan for the next 30 days
  • Open questions, outlook and resources for further learning

Practical scenarios from your field

Optimising SQL queries

Have execution plans from EXPLAIN ANALYZE or Query Store interpreted, identify bottlenecks such as full table scans or poor join orders and get rewritten queries and suitable indexes with a clear rationale.

Designing and reviewing schemas

Derive normalised data models with keys, constraints and data types from requirements, review existing schemas for redundancy and missing integrity rules and generate ER diagrams.

Refactoring stored procedures

Explain large PL/SQL or T-SQL procedures, convert cursor loops into set-based logic, standardise error handling and add tests with frameworks such as tSQLt or pgTAP.

Planning migrations safely

Generate versioned migration scripts for Flyway or Liquibase, design zero-downtime strategies such as expand and contract and assess rollback paths as well as effects on locking and replication.

Translating dialects

Migrate queries, functions and data types between Oracle, SQL Server, PostgreSQL and MySQL, account for differences in date functions, sequences and transaction behaviour and test for identical results.

Generating test data

Create realistic synthetic datasets that respect constraints, distributions and edge cases without using personal production data, for load tests and development environments. Generators live in the repository under version control.

Possible hands-on projects

Slow query analyser

A script that processes the slow query log or statistics views, groups the most expensive queries and reports concrete index and rewrite suggestions.

Schema documentation generator

A tool that reads a database schema and produces searchable documentation with table descriptions, relationships and an ER diagram. It refreshes automatically after each migration.

Text-to-SQL assistant

A small web app with read-only access to a reporting database that turns business questions into checked SQL and shows both query and result transparently.

Prerequisites

You have hands-on programming experience, are comfortable with Git and the command line, and know pull-request-based workflows. You write SQL regularly, understand joins, aggregations and indexes and work with at least one relational database system.

Technical requirements

Your own laptop with a terminal, Git and a Node.js runtime; a ChatGPT plan with Codex access or an OpenAI API key, plus a GitHub account for the cloud exercises.

Data protection & compliance

Databases often hold personal and business-critical data: you learn to give AI tools schemas and anonymised samples instead of production data, manage credentials securely and implement GDPR requirements such as data minimisation and deletion policies.

Suggested dates

All dates are suggestions – your preferred date is always possible.

  • Tue, 24 November 2026 – Wed, 25 November 2026 Online Request
  • Mon, 30 November 2026 – Tue, 1 December 2026 Hanover Request
  • Tue, 15 December 2026 – Wed, 16 December 2026 Online Request
  • Tue, 12 January 2027 – Wed, 13 January 2027 Online Request
  • Tue, 19 January 2027 – Wed, 20 January 2027 Munich Request
  • Wed, 3 February 2027 – Thu, 4 February 2027 Online Request

Frequently asked questions

When should I use Codex locally and when in the cloud?

Locally you work interactively and close to the code, for example when debugging or making exploratory changes where you want to follow every step. The cloud agent suits well-defined tasks that can run independently, such as adding tests or fixing smaller bugs. You can start several of these in parallel and review each one as a pull request.

What belongs in a good AGENTS.md?

A good AGENTS.md explains how the project is built, tested and checked, which conventions apply and which areas must not be touched. It is concise, concrete and kept up to date. Notes on architecture and common pitfalls also help. During the course you write an AGENTS.md for a project of your own and test how it changes the agent’s behaviour.

How safe is it to let Codex run commands?

By default Codex works inside a sandbox with restricted file and network access and asks for approval before risky steps. You decide how much autonomy to grant through approval modes and configuration. In the course you learn to choose these settings deliberately and to limit risks such as prompt injection or running unfamiliar dependencies.

Should an AI agent access our database directly?

It can, but it needs careful planning. We recommend a dedicated read-only user, access to replicas or development databases rather than production, query timeouts and logging of every statement. Write changes go through versioned migration scripts with review. In the course you build exactly this safeguard, for instance through a restricted MCP server.

How reliable is AI-generated SQL?

It is usually syntactically correct, but semantic quality depends heavily on context: without the schema, relationships and business definitions, wrong joins or double counting creep in easily. With schema context, example queries and tests against known results, reliability rises considerably. You learn to validate generated queries systematically.

How much does “OpenAI Codex for SQL and Database Professionals” cost?

The course costs a flat €949 plus VAT per participant – whether online or on-site. This includes 2 training day(s) with a live trainer, course materials, a lab environment and a certificate of attendance.

Can I suggest my own date?

Yes. Our suggested dates are just a guide. In the request form you can always describe your preferred date or period in free text – we check availability and confirm within one working day.

Is the course online or on-site?

Both are possible: live online in a virtual classroom or on-site in Munich, Salzburg, Berlin, Augsburg, Hanover, Bremen, Stuttgart or Kaiserslautern. We can also run the course exclusively for your team.

More courses for SQL and Database Professionals

More OpenAI Codex courses

All 32 OpenAI Codex courses