Title tag: Structured Query Language: SQL History, ANSI Standards, and T-SQL Meta description: Learn what SQL is, its 1974 IBM origins, how SQL Server 2025 extends the ANSI standard through T-SQL, and the client/server architecture every query travels through.


Database Concepts  «Prev  Next»

Lesson 5

Structured Query Language

Lesson 4 traced how a Razor Pages application actually reaches SQL Server 2025, through ADO.NET and, later, Entity Framework Core. This lesson looks at the language those access technologies ultimately speak once that connection is open: SQL itself, what it is, where it came from, and what SQL Server 2025 adds on top of it.

What SQL Is

Structured Query Language, SQL, is used to query, modify, and control data in a relational database system. IBM developed it in the early 1970s: Donald Chamberlin and Raymond Boyce published the paper introducing it in 1974 while working on System R, one of IBM's earliest relational database projects. It was originally named SEQUEL, a nod to QUEL, a rival query language from the Ingres project at UC Berkeley, before a trademark conflict led to the shorter name SQL that stuck. Half a century later, SQL remains the language every major relational database system speaks, including SQL Server, PostgreSQL, MySQL, and Oracle Database, the systems Lesson 3 compared directly.

SQL statements let an application programmatically retrieve[1] data from a database. In addition to retrieving data, SQL statements can update, insert, and delete records, the same CRUD operations Lesson 2 wrote directly against VirtualBookShelf's Customer table:
SELECT FirstName, LastName FROM Customer WHERE CustomerID = 3;

INSERT INTO Customer (FirstName, LastName, Email)
VALUES ('Miguel', 'Alvarez', 'malvarez@example.com');

UPDATE Customer SET Phone = '555-0199' WHERE CustomerID = 3;

DELETE FROM Customer WHERE CustomerID = 5;
Although SQL can be used on a single stand-alone machine, it's most commonly used in a client/server architecture, which the rest of this lesson looks at closely.

A Half-Century of Standardization

SQL didn't stay a single, fixed language after its 1974 debut. The American National Standards Institute first standardized it as SQL-86, and the standard has gone through several major revisions since, each one adding capability without breaking what came before: SQL-92 established the broad baseline most database systems still measure themselves against today, SQL:1999 added recursive queries and triggers, SQL:2003 introduced window functions for analyzing data across a set of rows, SQL:2006 added native XML support, and SQL:2016 added native JSON support, the same JSON capability SQL Server 2025 still relies on. The standard is maintained jointly by ANSI and ISO today, which is why it's sometimes called ANSI SQL and sometimes ISO SQL, referring to the same underlying standard.

That steady pace of standardization is part of why SQL has remained the dominant relational query language for over fifty years: a developer's core SQL knowledge, SELECT, WHERE, JOIN, stays valid across five decades of revisions and every major relational database system, even as each revision, and each vendor's own extensions on top of it, adds new capability around that stable core.

SQL Server 2025 and the ANSI SQL Standard

SQL Server 2025 is designed to be highly compliant with the ANSI SQL standard, which gives it broad compatibility with SQL written for other relational database systems. Like most database systems, though, it extends beyond that standard through Transact-SQL, T-SQL, Microsoft's own extension of SQL. T-SQL adds procedural programming capabilities, local variables, and extra support functions for string processing, date handling, and mathematics, none of which are part of the ANSI standard itself.

SQL Server's documented baseline is ANSI SQL-92 Entry Level compliance; its own JDBC driver exposes this directly through a metadata method named supportsANSI92EntryLevelSQL. T-SQL then builds well beyond that baseline with its own proprietary features. This combination occasionally produces behavior that differs from the bare ANSI standard. SQL Server, for instance, enforces strict adherence to the GROUP BY clause, requiring every non-aggregated column in a SELECT clause to also appear in the GROUP BY clause, which helps avoid ambiguous results. When writing an application or a query meant to behave predictably, it's worth consulting SQL Server's own documentation for exactly where T-SQL's extensions diverge from the bare ANSI standard, rather than assuming every database system interprets a given SQL statement identically.

Modern T-SQL: What SQL Server 2025 Adds Beyond the Standard

T-SQL's extensions aren't just historical. SQL Server 2025 adds several genuinely new capabilities that go well beyond the ANSI baseline, worth knowing about even before this course reaches hands-on SQL in Module 3:
  • A native VECTOR data type, for storing the kind of numeric embedding arrays AI and machine learning features rely on for similarity search, alongside a VECTOR_DISTANCE function for comparing how close two vectors are to each other. A future module of VirtualBookShelf could use this to power a "customers who liked this book also liked" feature, comparing book-description embeddings rather than matching on exact keywords.
  • Native regular expression functions, including REGEXP_LIKE for pattern-matching tests, REGEXP_REPLACE for pattern-based replacement, and REGEXP_SUBSTR for extracting a matched portion of a string, all built directly into T-SQL rather than requiring a workaround through CLR integration or application-side code.
  • JSON support, letting a single column store and query semi-structured data directly in T-SQL, useful for a value like a book's flexible metadata that doesn't cleanly fit a fixed set of columns.
  • WITH, introducing a common table expression (CTE), a named, temporary result set defined at the top of a query and then referenced inside it, including recursive CTEs that reference themselves to walk a hierarchy, such as book categories nested inside broader categories.
None of these four are part of the bare ANSI SQL standard; all four are T-SQL-specific capability SQL Server 2025 adds on top of it, exactly the pattern the previous section described in the abstract. This course won't need all of them right away, but recognizing that they exist, and why SQL Server keeps adding capability like this on top of a fifty-year-old standard, is part of understanding what "SQL Server 2025" actually means beyond just a version number.

The Query: SQL's Fundamental Concept

The query is the fundamental concept of SQL. A query is simply a request for information from a database. While a query can retrieve everything a database holds, it's far more commonly structured to request only the records that meet a specific criteria, the WHERE clause doing exactly that work in the examples above. Queries can be applied to a single database table, the way the examples above query Customer alone, or across multiple related tables at once, the kind of query a later lesson introduces once VirtualBookShelf's tables are formally related to each other.

SQL is most commonly used inside a client/server architecture. The client submits a request for data to the server; the server processes that request and returns results, if any, back to the client. More than one server can handle requests in this model too, which matters once an application grows beyond what a single database server can comfortably serve.

Anatomy of a Query

It's worth naming the parts of a typical SQL query before Module 3 starts writing many of them. Take one of the Customer queries from earlier in this lesson apart clause by clause:
SELECT FirstName, LastName
FROM Customer
WHERE LastName = 'Reynolds'
ORDER BY FirstName;
  • SELECT names the columns the query should return. A query can select specific columns, as above, or every column with SELECT *, though naming columns explicitly is almost always the better habit for an application's own code.
  • FROM names the table, or tables, the query reads from. A query touching more than one related table uses a JOIN here, a clause this course introduces once VirtualBookShelf's tables are formally related to each other.
  • WHERE filters which rows qualify, the same criteria-narrowing role Lesson 2's WHERE CustomerID = 3 played in an UPDATE statement.
  • ORDER BY controls the order results come back in, since, as Lesson 2 noted, a table has no guaranteed row order on its own.
Every SQL statement this lesson has shown, whether an INSERT, a SELECT, an UPDATE, or a DELETE, is built from a small set of clauses like these, combined in different ways depending on what the statement needs to do.

Web application architecture with SQL Server 2025 Two browser clients communicate with an application server over HTTPS. The application server connects to SQL Server 2025 through a database driver using an encrypted connection. Requests and responses travel in both directions. SQL Server 2025 Web Application Browser client Desktop or laptop Browser client Phone or tablet HTTPS HTTPS Application server / API Authentication, authorization, and business rules Parameterized queries through a database driver TDS over TCP/IP TLS-encrypted connection SQL Server 2025 Tables, constraints, indexes, and transactions
Three-tier client-server architecture. Browsers send HTTPS requests to the application server, which validates requests and applies business rules. The application uses a SQL Server driver to execute parameterized queries and return results. SQL Server stores the data and enforces database constraints and transaction rules.

In this design, browsers do not connect directly to SQL Server. Database credentials remain on the server side, and database access is restricted to authorized application services and administration tools. Configure database connections to require encryption and validate the server certificate.


This is exactly the shape VirtualBookShelf's own Razor Pages application follows. A browser never sees a connection string or a SQL Server credential; it only ever talks to the application server over HTTPS, and the application server is the only component that holds the connection string and sends SQL, through ADO.NET, down to SQL Server itself. Keeping that boundary intact is one of the more important habits a developer carries from this course into a real production application.

Reading SQL Before Writing It

A few conventions show up in almost every SQL statement worth knowing before Module 3's hands-on exercises begin. None of them are enforced by SQL Server itself, they're conventions, not rules, but they make SQL far easier to read once statements grow past a single line.
  • Keywords in uppercase. SELECT, FROM, WHERE, INSERT, and similar keywords are conventionally written in all capitals, which makes them visually distinct from table and column names at a glance. SQL Server itself is case-insensitive about keywords, select works exactly the same as SELECT, but the convention persists because it helps the next person reading the statement, who is often the same developer six months later.
  • One clause per line, once a statement grows. The single-line examples earlier in this lesson work fine for short statements, but a statement with several clauses, a multi-table JOIN with a WHERE clause and an ORDER BY, reads far more easily with each clause starting on its own line and indented consistently.
  • A semicolon ends a statement. SQL Server doesn't strictly require a trailing semicolon on every statement today, but several of its newer features do, and consistently ending statements with one avoids ambiguity when several statements run together in the same script, as Module 3's exercises often will.
  • Single quotes for text, not double quotes. SQL Server uses single quotes to delimit a text value, as every example in this lesson has, and reserves double quotes for identifiers in certain modes. Getting this reversed is one of the most common mistakes a developer coming from a language like C#, where double quotes delimit strings, makes when first writing SQL.

Database Technology Mapping

This module has covered a fair amount of vocabulary across five lessons. This table recaps the core terms in one place:
TermWhat It Means
ODBCUses vendor-specific drivers to provide a standard interface to a relational database system.
SQLThe language used to query, insert, update, and delete data in a relational database.
MiddlewareThe software layer that enables communication between an application and the database it talks to.
OLE DBUses data providers and data consumers to access both relational and non-relational data sources.

Lesson 4 covered ODBC, middleware, and OLE DB in depth; this table is here as a quick reference, not a re-teaching of that material.

A Few Common Questions

Is SQL itself different on SQL Server than it is on PostgreSQL or MySQL? The core language is the same, the SELECT, INSERT, UPDATE, and DELETE statements shown above would run on any of them with little or no change, since all of them implement the ANSI SQL standard at some level. What differs is each system's own extension layer, T-SQL for SQL Server, PL/pgSQL for PostgreSQL, and so on, which is where most of the syntax differences between systems actually live.

Why does SQL Server enforce the GROUP BY rule so strictly? Without it, a query could ask for a column that isn't being aggregated and isn't part of the grouping, which leaves SQL Server with no well-defined single value to return for that column across a group of rows. Requiring every non-aggregated column to appear in GROUP BY closes off that ambiguity before it can produce a confusing or inconsistent result.

Does ADO.NET or Entity Framework Core change what counts as valid SQL? No. Lesson 4 covered this directly: both technologies eventually send ordinary SQL text to SQL Server, whether that text is written by hand through ADO.NET or generated automatically by EF Core from a LINQ query. The SQL itself, and SQL Server's own rules about it, like the GROUP BY requirement above, apply exactly the same way regardless of which technology constructed the statement.

Is a relational database like SQL Server still the right choice for very large, fast-growing applications? Lesson 3 already covered this question in detail: document-oriented, non-relational systems like MongoDB trade away the relational model's built-in integrity guarantees in exchange for flexibility at very large scale. For VirtualBookShelf's structured, interrelated data, customers, books, and the relationships between them, the relational model, and the SQL this lesson covers, remains the right fit.

Does writing SQL by hand still matter once Entity Framework Core is doing the heavy lifting? Yes, for two reasons. First, EF Core's LINQ queries only generate correct, efficient SQL when the person writing the LINQ understands what SQL statement it should turn into, a WHERE clause that should filter before a join, not after it, for example. Second, not every data access task goes through EF Core cleanly; a complex reporting query, a bulk update, or a performance-sensitive read is often still written as raw SQL through ADO.NET directly, which is exactly why this course introduces ADO.NET before Entity Framework Core rather than the other way around.

What happens if a SQL statement has a mistake in it? SQL Server rejects the statement and returns an error rather than guessing at what was meant or silently running a different query. A misspelled column name, a missing comma between items in a SELECT list, or a typo in a keyword all produce a specific error message naming the problem, which is far safer than a database that tries to interpret a broken statement charitably and returns the wrong data without saying so.

What's Ahead

This lesson traced SQL back to its 1970s IBM origins, looked at how SQL Server 2025 implements and extends the ANSI SQL standard through T-SQL, and walked through the client/server architecture every SQL statement ultimately travels through, the same architecture VirtualBookShelf's own Razor Pages application follows. This closes out Module 2's conceptual foundations.

Module 3 is where this course gets hands-on: the next lesson covers setting up the data environment itself, configuring the connection string that lets a Razor Pages application actually reach SQL Server 2025, the modern equivalent of what the legacy version of this course called "inserting a data source into a project." Everything covered across this module, tables, database systems, ADO.NET, and now SQL itself, comes together there.

[1]programmatically retrieve: this means to use programming logic and code to get data from a data source.

SEMrush Software 5 SEMrush Banner 5