SQL - Wikipedia. SQL ( ( listen)ESS- kew- EL. In comparison to older read/write APIs like ISAM or VSAM, SQL offers two main advantages: First, it introduced the concept of accessing many records with one single command, and second, it eliminates the need to specify how to reach a record, e. Originally based upon relational algebra and tuple relational calculus, SQL consists of a data definition language, data manipulation language, and data control language. The scope of SQL includes data insert, query, update and delete, schema creation and modification, and data access control.
Although SQL is often described as, and to a great extent is, a declarative language (4. GL), it also includes procedural elements. SQL was one of the first commercial languages for Edgar F. Codd's relational model, as described in his influential 1. Despite the existence of such standards, most SQL code is not completely portable among different database systems without adjustments. History. Chamberlin and Raymond F. Boyce in the early 1.
Navy, Central Intelligence Agency, and other U. S. In June 1. 97. Relational Software, Inc. In that model, a table is a set of tuples, while in SQL, tables and query results are lists of rows: the same row may occur multiple times, and the order of rows can be employed in queries (e. This is an important element of SQL. Free Car Designing Software Downloads on this page. Statements, which may have a persistent effect on schemata and data, or may control transactions, program flow, connections, sessions, or diagnostics. Though not required on every platform, it is defined as a standard part of the SQL grammar.
The SQL language is subdivided into several language elements, including: Clauses, which are constituent components of statements and queries. Replication tools: These tools extract data from external application systems and other databases for population into DB2 tables. This type of tool can extract data.
Insignificant whitespace is generally ignored in SQL statements and queries, making it easier to format SQL code for readability. Procedural extensions.
SQL is a set- based, declarative programming language, not an imperative programming language like C or BASIC. However, extensions to Standard SQL add procedural programming language functionality, such as control- of- flow constructs.
These include: In addition to the standard SQL/PSM extensions and proprietary SQL extensions, procedural and object- oriented programmability is available on many SQL platforms via DBMS integration with other languages. The SQL standard defines SQL/JRT extensions (SQL Routines and Types for the Java Programming Language) to support Java code in SQL databases.
SQL Server 2. 00. SQLCLR (SQL Server Common Language Runtime) to host managed . NET assemblies in the database, while prior versions of SQL Server were restricted to unmanaged extended stored procedures primarily written in C. Postgre. SQL lets users write functions in a wide variety of languages—including Perl, Python, Tcl, Java. Script (PL/V8) and C.
In particular date and time syntax, string concatenation, NULLs, and comparison case sensitivity vary from vendor to vendor. Particular exceptions are Postgre. SQL. The most obvious such examples, and incidentally the most popular commercial and proprietary SQL DBMSs, are Oracle (whose DATE behaves as DATETIME. As a result, SQL code can rarely be ported between database systems without modifications. There are several reasons for this lack of portability between database systems: The complexity and size of the SQL standard means that most implementors do not support the entire standard. The standard does not specify database behavior in several important areas (e.
However, the standard's specification of the semantics of language constructs is less well- defined, leading to ambiguity. Many database vendors have large existing customer bases; where the newer version of the SQL standard conflicts with the prior behavior of the vendor's database, the vendor may be unwilling to break backward compatibility. There is little commercial incentive for vendors to make it easier for users to change database suppliers (see vendor lock- in). Users evaluating database software tend to place other factors such as performance higher in their priorities than standards conformance. SQL was adopted as a standard by the American National Standards Institute (ANSI) in 1.
SQL- 8. 6. It is maintained by ISO/IEC JTC 1, Information technology, Subcommittee SC 3. Data management and interchange. The standard is commonly denoted by the pattern: ISO/IEC 9. Part n: title, or, as a shortcut, ISO/IEC 9. ISO/IEC 9. 07. 5 is complemented by ISO/IEC 1. SQL Multimedia and Application Packages (SQL/MM), which defines SQL based interfaces and packages to widely spread applications like video, audio and spatial data.
Until 1. 99. 6, the National Institute of Standards and Technology (NIST) data management standards program certified SQL DBMS compliance with the SQL standard. Vendors now self- certify the compliance of their products. Support for embedding SQL in Java (SQL/OLB) and vice versa (SQL/JRT). SQL: 2. 00. 3Introduced XML- related features (SQL/XML), window functions, standardized sequences, and columns with auto- generated values (including identity- columns). SQL: 2. 00. 6ISO/IEC 9. SQL can be used with XML. It defines ways of importing and storing XML data in an SQL database, manipulating it within the database, and publishing both XML and conventional SQL- data in XML form.
In addition, it lets applications integrate queries into their SQL code with XQuery, the XML Query Language published by the World Wide Web Consortium (W3. C), to concurrently access ordinary SQL- data and XML documents. Adds INSTEAD OF triggers, TRUNCATE statement. Enhancements for window functions and FETCH clause.
A draft of SQL: 2. It provides logical concepts. ISO/IEC 9. 07. 5- 2: 2.
Part 2: Foundation (SQL/Foundation). It contains the most central elements of the language and consists of both mandatory and optional features. ISO/IEC 9. 07. 5- 3: 2. Part 3: Call- Level Interface (SQL/CLI). It defines interfacing components (structures, procedures, variable bindings) that can be used to execute SQL statements from applications written in Ada, C respectively C++, COBOL, Fortran, MUMPS, Pascal or PL/I. Open Database Connectivity is a well- known superset of SQL/CLI. This part of the standard consists solely of mandatory features.
ISO/IEC 9. 07. 5- 4: 2. Part 4: Persistent stored modules (SQL/PSM) It standardizes procedural extensions for SQL, including flow of control, condition handling, statement condition signals and resignals, cursors and local variables, and assignment of expressions to variables and parameters.
In addition, SQL/PSM formalizes declaration and maintenance of persistent database language routines (e. This part of the standard consists solely of optional features. ISO/IEC 9. 07. 5- 9: 2. Part 9: Management of External Data (SQL/MED). It provides extensions to SQL that define foreign- data wrappers and datalink types to allow SQL to manage external data. External data is data that is accessible to, but not managed by, an SQL- based DBMS.
This part of the standard consists solely of optional features. ISO/IEC 9. 07. 5- 1. Part 1. 0: Object language bindings (SQL/OLB). It defines the syntax and semantics of SQLJ, which is SQL embedded in Java (see also part 3). The standard also describes mechanisms to ensure binary portability of SQLJ applications, and specifies various Java packages and their contained classes. This part of the standard consists solely of optional features, as opposed to SQL/OLB JDBC, which is not part of the SQL standard, which defines an API.
It defines the Information Schema and Definition Schema, providing a common set of tools to make SQL databases and objects self- describing. These tools include the SQL object identifier, structure and integrity constraints, security and authorization specifications, features and packages of ISO/IEC 9. SQL- based DBMS implementations, SQL- based DBMS implementation information and sizing items, and the values supported by the DBMS implementations. It specifies the ability to invoke static Java methods as routines from within SQL applications ('Java- in- the- database'). It also calls for the ability to use Java classes as SQL structured user- defined types.
This part of the standard consists solely of optional features. ISO/IEC 9. 07. 5- 1.
Part 1. 4: XML- Related Specifications (SQL/XML). It specifies SQL- based extensions for using XML in conjunction with SQL. The XML data type is introduced, as well as several routines, functions, and XML- to- SQL data type mappings to support manipulation and storage of XML in an SQL database. This closely related but separate standard is developed by the same committee. It defines interfaces and packages based on SQL. The aim is a unified access to typical database applications like text, pictures, data mining or spatial data. ISO/IEC 1. 32. 49- 1: 2.
Part 1: Framework. ISO/IEC 1. 32. 49- 2: 2. Part 2: Full- Text. ISO/IEC 1. 32. 49- 3: 2. Part 3: Spatial. ISO/IEC 1. Part 5: Still image. ISO/IEC 1. 32. 49- 6: 2.
Part 6: Data mining. ISO/IEC 1. 32. 49- 7: 2. Part 7: History. Alternatives. Below are proposed relational alternatives to the SQL language. See navigational database and No. SQL for alternatives to the relational model. Distributed SQL processing.
DRDA enables network connected relational databases to cooperate to fulfill SQL requests. SQL statements can also be compiled and stored in remote RDBs as packages and then invoked by package name. This is important for the efficient operation of application programs that issue complex, high- frequency queries.
It is especially important when the tables to be accessed are located in remote systems. The messages, protocols, and structural components of DRDA are defined by the Distributed Data Management Architecture. See also. Internet Assigned Numbers Authority. April 2. 01. 3. Retrieved 1.
April 2. 01. 3. Internet Engineering Task Force. Retrieved 1. 0 April 2. Ars Technica. Retrieved 1. April 2. 01. 1. Mary E Treseler, ed.
Learning SQL (2nd ed.). Sebastapol, CA, USA: O'Reilly.
ISBN 9. 78- 0- 5. Pronouncing SQL: S- Q- L or Sequel?
Retrieved 1. 2 February 2. Britannica. com. Retrieved 2. Oxforddictionaries.
Retrieved 2. 01. 7- 0. Publib. boulder. ibm. Retrieved 2. 01. 7- 0.