SlideShare a Scribd company logo
SQL Overview CIS-182
Structured Query Language Language used to work with databases Used in ‘back end’ Typically not part of user interface (don’t expect users to type in a query…)
SEQEL to SQL Structured English Query Language developed by IBM Other companies developed similar products ANSI set standards in 1986 Standards are ‘open’ Different vendors have different levels of conformance
SQL Most languages are procedural Describe how to perform a task SQL is non-procedural (declarative) Code describes results Includes some procedural components If … Then, Loops Database apps typically use both types of languages Procedural languages manage interface, data requests SQL manages data storage and retrieval
Types of SQL Statements Data Definition Language (DDL): Create/edit objects CREATE, ALTER  Data Control Language (DCL): Specify access and permissions GRANT, REVOKE Data Manipulation Language (DML): Work with data SELECT * FROM Employees INSERT INTO Students
Logical Organization Catalogs: group of schemas Schema: group of related tables, views Implementation is up to vendor Some vendors use catalogs, some don’t Vendors have different levels of support for schemas
Databases ‘ Database’ is not an ANSI specification Most vendors have a database object In practice, schema and database tend to be viewed interchangeably Schema defines the contents of a database May have sub-schemas to reflect application needs (include only a portion of the database)
Coding One command may extend across several lines [Enter] doesn’t represent the end of a statement SQL uses ; (semi-colon) to identify statement end ; is optional in SQL Server Keywords are capitalized CREATE DATABASE MyNewDatabase No standard conventions for naming Typically use Pascal case naming with each new word capitalized
Naming Requirements Object names are not typically case sensitive Delimited identifiers wrap names in double quotes and ARE case sensitive “ MyNewTable” uses double quotes to identify the object name Single quotes identify strings (text) Can use letters, numbers, underscore Can’t use spaces, punctuation
Qualified Names A qualified name defines explicitly how to find an object ‘ .’ is used as separator SQL Server uses ServerName.DatabaseName.OwnerName.ObjectName OR ServerName.DatabaseName.SchemaName.ObjectName
Coding Reference SQL Server uses special characters to identify different parts of commands End of statement:  ; Optional in SQL Server Placeholder:  <> Placeholder Definition:  ::= Optional Parameter(s):  [ ] Specific Parameter Values:  { } Value Separator:  | List Separator:  ,
Placeholder Example Basic command definition: ON UPDATE  <referential action> <referential action> ::=  CASCADE|SET NULL <referential action>  is placeholder CASCADE|SET NULL  is placeholder definition (placeholder value must be one of these choices)
Management Studio Microsoft GUI for most SQL Server operations Additional applications manage overall server security, business intelligence Separate application from SQL Server Uses a connection to send commands and capture results SQL Server is not something we’ll work with directly

More Related Content

PDF
Sql tutorial-Structured query language
PPT
Xml Session No 1
PPTX
Web programming xml
PPT
Introduction to Oracle
Sql tutorial-Structured query language
Xml Session No 1
Web programming xml
Introduction to Oracle

What's hot (17)

PPT
PPT
Jstl &amp; El
PPT
XML Schema
PPTX
Structured Query Language (SQL)
PPT
PDF
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
PDF
Android de la A a la Z XML Ulises Gonzalez
PPTX
XML, DTD & XSD Overview
PPTX
DTD
PPTX
Xml schema
PPT
10. XML in DBMS
PPT
PPTX
Xml ppt
PPT
XML Presentation-2
Jstl &amp; El
XML Schema
Structured Query Language (SQL)
M.FLORENCE DAYANA WEB DESIGN -Unit 5 XML
Android de la A a la Z XML Ulises Gonzalez
XML, DTD & XSD Overview
DTD
Xml schema
10. XML in DBMS
Xml ppt
XML Presentation-2
Ad

Viewers also liked (18)

PPTX
C# programming language
PPTX
Introduction to Database SQL & PL/SQL
PPTX
Computer Programming Overview
PPTX
PPTX
C Programming Language Tutorial for beginners - JavaTpoint
PPT
Types of Software Testing
PPT
Dbms
PPTX
Jira as a Tool for Test Management
PPT
Using JIRA Software for Issue Tracking
PPSX
INTRODUCTION TO C PROGRAMMING
PPTX
Software Testing Basics
PPT
Lect 1. introduction to programming languages
PPT
Basics of C programming
PDF
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
PDF
Introduction To Jira
PDF
Introduction to JIRA & Agile Project Management
PPT
Software Testing Fundamentals
PPTX
Software testing ppt
C# programming language
Introduction to Database SQL & PL/SQL
Computer Programming Overview
C Programming Language Tutorial for beginners - JavaTpoint
Types of Software Testing
Dbms
Jira as a Tool for Test Management
Using JIRA Software for Issue Tracking
INTRODUCTION TO C PROGRAMMING
Software Testing Basics
Lect 1. introduction to programming languages
Basics of C programming
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Introduction To Jira
Introduction to JIRA & Agile Project Management
Software Testing Fundamentals
Software testing ppt
Ad

Similar to Sql Overview (20)

PDF
Sql tutorial
PPTX
introduction to SQL query language beginner.ppt
PPTX
Sql presntation
PPTX
SQL OVERVIEW for a new introduced student.pptx
DOCX
Database Management Lab -SQL Queries
PPT
Introduction to Oracle
PDF
Advanced SQL - Database Access from Programming Languages
PPT
Database management and System Development ppt
PPT
Module02
PPT
PPTX
DBMS Part-3.pptx
PPT
SQL Server 2008 for Developers
PDF
Oracle Introduction
PDF
Dbmsunit v
PDF
Procedural Language/Structured Query Language
DOCX
Oracle Fundamental and PL-SQL.docx
PPTX
Dynamic and Embedded SQL for db practices.pptx
PPTX
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
PPTX
What is SQL Server?
PDF
Oracle11gdevtrainingindelhincr
Sql tutorial
introduction to SQL query language beginner.ppt
Sql presntation
SQL OVERVIEW for a new introduced student.pptx
Database Management Lab -SQL Queries
Introduction to Oracle
Advanced SQL - Database Access from Programming Languages
Database management and System Development ppt
Module02
DBMS Part-3.pptx
SQL Server 2008 for Developers
Oracle Introduction
Dbmsunit v
Procedural Language/Structured Query Language
Oracle Fundamental and PL-SQL.docx
Dynamic and Embedded SQL for db practices.pptx
20190326165338_ISYS6508-PPT5-W5-S6-R0.pptx
What is SQL Server?
Oracle11gdevtrainingindelhincr

More from Randy Riness @ South Puget Sound Community College (20)

Sql Overview

  • 2. Structured Query Language Language used to work with databases Used in ‘back end’ Typically not part of user interface (don’t expect users to type in a query…)
  • 3. SEQEL to SQL Structured English Query Language developed by IBM Other companies developed similar products ANSI set standards in 1986 Standards are ‘open’ Different vendors have different levels of conformance
  • 4. SQL Most languages are procedural Describe how to perform a task SQL is non-procedural (declarative) Code describes results Includes some procedural components If … Then, Loops Database apps typically use both types of languages Procedural languages manage interface, data requests SQL manages data storage and retrieval
  • 5. Types of SQL Statements Data Definition Language (DDL): Create/edit objects CREATE, ALTER Data Control Language (DCL): Specify access and permissions GRANT, REVOKE Data Manipulation Language (DML): Work with data SELECT * FROM Employees INSERT INTO Students
  • 6. Logical Organization Catalogs: group of schemas Schema: group of related tables, views Implementation is up to vendor Some vendors use catalogs, some don’t Vendors have different levels of support for schemas
  • 7. Databases ‘ Database’ is not an ANSI specification Most vendors have a database object In practice, schema and database tend to be viewed interchangeably Schema defines the contents of a database May have sub-schemas to reflect application needs (include only a portion of the database)
  • 8. Coding One command may extend across several lines [Enter] doesn’t represent the end of a statement SQL uses ; (semi-colon) to identify statement end ; is optional in SQL Server Keywords are capitalized CREATE DATABASE MyNewDatabase No standard conventions for naming Typically use Pascal case naming with each new word capitalized
  • 9. Naming Requirements Object names are not typically case sensitive Delimited identifiers wrap names in double quotes and ARE case sensitive “ MyNewTable” uses double quotes to identify the object name Single quotes identify strings (text) Can use letters, numbers, underscore Can’t use spaces, punctuation
  • 10. Qualified Names A qualified name defines explicitly how to find an object ‘ .’ is used as separator SQL Server uses ServerName.DatabaseName.OwnerName.ObjectName OR ServerName.DatabaseName.SchemaName.ObjectName
  • 11. Coding Reference SQL Server uses special characters to identify different parts of commands End of statement: ; Optional in SQL Server Placeholder: <> Placeholder Definition: ::= Optional Parameter(s): [ ] Specific Parameter Values: { } Value Separator: | List Separator: ,
  • 12. Placeholder Example Basic command definition: ON UPDATE <referential action> <referential action> ::= CASCADE|SET NULL <referential action> is placeholder CASCADE|SET NULL is placeholder definition (placeholder value must be one of these choices)
  • 13. Management Studio Microsoft GUI for most SQL Server operations Additional applications manage overall server security, business intelligence Separate application from SQL Server Uses a connection to send commands and capture results SQL Server is not something we’ll work with directly

Editor's Notes

  • #3: 04/08/10 CIS-182 SQL