Introduction to SQL
SQL (Structured Query Language) is used to manage relational database management systems (RDBMS). SQL's scope includes data insertion, querying, updating, 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 manipulate databases, including data insertion, querying, updating, and deletion.
- SQL became an ANSI (American National Standards Institute) standard in 1986 and an ISO (International Organization for Standardization) standard in 1987.
What can SQL do?
- SQL can execute queries against a database.
- SQL can retrieve data from a database.
- SQL can insert new records into a database.
- SQL can update records 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 different versions of the SQL language.
However, to be compliant with the ANSI standard, they must support the main commands in a similar manner (such as SELECT, UPDATE, DELETE, INSERT, WHERE).
| | Note: Apart from the SQL standard, most SQL database programs have their own proprietary extensions! | | --- | --- |
Using SQL on Your Website
To create a website that displays data from a database, you need:
- An RDBMS database program (such as MS Access, SQL Server, MySQL)
- A server-side scripting language, like PHP or ASP
- SQL to retrieve the data you want
- HTML / CSS
RDBMS
RDBMS stands for Relational Database Management System.
RDBMS is the basis for SQL and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
Data in RDBMS is stored in database objects called tables.
A table is a collection of related data entries and consists of columns and rows.