Overview of Standard Query Language (SQL) Saeideh Joodaki Instructor: Dr.Yingshu Li.

Slides:



Advertisements
Similar presentations
TURKISH STATISTICAL INSTITUTE 1 /34 SQL FUNDEMANTALS (Muscat, Oman)
Advertisements

Database Design -- Basic SQL
SQL: Standards and Flavors A presentation for CS157B by David Wortham.
1 Lecture 11: Basic SQL, Integrity constraints
Introduction to Structured Query Language (SQL)
CMPT 354, Simon Fraser University, Fall 2008, Martin Ester 28 Database Systems I The Relational Data Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4 SQL: Data Definition, Constraints, and Basic Queries and Updates.
Introduction to Structured Query Language (SQL)
Fundamentals, Design, and Implementation, 9/e Chapter 6 Introduction to Structured Query Language (SQL)
30-Jun-15 SQL A Brief Introduction. SQL SQL is Structured Query Language Some people pronounce SQL as “sequel” Other people insist that only “ess-cue-ell”
Introduction to Structured Query Language (SQL)
SQL/Server Stephen Cunningham Thema Davis. Problem Domain Designed for retrieval and management of data Defines the structures and operations of a data.
Structured Query Language. Brief History Developed in early 1970 for relational data model: –Structured English Query Language (SEQUEL) –Implemented with.
SQL Overview Defining a Schema CPSC 315 – Programming Studio Spring 2008 Project 1, Lecture 3 Slides adapted from those used by Jeffrey Ullman, via Jennifer.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Working with SQL and PL/SQL/ Session 1 / 1 of 27 SQL Server Architecture.
DATABASES AND SQL. Introduction Relation: Relation means table(data is arranged in rows and columns) Domain : A domain is a pool of values appearing in.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 8 (Part b): Advanced SQL Modern Database Management 9 th Edition Jeffrey A. Hoffer,
CSE314 Database Systems Lecture 4 Basic SQL Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 7 INTRODUCTION TO STRUCTURED QUERY LANGUAGE (SQL) Instructor Ms. Arwa.
Chapter 6 Additional Database Objects
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden Date:
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
Chapter 8 Part 1 SQL-99 Schema Definition, Constraints, Queries, and Views.
Lecture 7 Integrity & Veracity UFCE8K-15-M: Data Management.
HSCI 709 SQL Data Definition Language. SQL Standard SQL-92 was developed by the INCITS Technical Committee H2 on Databases. SQL-92 was designed to be.
Chapter 6 Additional Database Objects Oracle 10g: SQL.
An Investigation of Oracle and SQL Server with respect to Integrity, and SQL Language standards Presented by: Paul Tarwireyi Supervisor: John Ebden.
SQL SQL Server : Overview SQL : Overview Types of SQL Database : Creation Tables : Creation & Manipulation Data : Creation & Manipulation Data : Retrieving.
CSc-340 3b1 Intermediate SQL Chapter 4 [2 of 2] Phase 1 of Student Projects SQL Data Types & Schemas Authorization.
1 WG2 N1536 WG3: KOA-046 Temporal Features in SQL standard Krishna Kulkarni, IBM Corporation May 13, 2011.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
9 Copyright © Oracle Corporation, All rights reserved. Creating and Managing Tables.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 7 Introduction to Structured.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
SQL Basics. What is SQL? SQL stands for Structured Query Language. SQL lets you access and manipulate databases.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Database Programming Sections 11 & 12 –Sequences, Indexes, and Synonymns.
Chapter 2 Object-Relational DBMSs Chapter 28 in Textbook.
Chapter 5 : Integrity And Security  Domain Constraints  Referential Integrity  Security  Triggers  Authorization  Authorization in SQL  Views 
Session 1 Module 1: Introduction to Data Integrity
SQL:2003 An Introduction to Some New Features. New Data Types BIT and BIT VARYING removed BIGINT, MULTISET and XML introduced –First class data types:
©Silberschatz, Korth and Sudarshan1 Structured Query Language (SQL) Data Definition Language Domains Integrity Constraints.
ITS232 Introduction To Database Management Systems Siti Nurbaya Ismail Faculty of Computer Science & Mathematics, Universiti Teknologi MARA (UiTM), Kedah.
1 CS 430 Database Theory Winter 2005 Lecture 10: Introduction to SQL.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 4: Intermediate.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
Chapter 8 Advanced SQL. Relational Set Operators UNIONINTERSECTMINUS Work properly if relations are union- compatible –Names of relation attributes must.
CSC314 DAY 8 Introduction to SQL 1. Chapter 6 © 2013 Pearson Education, Inc. Publishing as Prentice Hall SQL OVERVIEW  Structured Query Language  The.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
 CONACT UC:  Magnific training   
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
SQL Basics Review Reviewing what we’ve learned so far…….
SQL Query Getting to the data ……..
Managing Tables, Data Integrity, Constraints by Adrienne Watt
ITEC 313 Database Programming
Object-Relational DBMSs
Database systems Lecture 3 – SQL + CRUD
SQL Fundamentals in Three Hours
Data Model.
Chapter 8 Advanced SQL.
Session - 6 Sequence - 1 SQL: The Structured Query Language:
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
SQL (Structured Query Language)
Presentation transcript:

Overview of Standard Query Language (SQL) Saeideh Joodaki Instructor: Dr.Yingshu Li

Outline Standardization. Brief review of SQL 86, SQL 89, SQL 92. Evolution to SQL: Latest version; SQL: 2003.

Database Standard Organization ISO (International Standard Organization)  JTC1 (Joint Technical Committee 1) Subcommittee SC32 WG3 (Database Languages) WG4 (SQL/MM) ANSI ( American National Standards Institute)  NCITS (National Committee for Information Technology Standardization) H2 (X3H2)

The SQL standard has gone through a number of revisions YearNameAliasComments 1986SQL-86SQL-87 First published by ANSI. Ratified by ISO in SQL-89 Minor revision. 1992SQL-92SQL2 Major revision. 1999SQL:1999SQL3 Added object- oriented features, introduced OLAP,… 2003SQL:2003 Introduced XML- related features,…

SQL-86 The first generation of SQL. Implemented by IBM. Defined 3 ways to process DML. Direct processing, Module language, Embedded SQL Bindings to Cobol, Fortan, Pascal, PL/1. Criticized for the lack of common features and orthogonality (independence).

SQL-89 Superset of SQL-86. Bindings to two more languages, C and ADA. Defined DDL in the separate “schema definition language”. (CREATE TABLE, CREATE VIEW, and GRANT PRIVILEGES, with No drop, Alter, or revoke). Introduced default, Unique, and Not Null values. Defined Primary keys, check constraint, and Referential integrity.

SQL-92 Superset of SQL-89. Designed to be a standard for relational database management systems (RDBMSs). Added significant new features and capabilities to the specifications, such as:  Support for additional data types (DATE, TIME, TIMESTAMP, INTERVAL, BIT string, variable-length character and bit strings, and NATIONAL CHARACTER strings),  Additional set operators (for example, union join, natural join, set difference, and set intersection),  Capability for domain definitions in the schema.

SQL:1999 Intended as a major enhancement. Characterized as "object-oriented SQL“. In addition to the object oriented extensions, there are some other new features like; Triggers, Stored procedures and user-defined functions, Recursive queries, OLAP, SQL procedural constructs, Expressions in ORDER BY Savepoints, Update through unions and joins. The new features are divided into five category: new data types, new predicates, enhanced semantics, additional security, and active database.

(SQL: 1999) New Data Types SQL:1999 has four new data types: 1. Large Object (LOB) type  CHARACTER LARGE OBJECT (CLOB)  BINARY LARGE OBJECT (BLOB) 2. Boolean type 3. Two new composite types: ARRAY (storing collections of values in a column) and ROW (storing structured values in single columns of the database) 4. Distinct types

(SQL: 1999) New Predicates Using “SIMILAR” besides “LIKE”: gives programs UNIX-like regular expressions. WHERE NAME SIMILAR TO '(SQL-(86|89|92|99)) I (SQL(I|2|3))‘ (which would match the various names given to the SQL standard over the years.) DISTINCT predicate.

(SQL: 1999) Enhanced Security Adding role facility.  Granting privileges to the roles.  Simplifying the difficult job of managing security in a Database environment.

(SQL: 1999) Active Database This facility is provided through a feature known as triggers.

(SQL: 1999) Object Orientation The structured user-defined types.  They may be defined to have one or more attributes.  All aspects of their behaviors are provided through methods, functions, and procedures.  Their attributes are encapsulated through the use of system-generated observer.  They may participate in type hierarchies.

SQL: 2003 Makes revisions to all parts of SQL: Adds a brand new part: SQL/XML (XML-Related Specifications). New features are categorized as:  New data types,  Enhancements to SQL-invoked routines,  Extensions to CREATE TABLE statement,  A new MERGE statement,  A new schema object - the sequence generator,  Two new sorts of columns – identity columns and generated columns.

(SQL: 2003) New Data Types Retains all data types that existed in SQL: 1999 with the exception of the BIT and BIT VARYING data types. Introduces three new data types: 1. BIGINT 2. MULTISET 3. XML

(SQL: 2003) Table Functions New in SQL: SQL-invoked function that returns a “table”.  Table functions give increased functionality by allowing sets of tuples from any external data sources to be invoked (as if they were a table).  Table function execution can be parallelized giving improved speed and scalability.

(SQL: 2003) MERGE statement In addition to the three statements for updating the database, (INSERT, UPDATE, and DELETE) SQL: 2003 adds MERGE. Combining INSERT and UPDATE into MERGE. Transferring a set of rows from a “transaction table” to a “master table” maintained by the database.

(SQL: 2003) Sequence Generators New kind of database object with an associated time-varying exact numeric value. Mechanism for generating unique values automatically. User can define minimum value, a maximum value, a start value, an increment, and a cycle option for the sequence generator they are creating. CREATE SEQUENCE PARTSEQ AS INTEGER START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE NO CYCLE

Conclusion Reviewed some important developments of SQL. Specifically, described only some important features of SQL: 1999 and SQL: Observed that SQL: 1999 has been a major development compare to previous versions. SQL: 2003 is modified-enhanced version of SQL: 1999 and it is popularly believed to be largely a “bug-fix release” of the SQL standard.

References Andrew Eisenberg, Jim Melton, SQL/XML is Making Good Progress, ACM SIGMOD REC., Volume 31, Issue 2, No. 8, June 2002, Publisher: ACM Press. Jim Melton, Andrew Eisenberg, SQL Multimedia and Application Packages (SQL/MM), ACM SIGMOD Record, Volume 30, Issue 4, No. 6, December 2001, Publisher: ACM Press. Andrew Eisenberg, Jim Melton, Krishna Kulkarni, Jan-Eike Michels, Fred Zemke, SQL:2003 Has Been Published, ACM SIGMOD Record, Volume 33, Issue 1, No.8, March 2004, Publisher: ACM Press. Andrew Eisenberg, Jim Melton, Advancements in SQL/XML, ACM SIGMOD Record, September 2004, Volume 33, Issue 3, No. 8, Publisher: ACM Press. Andrew Eisenberg, Jim Melton, SQL: 1999, formerly known as SQL3, ACM SIGMOD record, March 1999, Volume 28, Issue 1, No. 8, Publisher: ACM Press.

Q & A