Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language.

Similar presentations


Presentation on theme: "Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language."— Presentation transcript:

1 Introduction to SEQUEL

2 What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language to access & manipulate data and structures within a relational database. Standard language to access & manipulate data and structures within a relational database. See the Basics of SEQUEL tutorial for more information: http://www.w3schools.com/sql/default.as p See the Basics of SEQUEL tutorial for more information: http://www.w3schools.com/sql/default.as p http://www.w3schools.com/sql/default.as p http://www.w3schools.com/sql/default.as p

3 What is MySQL? A DBMS with application development tools for building client/server apps. A DBMS with application development tools for building client/server apps. Contains multiple data structures: Contains multiple data structures: Tables for data storage Tables for data storage Views for holding data from tables Views for holding data from tables Sequence for generating primary key Sequence for generating primary key Index for improving performance of queries Index for improving performance of queries

4 Accessing the MySQL Environment Register for your student Web space and log in to the C-panel. Video instructions can be found at http://www4.uwm.edu/sois/resources/it/w ebspace/ Register for your student Web space and log in to the C-panel. Video instructions can be found at http://www4.uwm.edu/sois/resources/it/w ebspace/ http://www4.uwm.edu/sois/resources/it/w ebspace/ http://www4.uwm.edu/sois/resources/it/w ebspace/ Click the “home” icon at the top-left. Click the “home” icon at the top-left. Click “phmMyAdmin” under “Databases” Click “phmMyAdmin” under “Databases”

5 Input Area Used for writing scripts Used for writing scripts Supports use of Backspace and Delete Supports use of Backspace and Delete Supports Cut, Copy, & Paste functions Supports Cut, Copy, & Paste functions

6 Script Output Displayed on Work Screen below Input Area Displayed on Work Screen below Input Area OR OR Displayed on a separate window Displayed on a separate window OR OR Saved to a file on client machine Saved to a file on client machine

7 SEQUEL Features Uses set English phrases to manipulate database Uses set English phrases to manipulate database Non procedural (Specify information not navigation or operations to access data). Non procedural (Specify information not navigation or operations to access data). Encompass a range of users - DBA's, application programmers, management and end users. Encompass a range of users - DBA's, application programmers, management and end users.

8 SEQUEL Rules Commands may be on one or many lines Commands may be on one or many lines Clauses are placed on separate lines Clauses are placed on separate lines Command words are split across lines Command words are split across lines Commands are not case sensitive Commands are not case sensitive Command entered at SEQUEL prompt Command entered at SEQUEL prompt

9 SEQUEL Enabled Tasks Query data Query data Insert, update and delete data Insert, update and delete data Create, modify and delete database objects Create, modify and delete database objects Control access to database and its objects Control access to database and its objects Guarantee database consistency Guarantee database consistency Monitor database performance & configuration Monitor database performance & configuration

10 SEQUEL Sub-languages Data Control Language Data Control Language Used to give and take access rights to database objects. Used to give and take access rights to database objects. E.g. RIGHTS REVOKE GRANT E.g. RIGHTS REVOKE GRANT RIGHTS DATA DEFINITION LANGUAGE DATA DEFINITION LANGUAGE Used to manipulate database structures and definitions. Used to manipulate database structures and definitions. E.g. DROP TRUNCATE CREATE ALTER E.g. DROP TRUNCATE CREATE ALTER

11 SEQUEL Sub-language (Cont’d) DATA MANIPULATION LANGUAGE DATA MANIPULATION LANGUAGE Used to change database data. Used to change database data. E.g. INSERT, UPDATE, DELETE E.g. INSERT, UPDATE, DELETE DATA QUERY LANGUAGE DATA QUERY LANGUAGE Used to get data from the database and impose ordering upon it. Used to get data from the database and impose ordering upon it. E.g. SELECT E.g. SELECT Transaction Control Transaction Control E.g. COMMIT, ROLLBACK, SAVEPOINT E.g. COMMIT, ROLLBACK, SAVEPOINT

12 DATA DEFINITION LANGUAGE (DDL) A set of commands to create, modify and delete database structures (not data). A set of commands to create, modify and delete database structures (not data). Are immediate, not susceptible to ROLLBACK commands. Are immediate, not susceptible to ROLLBACK commands. Only for users having CREATE object privilege and a Table space area to create objects (DBA, database designer, application developer). Only for users having CREATE object privilege and a Table space area to create objects (DBA, database designer, application developer).

13 Some DDL Tasks Creating tables with constraints Creating tables with constraints Creating tables with constraints Creating tables with constraints Altering tables and constraints Altering tables and constraints Altering tables and constraints Altering tables and constraints Deleting tables and constraints Deleting tables and constraintseleting tables and constraintseleting tables and constraints Renaming database objects Renaming database objects Renaming database objects Renaming database objects Deleting all data from a table Deleting all data from a table Deleting all data from a table Deleting all data from a table Indexes, Sequences, Views Indexes, Sequences, Views IndexesSequencesViews IndexesSequencesViews

14 DATA MANIPULATION LANGUAGE (DML) Data manipulation language is the area of SEQUEL that allows you to change data within the database. Data manipulation language is the area of SEQUEL that allows you to change data within the database. Consists of three command statement groups - INSERT, UPDATE and DELETE. Consists of three command statement groups - INSERT, UPDATE and DELETE.

15 Some DML Tasks Inserting new rows into a table Inserting new rows into a table Inserting new rows into a table Inserting new rows into a table Copying rows from another table Copying rows from another table Copying rows from another table Copying rows from another table Changing row values with UPDATE Changing row values with UPDATE Changing row values with UPDATE Changing row values with UPDATE Using Subqueries in an UPDATE command Using Subqueries in an UPDATE command Using Subqueries in an UPDATE command Using Subqueries in an UPDATE command Deleting rows with DELETE Deleting rows with DELETE Deleting rows with DELETE Deleting rows with DELETE Transactions Transactions Transactions

16 DATA QUERY LANGUAGE (DQL) The SELECT statement is the heart of SEQUEL. The SELECT statement is the heart of SEQUEL. It allows retrieving & processing data from database. It allows retrieving & processing data from database.  Result of a SELECT is compiled into a temporary table, displayed on the screen.

17 Some DQL Tasks Get all table data Get all table data Get all table data Get all table data Perform arithmetic on column values as they are queried Perform arithmetic on column values as they are queried Perform arithmetic on column values as they are queried Perform arithmetic on column values as they are queried Preventing duplicate row selection Preventing duplicate row selection Preventing duplicate row selection Preventing duplicate row selection Slice the result set by row number Slice the result set by row number Slice the result set by row number Slice the result set by row number Breaking result sets into groups Breaking result sets into groups Breaking result sets into groups Breaking result sets into groups Using SELECT against more than one table Using SELECT against more than one table Using SELECT against more than one table Using SELECT against more than one table Queries on Queries Queries on Queries Queries on Queries on Queries

18 Data Control Language (DCL) Oracle implements a decentralized security model. Oracle implements a decentralized security model. DBA creates a user and issues various system privileges. DBA creates a user and issues various system privileges. System object rights are given and taken away by GRANT and REVOKE. System object rights are given and taken away by GRANT and REVOKE.

19 Some DCL Tasks Object Privileges - GRANT Object Privileges - GRANT Object Privileges - GRANT Object Privileges - GRANT Object Privileges - REVOKE Object Privileges - REVOKE Object Privileges - REVOKE Object Privileges - REVOKE

20 Learning Resources (Refer to your syllabus for URLs) Basics of SEQUEL Tutorial Basics of SEQUEL Tutorial MySQL Manual 5.6 Chapters 11 & 13 MySQL Manual 5.6 Chapters 11 & 13 MySQL Tutorial 5 MySQL Tutorial 5 Sample Scripts can be found in this week’s Content module on D2L. Sample Scripts can be found in this week’s Content module on D2L.


Download ppt "Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language."

Similar presentations


Ads by Google