SQL. History. From Wikipedia, the free encyclopedia.

Similar documents
INTRODUCTION TO DATABASE

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Introduction to the Structured Query Language [ SQL ] (Significant Concepts)

Introduction. Introduction to Oracle: SQL and PL/SQL

Brief History of SQL. Relational Database Management System. Popular Databases

Database Management System 9

Chapter # 7 Introduction to Structured Query Language (SQL) Part I

(ADVANCED) DATABASE SYSTEMS (DATABASE MANAGEMENTS) PROF. DR. HASAN HÜSEYİN BALIK (6 TH WEEK)

Several major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their

Relational Theory and Data Independence: Unfinished Business. Logical Data Independence and the CREATE VIEW Statement.

Chapter 4: SQL Basics

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)

! Define terms. ! Interpret history and role of SQL. ! Write single table queries using SQL. ! Establish referential integrity using SQL

RDBMS-Day3. SQL Basic DDL statements DML statements Aggregate functions

COSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan

G64DBS Database Systems. Lecture 7 SQL SELECT. The Data Dictionary. Data Dictionaries. Different Sections of SQL (DDL) Different Sections of SQL (DCL)

Lecture 2: Chapter Objectives. Relational Data Structure. Relational Data Model. Introduction to Relational Model & Structured Query Language (SQL)

Lecture 2: Chapter Objectives

The Structured Query Language Get Started

SQL language. Jaroslav Porubän, Miroslav Biňas, Milan Nosáľ (c)

CISC 3140 (CIS 20.2) Design & Implementation of Software Application II

Today Learning outcomes LO2

Oracle Database 11g: SQL and PL/SQL Fundamentals

Review -Chapter 4. Review -Chapter 5

Database Programming with SQL

Techno India Batanagar Computer Science and Engineering. Model Questions. Subject Name: Database Management System Subject Code: CS 601

Course Outline and Objectives: Database Programming with SQL

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

Database Fundamentals Chapter 1

Relation Databases. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift Jaipur Region. Based on CBSE Curriculum Class -11. Neha Tyagi, PGT CS II Shift Jaipur

Data about data is database Select correct option: True False Partially True None of the Above

8) A top-to-bottom relationship among the items in a database is established by a

Database Technology Introduction. Heiko Paulheim

Oracle Database 10g: Introduction to SQL

Introduction to Computer Science and Business

What is SQL? Designed to retrieve data from relational databases, as well as to build and administer those databases.

Lecture 02. Fall 2017 Borough of Manhattan Community College

Chapter 1 SQL and Data

CS143: Relational Model

SQL Interview Questions

Relational Data Structure and Concepts. Structured Query Language (Part 1) The Entity Integrity Rules. Relational Data Structure and Concepts

Bonus Content. Glossary

Data Base Concepts. Course Guide 2

II B.Sc(IT) [ BATCH] IV SEMESTER CORE: RELATIONAL DATABASE MANAGEMENT SYSTEM - 412A Multiple Choice Questions.

Oracle Syllabus Course code-r10605 SQL

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

5. Single-row function

DATABASES SQL INFOTEK SOLUTIONS TEAM

DATABASE MANAGEMENT SYSTEMS. UNIT I Introduction to Database Systems

Transaction Management Chapter 11. Class 9: Transaction Management 1

Oracle Database: SQL and PL/SQL Fundamentals NEW

CS352 Lecture - Introduction to SQL

Relational Database Languages

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Database Systems Overview. Truong Tuan Anh CSE-HCMUT

History of SQL. Relational Database Languages. Tuple relational calculus ALPHA (Codd, 1970s) QUEL (based on ALPHA) Datalog (rule-based, like PROLOG)

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer,

Violating Independence

Solved MCQ on fundamental of DBMS. Set-1

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Fundamentals of Information Systems, Seventh Edition

CSE Database Management Systems. York University. Parke Godfrey. Winter CSE-4411M Database Management Systems Godfrey p.

Full file at

CS317 File and Database Systems

Advanced SQL Tribal Data Workshop Joe Nowinski

1 Overview of Database Management

Database System Concepts and Architecture

SQL (Structured Query Language)

SQL STRUCTURED QUERY LANGUAGE

In This Lecture. SQL Data Definition SQL SQL. Non-Procedural Programming. Notes. Database Systems Lecture 5 Natasha Alechina

Information Systems Engineering. SQL Structured Query Language DDL Data Definition (sub)language

EDUVITZ TECHNOLOGIES

Chapter 1 An introduction to relational databases and SQL

Sql Server Syllabus. Overview

Definition of terms Objectives Interpret history and role of SQL Define a database using SQL data definition iti language Write single table queries u

Oracle Database: Introduction to SQL

Db2 Sql Alter Table Add Column Default Value

Introduction to Databases, Fall 2005 IT University of Copenhagen. Lecture 10: Transaction processing. November 14, Lecturer: Rasmus Pagh

Part I: Structured Data

INFORMATION TECHNOLOGY NOTES

Progress towards database management standards

Database Programming with PL/SQL

Introduction to Computer Science and Business

SQL. The Basics Advanced Manipulation Constraints Authorization 1. 1

STRUCTURED QUERY LANGUAGE (SQL)

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2-1

Oracle Database: Introduction to SQL

Introduction To Computers

618 Index. BIT data type, 108, 109 BIT_LENGTH, 595f BIT VARYING data type, 108 BLOB data type, 108 Boolean data type, 109

پوهنتون کابل پوهنځی كمپيوترساینس

Course Outline. MySQL Database Administration & Design. Course Description: Pre-requisites: Course Content:

RDBMS. SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database.

Oracle SQL & PL SQL Course

1.8 Database and data Data Definition Language (DDL) and Data Manipulation Language (DML)

Instructor: Craig Duckett. Lecture 02: Thursday, March 29 th, 2018 SQL Basics and SELECT, FROM, WHERE

Chapter 9: Working with MySQL

SQL functions fit into two broad categories: Data definition language Data manipulation language

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Transcription:

SQL From Wikipedia, the free encyclopedia. Structured Query Language (SQL) is the most popular computer language used to create, modify and retrieve data from relational database management systems. The language has evolved beyond its original purpose to support object-relational database management systems. It is an ANSI/ISO standard. History A seminal paper, "A Relational Model of Data for Large Shared Data Banks" (), by Dr. Edgar F. Codd, was published in June, 1970 in the Association for Computing Machinery (ACM) journal, Communications of the ACM. Codd's model became widely accepted as the definitive model for database management systems (RDBMS). During the 1970s, a group at IBM's San Jose research center developed a database system "System R" based upon Codd's model. Structured English Query Language (SQL due to a trademark dispute (the word 'SEQUEL' was held as a trade mark by the Hawker-Siddeley aircraft company of the UK). In 1978, methodical testing commenced at customer test sites. Demonstrating both the usefulness and practicality of the system, this testing proved to be a success for IBM. As a result, IBM began to develop commercial products that implemented SQL based on their System R prototype, including SQL/DS (introduced in 1981), and DB2 (in 1983). In 1979, Relational Software, Inc. (now Oracle Corporation) introduced the first commercially available implementation of SQL (Oracle actually beat IBM to market by two years by releasing their first commercial RDBMS) and soon, many other vendors developed dialects of it. 1 / 7

SQL was adopted as a standard by the ANSI (American National Standards Institute) in 1986 and ISO (International Organization for Standardization) in 1987. ANSI has declared that the official pronunciation for SQL is The SQL standard has gone through a number of revisions: Year Name Alias Comments 1986 SQL-86 SQL-87 First publis 1989 SQL-89 Minor revision. 1992 SQL-92 SQL2 Major revis 1999 SQL:1999 SQL3 Added regu 2003 SQL:2003 Introduced (See Eisenberg et al.: ().) ISO () or ANSI (). A late draft is available as a zip archive () from Whitemarsh Information Systems Corporation (). The zip archive contains a number of PDF files that define the parts of the SQL:2003 specification. - the complexity and size of the SQL standard means that most databases do not implement the entire standard. - the standard does not specify database behavior in several important areas (e.g. indexes), leaving it up to implementations of the standard to decide how to behave. - the SQL standard precisely specifies the syntax that a conformant database system must implement. However, the standard's specification of the semantics of language constructs is less well-defined, leading to areas of ambiguity. - many database vendors have large existing customer bases; where the SQL standard conflicts with the prior behavior of the vendor's database, the vendor may be unwilling to break backward compatibility. 2 / 7

- some believe the lack of compatibility between database systems is intentional in order to ensure vendor lock-in. Description of SQL SQL allows the specification of queries in a high-level, declarative manner. For example, to select rows from a database, the user need only specify the criteria that they want to search by; the details of performing the search operation efficiently is left up to the database system, and is invisible to the user. Compared to general-purpose programming languages, this structure allows the user/programmer to be less familiar with the technical details of the data and how they are stored, and relatively more familiar with the information contained in the data. This blurs the line between user and programmer, appealing to individuals who fall more into the 'business' or 'research' area and less in the 'information technology' area. The original vision for SQL was to allow non-technical users to write their own database queries. While this has been realized to some extent, the complexity of querying an advanced database system using SQL can still require a significant learning curve. SQL contrasts with the more powerful database-oriented fourth-generation programming languages such as Focus or SAS, however, in its relative functional simplicity and simpler command set. This greatly reduces the degree of difficulty involved in maintaining the worst SQL source code, but it also makes programming such questions as 'Who had the top ten scores?' more difficult, leading to the development of procedural extensions, discussed above. However, it also makes it possible for SQL source code to be produced (and optimized) by software, leading to the development of a number of natural language database query languages, as well as 'drag and drop' database programming packages with 'object oriented' 3 / 7

interfaces. Often these allow the resultant SQL source code to be examined, for educational purposes, further enhancement, or to be used in a different environment. SQL keywords SQL keywords fall into several groups. Data retrieval The most frequently used operation in transactional databases is the data retrieval operation. - SELECT is used to retrieve zero or more rows from one or more tables in a database. In most applications, SELECT is the most commonly used DML command. In specifying a SELECT query, the user specifies a description of the desired result set, but they do specify what physical operations must be executed to produce that result set. Translating the query into an optimal query plan is left to the database system, more specifically to the query optimizer. - Commonly available keywords related to SELECT include: - FROM is used to indicate which tables the data is to be taken from, as well as how the tables join to each other. - WHERE is used to identify which rows to be retrieved, or applied to GROUP BY. - GROUP BY is used to combine rows with related values into elements of a smaller set of rows. - HAVING is used to identify which rows, following a GROUP BY, are to be retrieved. - ORDER BY is used to identify which columns are used to sort the resulting data. 4 / 7

Data manipulation First there are the standard Data Manipulation Language (DML) elements. DML is the subset of the language used to add, update and delete data. - INSERT is used to add zero or more rows (formally tuples) to an existing table. - UPDATE is used to modify the values of a set of existing table rows. - MERGE is used to combine the data of multiple tables. It is something of a combination of the INSERT and UPDATE elements. - DELETE removes zero or more existing rows from a table. - TRUNCATE deletes all data from a table (non-standard, but common SQL command). Data transaction Transaction, if available, can be used to wrap around the DML operations. - BEGIN WORK (or START TRANSACTION, depending on SQL dialect) can be used to mark the start of a database transaction, which either completes completely or not at all. - COMMIT causes all data changes in a transaction to be made permanent. - ROLLBACK causes all data changes since the last COMMIT or ROLLBACK to be discarded, so that the state of the data is "rolled back" to the way it was prior to those changes being requested. COMMIT and ROLLBACK interact with areas such as transaction control and locking. Strictly, both terminate any open transaction and release any locks held on data. In the absence of a BEGIN WORK or similar statement, the semantics of SQL are implementation-dependent. Data definition 5 / 7

The second group of keywords is the Data Definition Language (DDL). DDL allows the user to define new tables and associated elements. Most commercial SQL databases have proprietary extensions in their DDL, which allow control over nonstandard features of the database system. The most basic items of DDL are the CREATE and DROP commands. - CREATE causes an object (a table, for example) to be created within the database. - DROP causes an existing object within the database to be deleted, usually irretrievably. Some database systems also have an ALTER command, which permits the user to modify an existing object in various ways -- for example, adding a column to an existing table. Data control The third group of SQL keywords is the Data Control Language (DCL). DCL handles the authorisation aspects of data and permits the user to control who has access to see or manipulate data within the database. Its two main keywords are: - GRANT - authorises a user to perform an operation or a set of operations. - REVOKE - removes or restricts the capability of a user to perform an operation or a set of operations. 6 / 7

Criticisms of SQL Technically, SQL is a declarative computer language for use with "relational databases". Theorists note that many of the original SQL features were inspired by, but in violation of, tuple calculus. Recent extensions to SQL achieved relational completeness, but have worsened the violations, as documented in The Third Manifesto. In addition, there are also some criticisms about the practical use of SQL: - The language syntax is rather complex (sometimes called "COBOL-like"). - It does not provide a standard way to split large commands into multiple smaller ones that reference each other by name (however some implementations allow for set-based functions to grant this functionality). This tends to result in "run-on SQL sentences" - Implementations are inconsistent and, at times, incompatible between vendors. - It is at times too difficult a syntax for DBAs (database administrators) to extend. - Over-reliance on "NULLs", which some consider a flawed or over-used concept. You can find here an good SQL Tutorial 7 / 7