SQL
The standard language for defining, querying and changing data in a relational database.
In more detail
SQL stands for Structured Query Language. It is declarative: you describe the result you want and the database decides how to fetch it, which is why a query keeps working as data grows. The core is an international standard, and every database adds its own extensions, so SQL written for one database may need changes for another.
Examples
In AWS: The standard language for defining, changing and querying data in relational databases.In the course, SELECT, INSERT, WHERE and ORDER BY queries run against a small SQLite database kept in memory.Mocks cannot prove SQL behaviour; Testcontainers can.INSERT INTO orders (item) VALUES ('keyboard')Many SIEM query languages can express the same joins and counts that SQL does, so a detection written as SQL, such as successes after five failures from one address, translates readily.The SQL course marks every place where SQLite and PostgreSQL differ.In this course: Each database engine speaks its own dialect of SQL, so a query that works against a fake or a different engine can still fail against the real one. That is one of the main reasons to test with a real database.Related terms
- database — A program that stores data in an organised way and answers questions about it, such as PostgreSQL.
- SQL injection — An attack where untrusted input is joined into a database query so that part of it runs as SQL, letting an attacker read or change data.
- parameterised query — A database query written with placeholders, such as WHERE id = ?, whose values are sent separately so they can never be read as SQL.
- relational database — A database that stores data in tables and links rows in one table to rows in another through shared key values.
- SELECT — The SQL statement that reads data: it names the columns you want in the answer and, with FROM, the tables they come from.
- Amazon Athena — An AWS service that runs SQL queries directly over files in S3, such as CloudTrail logs, charging by data scanned.
- WHERE clause — The part of a query that keeps only the rows for which a condition is true.
- Entity Framework Core — Microsoft's object-relational mapper for .NET, which lets code query and save database data as C# objects and translates LINQ into SQL.
- ORM — A library that lets code read and write database rows as ordinary objects, generating the SQL for you.
- repository pattern — Putting all the code that reads and writes one kind of data behind a single object, so the rest of the app never talks to the database directly.
- query — A request to a database for data, written in SQL, that returns a set of rows as its answer.
- SQLite — A small relational database that runs as a library inside your program and keeps the whole database in one file.
- PostgreSQL — A widely used open source relational database server with strict typing, rich data types and extensions.
- prepared statement — A SQL statement with placeholders, such as ?, whose values are sent separately from the SQL text instead of pasted into it.
- custom query — A repository query written out explicitly, usually with Spring Data's @Query annotation, instead of being derived from the method name.
- psql — PostgreSQL's interactive command-line client for running SQL statements.
- join — Combining rows from two tables into one result by pairing rows according to a rule, usually matching keys.
- transaction — A group of database changes that succeed or fail together, so the data is never left half-updated.
- database engine — The database software itself, such as PostgreSQL, MySQL or SQLite, which decides the features, SQL dialect and extensions available.
- variadic tuple — A tuple type containing a spread such as [query: string, ...params: (string | number)[]], so its length can vary.
Taught in
- Embedding Models — AI Engineering: LLM Apps, RAG & Agents
- Filtering And Searching — Modern API Architecture: REST, GraphQL & gRPC
- Security Best Practices — Modern API Architecture: REST, GraphQL & gRPC
- Seven Ways To Leave A Rack — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- The Estimate That Copied The Rack — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Twelve Alerts, Ten Services — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Security Sprint: Fifteen Questions' Worth — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- One Database Doing Five Jobs — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Nine Wishes On The Backlog — AWS Certified Cloud Practitioner (CLF-C02) Exam Prep
- Auditing: Who Opened Port Twenty Two? — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- The Full Mock And Your Review Plan — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- The Edge: WAF, Shield, CloudFront And GuardDuty — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Database Performance: Caches, Proxies And Capacity Units — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Ingest And Transform: Streams, Lakes And Partitions — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Cost Governance: Tags, Budgets And Reports That Speak Up — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- The Full Mock And Your Review Plan — AWS Certified Solutions Architect – Associate (SAA-C03) Exam Prep
- Twenty Minutes Down At Lunchtime: App Service Plans And Slots — Microsoft Azure Administrator (AZ-104) Exam Prep
- Port 22 Answers From The Internet: NSGs And Application Security Groups — Microsoft Azure Administrator (AZ-104) Exam Prep
- Healthy, Said The Load Balancer: Azure DNS And Load Balancing — Microsoft Azure Administrator (AZ-104) Exam Prep
- The Reports Stopped On Friday: Troubleshooting With Network Watcher — Microsoft Azure Administrator (AZ-104) Exam Prep
- When Did It Start, And What Changed? KQL For Administrators — Microsoft Azure Administrator (AZ-104) Exam Prep
- Restore It From Last Tuesday: Backup Vaults, Policies And Site Recovery — Microsoft Azure Administrator (AZ-104) Exam Prep
- Deploying With Less Downtime — Microsoft Azure DevOps Engineer Expert (AZ-400) Exam Prep
- IaaS, PaaS And SaaS On Azure — Microsoft Azure Fundamentals (AZ-900) Exam Prep
- Zero Trust, Defence In Depth And Defender For Cloud — Microsoft Azure Fundamentals (AZ-900) Exam Prep
- Managed Relational Databases (RDS) — Cloud Infrastructure & Hyperscaler Architecture
- Thirty Eight Percent More: Billing Models And Tags — CompTIA Cloud+ (CV0-004) Exam Prep
- Allowed In, Lost On The Way Back: Security Controls — CompTIA Cloud+ (CV0-004) Exam Prep
- Shift-Left Security Principles & Automated Pipeline Gates — Cloud Security & DevSecOps Engineering
- Static Application Security Testing with Semgrep — Cloud Security & DevSecOps Engineering
- Collections, Generics, and LINQ — Modern .NET Core, C# & Enterprise Microservices
- Entity Framework Core: Code First and Migrations — Modern .NET Core, C# & Enterprise Microservices
- Querying, Change Tracking, and Saving Data — Modern .NET Core, C# & Enterprise Microservices
- Database Access & Migrations: ORM & Data Layers — Production Full-Stack Engineering
- Multi-Tenant Identity: Tenant Isolation & Middleware — Production Full-Stack Engineering
- Data And Storage Products — Google Cloud Associate Cloud Engineer Exam Prep
- Tooling: Infrastructure As Code And AI Assistants — Google Cloud Associate Cloud Engineer Exam Prep
- Running Storage And Data — Google Cloud Associate Cloud Engineer Exam Prep
- Monitoring And Logging — Google Cloud Associate Cloud Engineer Exam Prep
- Service Accounts — Google Cloud Associate Cloud Engineer Exam Prep
- The gcloud And Product-Name Sprint — Google Cloud Associate Cloud Engineer Exam Prep
- Adding GitLab's Security Scanners To A Pipeline — GitLab Certified CI/CD Associate Exam Prep
- Reading Security Results: The Merge Request And The Vulnerability Report — GitLab Certified CI/CD Associate Exam Prep
- Security Testing: Red, Blue And Purple — ISC2 Certified in Cybersecurity (CC) Exam Prep
- Database Integration With Testcontainers — Modern Java: Virtual Threads & High-Throughput Services
- Dual Writes And Why They Lose Data — Apache Kafka & Event Streaming
- The Transactional Outbox — Apache Kafka & Event Streaming
- Change Data Capture In Principle — Apache Kafka & Event Streaming
- Request Memoization: Automatic Deduplication Tiers — Next.js 15 & Modern App Router Architecture
- Fifty Five In, Fifty Two Out: Transforming Data — OpenTelemetry Certified Associate (OTCA) Exam Prep
- Post-Incident Review & Root Cause Analysis — Security Operations & Threat Hunting (SOC)
- Injection In All Its Forms — Application Security & Threat Modeling for Engineers
- SQL Injection: The Exploit — Application Security & Threat Modeling for Engineers
- SQL Injection: The Fix — Application Security & Threat Modeling for Engineers
- Simulation: Attacks In The Logs — CompTIA Security+ (SY0-801) Exam Prep
- Why Tables And Relations Beat Files — PostgreSQL, Indexing & Relational Data Modeling
- Data Types And What To Choose — PostgreSQL, Indexing & Relational Data Modeling
- The Storage Decision: Relational Versus Document — Scalable System Design & Distributed Architecture
- The Storage Decision: Key Value, Search And Blob — Scalable System Design & Distributed Architecture
- Cache Invalidation And The Three Hard Cases — Scalable System Design & Distributed Architecture
- Idempotency, And Exactly Once As A Fiction — Scalable System Design & Distributed Architecture
- Monolith Versus Services: The Honest Trade Offs — Scalable System Design & Distributed Architecture
- Worked Design One: Ticket Booking, Correctness First — Scalable System Design & Distributed Architecture
- Integration Testing With Containers — Automated Testing, TDD & Quality Engineering
- Testing With Real Databases — Automated Testing, TDD & Quality Engineering
- Tuples: Fixed Length, Labeled Elements And Variadic Tuples — Production TypeScript
References
- PostgreSQL docs: The SQL language
- SQLite: SQL as understood by SQLite
- Prisma Data Guide: What is an ORM?
- MDN Web Docs glossary: SQL
- PostgreSQL documentation: Transactions (tutorial)
- PostgreSQL: SQL conformance
- PostgreSQL: PREPARE
Certification courses
- AWS AIP-C01 course and practice exam: AI engineering with LLM apps, RAG and agents
- AWS Cloud Practitioner course and practice exam: CLF-C02
- AWS DevOps Engineer Professional course and practice exam: DOP-C02
- AWS Solutions Architect Associate course and practice exam: SAA-C03
- AZ-104 course and practice exam: Microsoft Azure Administrator
- AZ-400 course and practice exam: Microsoft Azure DevOps Engineer Expert
- AZ-900 course and practice exam: Microsoft Azure Fundamentals
- CompTIA Cloud+ course and practice exam: CV0-004
- Google Associate Cloud Engineer course and practice exam: Google Cloud certification
- GitLab CI/CD Associate course and practice exam: GitLab Certified CI/CD Associate
- ISC2 CC course and practice exam: Certified in Cybersecurity
- OTCA course and practice exam: OpenTelemetry Certified Associate
- CompTIA Security+ course and practice exam: SY0-801