What is SQL?
SQL often referred to as Structured Query Language, was designed for managing data in relational database management systems (RDBMS). SQL was one of the first commercial languages for Edgar F. Codd's relational model, as described in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks".
SQL was developed at IBM by Donald D. Chamberlin and Raymond F. Boyce in the early 1970s. This version, initially called SEQUEL (Structured English Query Language), was designed to manipulate and retrieve data stored in IBM's original quasi-relational database management system, System R, which a group at IBM San Jose Research Laboratory had developed during the 1970s.The acronym SEQUEL was later changed to SQL because "SEQUEL" was a trademark of the UK-based Hawker Siddeley aircraft company.
Properties of SQL:
SQL stands for Structured Query Language.
SQL lets you access and manipulate databases.( MySQL, SQL Server, Access, Oracle, Sybase, DB2, and other database systems.)
SQL is an ANSI (American National Standards Institute) standard. (Although SQL is an ANSI standard, there are many different versions of the SQL language. However, to be compliant with the ANSI standard, they all support at least the major commands ,such as “SELECT”, “UPDATE”, “DELETE”, “INSERT”, “WHERE” in a similar manner. Most of the SQL database programs also have their own proprietary extensions in addition to the SQL standard.)
SQL is not case sensitive.
SQL can be divided into two parts: The Data Manipulation Language (DML) and the Data Definition Language (DDL).
The query and update commands form the DML part of SQL:
v SELECT - extracts data from a database
v UPDATE - updates data in a database
v DELETE - deletes data from a database
v INSERT INTO - inserts new data into a database
The DDL part of SQL permits database tables to be created or deleted. It also defines indexes (keys), specifies links between tables, and imposes constraints between tables. The most important DDL statements in SQL are:
v CREATE DATABASE - creates a new database
v ALTER DATABASE - modifies a database
v CREATE TABLE - creates a new table
v ALTER TABLE - modifies a table
v DROP TABLE - deletes a table
v CREATE INDEX - creates an index (search key)
v DROP INDEX - deletes an index
Why semicolon after SQL statements?
Some database systems require a semicolon at the end of each SQL statement. Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.
If you using MS Access and SQL Server 2000 then you do not have to put a semicolon after each SQL statement, but some database programs force you to use it.
|