SQL Introduction
SQLSQL (Structured Query Language) is used to manage relational database management systems (RDBMS).
SQL uses a series of statements and commands to perform functions such as data definition, data query, data manipulation, and data control, including data insertion, query, update, and deletion, database schema creation and modification, and data access control.
What is SQL?
- SQL stands for Structured Query Language.
- SQL allows you to access and process databases, including data insertion, query, update, and deletion.
- The SQL language uses English keywords, making it easy to read and write.
- SQL is standardized by the International Organization for Standardization (ISO) and the American National Standards Institute (ANSI).
- SQL provides rich functionality for manipulating data, from simple queries to complex database management operations.
What Can SQL Do?
- SQL executes queries against a database
- SQL can retrieve data from a database
- SQL can insert new records into a database
- SQL can update data in a database
- SQL can delete records from a database
- SQL can create new databases
- SQL can create new tables in a database
- SQL can create stored procedures in a database
- SQL can create views in a database
- SQL can set permissions on tables, stored procedures, and views
SQL is a Standard - BUT...
Although SQL is an ANSI (American National Standards Institute) standard computer language, there are still many different versions of the SQL language.
However, to be compatible with the ANSI standard, they must all support the same major commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE, etc.) in a similar manner.
| Note:In addition to the SQL standard, most SQL database programs have their own proprietary extensions! |
Using SQL in Your Website
To create a website that displays data from a database, you need:
- An RDBMS database program (e.g., MS Access, SQL Server, MySQL)
- Use a server-side scripting language, such as PHP or ASP
- Use SQL to get the data you want
- Use HTML / CSS
RDBMS
RDBMS stands for Relational Database Management System.
RDBMS is the basis of SQL, and also the basis of all modern database systems, such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
Data in an RDBMS is stored in database objects called tables.
A table is a collection of related data items, consisting of columns and rows.
SQL History
The following are key milestones in the history of SQL:
1970s: Origins and Early Development
- 1970: Edgar F. Codd published the paper "A Relational Model of Data for Large Shared Data Banks", proposing the concept of relational databases and laying the theoretical foundation for the development of SQL.
- 1973-1974: IBM researchers Donald D. Chamberlin and Raymond F. Boyce, based on Codd's theory, developed a language called SEQUEL (Structured English Query Language) for operating and managing IBM's System R relational database.
- 1976: SEQUEL was renamed to SQL (Structured Query Language).
1980s: Standardization and Commercialization
- 1981: IBM launched the commercial relational database systems SQL/DS (Database System) and DB2 (Database 2).
- 1986: The American National Standards Institute (ANSI) released the first SQL standard, ANSI SQL-86 (SQL-87).
- 1987: The International Organization for Standardization (ISO) also adopted ANSI SQL-86 as an international standard.
1990s: Expansion and Improvement
- 1992: The SQL-92 (SQL2) standard was released, significantly expanding the functionality of the SQL language, including support for new data types, nested queries, and joins.
- 1999: The SQL:1999 (SQL3) standard was released, introducing object-relational database (ORDBMS) features, recursive queries, triggers, and user-defined functions.
2000s: Continuous Evolution and New Features
- 2003: The SQL:2003 standard was released, introducing XML-related features and window functions.
- 2006: The SQL:2006 standard was released, mainly enhancing support for XML.
- 2008: The SQL:2008 standard was released, further improving syntax and performance optimization.
2010s: New Features and Big Data Support
- 2011: The SQL:2011 standard was released, adding support for temporal data types and time travel (temporal data).
- 2016: The SQL:2016 standard was released, introducing JSON data types and related operation functions, adapting to NoSQL databases and big data processing needs.
2020s: Modernization and Standard Updates
- 2023: The latest SQL standards continue to improve, adding support for more modern database requirements and features.
Summary
SQL has evolved from a query language based on the relational model into the core language of modern database management, with its standards continuously evolving and expanding. Major database management systems (such as MySQL, PostgreSQL, SQLite, SQL Server, Oracle, etc.) have added their own extensions and optimizations while following the SQL standard, making SQL a powerful tool for data manipulation and management. The development of SQL not only reflects technological progress, but also reflects the changes and growth in data management needs.
Other Extensions