Chap06.pdf - CSC 4710 CSC 6710 Database Systems When needed we will use them*Material based on Fundaments of DATABASE SYSTEMS 7th Edition(Elmasri

Chap06.pdf - CSC 4710 CSC 6710 Database Systems When needed...

This preview shows page 1 - 10 out of 60 pages.

CSC 4710 / CSC 6710 Database Systems Rao Casturi *Material based on Fundaments of DATABASE SYSTEMS 7 th . Edition (Elmasri & Navathe) ** Additional comments, slides are added by Rao Casturi When needed we will use them
CHAPTER 6 Basic SQL Rao Casturi - GSU - Database Systems 2
Chapter 6 Outline SQL Data Definition and Data Types Specifying Constraints in SQL Basic Retrieval Queries in SQL INSERT , DELETE , and UPDATE Statements in SQL Additional Features of SQL Rao Casturi - GSU - Database Systems 3
Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL The origin of SQL is relational predicate calculus called tuple calculus which was proposed initially as the language SQUARE. SQL Actually comes from the word “SEQUEL” which was the original term used in the paper: “SEQUEL TO SQUARE” by Chamberlin and Boyce. IBM could not copyright that term, so they abbreviated to SQL and copyrighted the term SQL. Now popularly known as “Structured Query language”. SQL is an informal or practical rendering of the relational data model with syntax Rao Casturi - GSU - Database Systems 4
Rao Casturi - GSU - Database Systems 5
Relational Algebra and Relational Calculus The basic set of operations for the relational model is the Relational Algebra (RA) These operations enable a user to specify basic retrieval requests as relational algebra expressions . The result of a retrieval is a new relation, which may have been formed from one or more relations Relational Calculus (RC) provides a higher-level declarative language for specifying relational queries. We will discuss RA and RC in next lecture Important in query optimization and understanding the internal working of RDBMS Rao Casturi - GSU - Database Systems 6
SQL Data Definition, Data Types, Standards Terminology: Table , row , and column used for relational model terms relation , tuple , and attribute Rao Casturi - GSU - Database Systems 7 SQL Command Category DDL Create Drop Alter DML Select Insert Delete Update DCL Grant Revoke DDL Commit Rollback Transaction Save
SQL Command Category Rao Casturi - GSU - Database Systems Category Description Commands Purpose DDL Data Definition Language CREATE, DROP, ALTER Schema change DML Data Manipulation Language SELECT, INSERT, UPDATE, DELETE Schema State change DCL Data Control Language GRANT, REVOKE Access control TCL Transaction Control Language COMMIT, ROLLBACK, SAVE TRANSACTION Data Process control 8
Schema and Catalog Concepts in SQL We cover the basic standard SQL syntax –