Actions

Difference between revisions of "Structured Query Language (SQL)"

m (The LinkTitles extension automatically added links to existing pages (https://github.com/bovender/LinkTitles).)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Structured Query Language (SQL) is a specialized language for updating, deleting, and requesting information from databases. SQL is an ANSI and ISO [[standard]], and is the de facto standard database query language. A variety of established database products support SQL, including products from Oracle and Microsoft SQL [[Server]]. It is widely used in both [[industry]] and academia, often for enormous, complex databases. In a distributed database [[system]], a program often referred to as the database's "back end" runs constantly on a server, interpreting [[data]] files on the server as a standard relational database. Programs on client computers allow users to manipulate that data, using tables, columns, rows, and fields. To do this, client programs send SQL statements to the server. The server then processes these statements and returns result sets to the client program.<ref>Defining Structured Query Language (SQL) [https://kb.iu.edu/d/ahux Indiana University]</ref>
+
'''Structured Query Language (SQL)''' is a specialized language for updating, deleting, and requesting database information. SQL is an ANSI and ISO standard and is the de facto standard database query language. Various established database products support SQL, including products from Oracle and Microsoft SQL Server. It is widely used in industry and academia, often for enormous, complex databases. In a distributed database system, a program often called the database's "back end" constantly runs on a server, interpreting data files on the server as a standard relational database. Programs on client computers allow users to manipulate that data using tables, columns, rows, and fields. To do this, client programs send SQL statements to the server. The server then processes these statements and returns result sets to the client program.<ref>[https://kb.iu.edu/d/ahux Defining Structured Query Language (SQL)]</ref>
  
 
Following are some interesting facts about SQL:
 
Following are some interesting facts about SQL:
*SQL is case insensitive. But it is a recommended practice to use keywords (like SELECT, UPDATE, CREATE, etc) in [[capital]] letters and use user defined things (liked table name, column name, etc) in small letters.
+
*SQL is case insensitive. But it is a recommended practice to use keywords (like SELECT, UPDATE, CREATE, etc.) in capital letters and use user-defined things (like table name, column name, etc.) in small letters.
 
*can write comments in SQL using “–” (double hyphen) at the beginning of any line.
 
*can write comments in SQL using “–” (double hyphen) at the beginning of any line.
*SQL is the programming language for relational databases (explained below) like MySQL, Oracle, Sybase, SQL Server, Postgre, etc. Other non-relational databases (also called NoSQL) databases like MongoDB, DynamoDB, etc do not use SQL
+
*SQL is the programming language for relational databases (explained below) like MySQL, Oracle, Sybase, SQL Server, Postgre, etc. Other non-relational databases (also called NoSQL) databases like MongoDB, DynamoDB, etc., do not use SQL
*Although there is an ISO standard for SQL, most of the implementations slightly vary in syntax. So we may encounter queries that work in SQL Server but do not work in MySQL.<ref>Interesting facts about SQL [https://www.geeksforgeeks.org/structured-query-language/ Geeks for Geeks]</ref>
+
*Although there is an ISO standard for SQL, most implementations vary slightly in syntax. So we may encounter queries that work in SQL Server but do not work in MySQL.<ref>[https://www.geeksforgeeks.org/structured-query-language/ Interesting facts about SQL]</ref>
  
First developed in the early 1970s at IBM by Raymond Boyce and Donald Chamberlin, SQL was commercially released by Relational [[Software]] Inc. (now known as Oracle Corporation) in 1979. The current standard SQL version is voluntary, [[vendor]]-compliant and monitored by the [[American National Standards Institute (ANSI)]]. Most major vendors also have proprietary versions that are incorporated and built on ANSI SQL, e.g., SQL*Plus (Oracle), and Transact-SQL (T-SQL) (Microsoft). One of the most fundamental DBA rites of passage is learning SQL, which begins with writing the first SELECT statement or SQL script without a graphical user interfaces (GUI). Increasingly, relational databases use GUIs for easier database [[management]], and queries can now be simplified with graphical tools, e.g., drag-and-drop wizards. However, learning SQL is imperative because such tools are never as powerful as SQL. SQL code is divided into four main categories:
+
First developed in the early 1970s at IBM by Raymond Boyce and Donald Chamberlin, SQL was commercially released by Relational Software Inc. (now known as Oracle Corporation) in 1979. The current standard SQL version is voluntary, vendor-compliant, and monitored by the American National Standards Institute (ANSI). Most major vendors also have proprietary versions that are incorporated and built on ANSI SQL, e.g., SQL*Plus (Oracle) and Transact-SQL (T-SQL) (Microsoft). One of the most fundamental DBA rites of passage is learning SQL, which begins with writing the first SELECT statement or SQL script without a graphical user interface (GUI). Increasingly, relational databases use GUIs for easier database management, and queries can now be simplified with graphical tools, e.g., drag-and-drop wizards. However, learning SQL is imperative because such tools are never as powerful as SQL. SQL code is divided into four main categories:
*Queries are performed using the ubiquitous yet familiar SELECT statement, which is further divided into clauses, including SELECT, FROM, WHERE and ORDER BY.
+
*Queries are performed using the ubiquitous yet familiar SELECT statement, further divided into clauses, including SELECT, FROM, WHERE and ORDER BY.
*Data Manipulation Language (DML) is used to add, update or delete data and is actually a SELECT statement subset and is comprised of the INSERT, DELETE and UPDATE statements, as well as [[control]] statements, e.g., BEGIN TRANSACTION, SAVEPOINT, COMMIT and ROLLBACK.
+
*Data Manipulation Language (DML) is used to add, update or delete data. It is actually a SELECT statement subset and is comprised of the INSERT, DELETE, and UPDATE statements, as well as control statements, e.g., BEGIN TRANSACTION, SAVEPOINT, COMMIT, and ROLLBACK.
*Data Definition Language (DDL) is used for managing tables and index structures. Examples of DDL statements include CREATE, ALTER, TRUNCATE and DROP.
+
*Data Definition Language (DDL) manages tables and index structures. Examples of DDL statements include CREATE, ALTER, TRUNCATE, and DROP.
*Data Control Language (DCL) is used to assign and revoke database rights and permissions. Its main statements are GRANT and REVOKE.<ref>SQL Categories [https://www.techopedia.com/definition/1245/structured-query-language-sql Techopedia]</ref>
+
*Data Control Language (DCL) is used to assign and revoke database rights and permissions. Its main statements are GRANT and REVOKE.<ref>[https://www.techopedia.com/definition/1245/structured-query-language-sql SQL Categories]</ref>
  
  
 
== See Also ==
 
== See Also ==
[[Microsoft Excel]]<br />
+
*[[ActiveX Data Objects (ADO)]]
[[ActiveX]]<br />
+
*[[.ACCDB file format]]
[[ActiveX Data Objects (ADO)]]<br />
+
*[[.MDB File Format]]
[[JavaScript]]<br />
 
[[.ACCDB file format]]<br />
 
[[.MDB File Format]]<br />
 
[[.NET Enterprise Server]]<br />
 
[[Applet]]<br />
 
[[Binary Digit (Bit)]]<br />
 
[[Binary Code]]<br />
 
[[Binary File]]
 
  
  
 
== References ==
 
== References ==
 
<references/>
 
<references/>
 +
__NOTOC__

Latest revision as of 16:00, 11 April 2023

Structured Query Language (SQL) is a specialized language for updating, deleting, and requesting database information. SQL is an ANSI and ISO standard and is the de facto standard database query language. Various established database products support SQL, including products from Oracle and Microsoft SQL Server. It is widely used in industry and academia, often for enormous, complex databases. In a distributed database system, a program often called the database's "back end" constantly runs on a server, interpreting data files on the server as a standard relational database. Programs on client computers allow users to manipulate that data using tables, columns, rows, and fields. To do this, client programs send SQL statements to the server. The server then processes these statements and returns result sets to the client program.[1]

Following are some interesting facts about SQL:

  • SQL is case insensitive. But it is a recommended practice to use keywords (like SELECT, UPDATE, CREATE, etc.) in capital letters and use user-defined things (like table name, column name, etc.) in small letters.
  • can write comments in SQL using “–” (double hyphen) at the beginning of any line.
  • SQL is the programming language for relational databases (explained below) like MySQL, Oracle, Sybase, SQL Server, Postgre, etc. Other non-relational databases (also called NoSQL) databases like MongoDB, DynamoDB, etc., do not use SQL
  • Although there is an ISO standard for SQL, most implementations vary slightly in syntax. So we may encounter queries that work in SQL Server but do not work in MySQL.[2]

First developed in the early 1970s at IBM by Raymond Boyce and Donald Chamberlin, SQL was commercially released by Relational Software Inc. (now known as Oracle Corporation) in 1979. The current standard SQL version is voluntary, vendor-compliant, and monitored by the American National Standards Institute (ANSI). Most major vendors also have proprietary versions that are incorporated and built on ANSI SQL, e.g., SQL*Plus (Oracle) and Transact-SQL (T-SQL) (Microsoft). One of the most fundamental DBA rites of passage is learning SQL, which begins with writing the first SELECT statement or SQL script without a graphical user interface (GUI). Increasingly, relational databases use GUIs for easier database management, and queries can now be simplified with graphical tools, e.g., drag-and-drop wizards. However, learning SQL is imperative because such tools are never as powerful as SQL. SQL code is divided into four main categories:

  • Queries are performed using the ubiquitous yet familiar SELECT statement, further divided into clauses, including SELECT, FROM, WHERE and ORDER BY.
  • Data Manipulation Language (DML) is used to add, update or delete data. It is actually a SELECT statement subset and is comprised of the INSERT, DELETE, and UPDATE statements, as well as control statements, e.g., BEGIN TRANSACTION, SAVEPOINT, COMMIT, and ROLLBACK.
  • Data Definition Language (DDL) manages tables and index structures. Examples of DDL statements include CREATE, ALTER, TRUNCATE, and DROP.
  • Data Control Language (DCL) is used to assign and revoke database rights and permissions. Its main statements are GRANT and REVOKE.[3]


See Also


References