Nepedia
Back to Discover
Advanced Reader
💻

SQL

technology Maturity 7-9 Next article →

Structured Query Language, or SQL, is a domain-specific language. It is used to manage data within a relational database management system (RDBMS). This type of system organizes information into structured formats. It uses relations between different entities and variables to keep data orderly. SQL is essential because it allows users to interact with complex data sets efficiently. It serves as the primary bridge between human instructions and digital data storage.

SQL functions as a declarative language. This means a user describes what they want to achieve rather than how to do it. In older systems, programmers had to write complex steps to find specific data. SQL changed this by allowing one command to access many records at once. It also removes the need to specify how to reach a record physically. The system decides whether to use an index or another method to find the data. This process makes data retrieval much faster and more intuitive for developers.

The language is divided into several functional classes of statements. The Data Query Language (DQL) is used to retrieve specific information. Data Manipulation Language (DML) allows users to insert, update, or delete data. Data Definition Language (DDL) is used for creating and modifying the database schema. Finally, Data Control Language (DCL) handles data access control and security. Each class performs a distinct role in managing the life cycle of data.

SQL has a rich history rooted in mathematical theory. It was based on relational algebra and tuple relational calculus. In 1970, Edgar F. Codd published an influential paper on the relational model. This paper described a way to manage large shared data banks. Following this, Donald D. Chamberlin and Raymond F. Boyce developed SQL at IBM. They initially called it SEQUEL, or Structured English Query Language. They later dropped the vowels to create the name SQL. This change was necessary because "SEQUEL" was a trademark of another company.

IBM's early work led to several important commercial products. They developed System R as a prototype in the 1970s. This led to the release of System/38, SQL/DS, and IBM Db2. These products became available between 1979 and 1983. Relational Software, now known as Oracle Corporation, also developed SQL-based systems. They released Oracle V2 for VAX computers in June 1979. These early successes helped SQL become the dominant language for databases.

SQL is now a recognized global standard. The American National Standards Institute (ANSI) adopted it in 1986. The International Organization for Standardization (ISO) followed in 1987. The standard has been revised many times to add new features. Major updates occurred in 1989, 1992, 1999, 2003, 2006, 2008, 2011, 2016, and 2023. The 2023 update added support for JSON data and Property Graph Queries. These revisions ensure the language evolves with new technology.

Despite these standards, most implementations are not fully compatible. This lack of portability means code often needs changes to work on different systems. For example, PostgreSQL handles unquoted names differently than the SQL standard. The standard says names should be upper case, but PostgreSQL uses lower case. Other vendors might use different syntax for dates, times, or string concatenation. This happens because the standard is massive and complex. Many companies also prioritize performance or backward compatibility over strict adherence to the rules.

545 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.