Skip to content

SQL

SQL, short for Structured Query Language, is a declarative language for defining, querying, and modifying the data held in a relational database, where information is organized into tables of rows and columns.

Being declarative means a statement describes the desired result rather than the procedure to compute it. The database’s query planner decides how to satisfy the request, choosing indexes and join strategies automatically. The language traces back to the relational model that Edgar F. Codd formalized in 1970, and it was first standardized by ANSI in 1986 and by ISO in 1987.

SQL statements fall into a few families:

SQL branches into four statement families: data definition, data manipulation, queries, and transaction and access control.
The Four Families of SQL Statements
  • Data definition (CREATE, ALTER, DROP) sets up the tables and constraints that form a schema.
  • Data manipulation (INSERT, UPDATE, DELETE) changes the rows a table holds.
  • Queries (SELECT) read data back, often filtering, joining, and aggregating across several tables.
  • Transaction and access control (COMMIT, ROLLBACK, GRANT) govern durability and permissions.

Every major database ships its own SQL dialect that extends the standard, so a query written for one engine may need changes to run on another. Python programs reach relational databases through the DB-API, a common interface defined in PEP 249, and the standard library bundles the sqlite3 module for working with a self-contained SQL database.

Handling SQL Databases With PyQt: The Basics

Tutorial

Handling SQL Databases With PyQt: The Basics

In this step-by-step tutorial, you’ll learn how to use PyQt's built-in SQL support to create GUI applications that effectively manage SQL databases.

intermediate databases gui

For additional information on related topics, take a look at the following resources:

Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.


By Martin Breuss • Updated Sept. 29, 2026