1 / 8

SQL Overview

SQL Overview. Structured Query Language. Description. When Codd first described the theory of relational databases, he asserted that there should be a comprehensive language that would describe both the data and the meta data. SQL has developed into that language. SQL Features.

ellery
Download Presentation

SQL Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SQL Overview Structured Query Language

  2. Description • When Codd first described the theory of relational databases, he asserted that there should be a comprehensive language that would describe both the data and the meta data. • SQL has developed into that language

  3. SQL Features • SQL does not come as a separate package • It is always a part of a Data Base Management system • SQL is a fourth generation language (meaning it is not procedural. You describe what you want to do not how to do it)

  4. Standards • SQL is an ANSI standard • Most DBMS implement the 1992 standard, some are beginning to implement the 1999 standard • In addition to the standard SQL most DBMSs add their own commands and features • SQL Server has T-SQL • Oracle has PSQL

  5. Three Uses • To define data (including setting indexes and user permissions) • To query data • To manipulate data

  6. Data Definition • You can define all the data structures in a relational database with SQL CREATE TABLE tblCustomer ( CustomerID Integer Primary Key, CustomerLastName varchar(50), CustomerFirstName varchar(35) )

  7. Data Query • You can retrieve any data or combination of the data from the database with SQL queries SELECT CustomerLastName, CustomerFirstname, OrderID, OrderDate FROM tblCustomer c INNER JOIN tblOrder o ON c.CustomerID=o.CustomerID WHERE c.CustomerID=5;

  8. Data Manipulation • You can Insert, Update and Manipulate data with SQL UPDATE tblCustomer SET LastName=‘Smith’ WHERE CustomerID=7;

More Related