Types of SQL Commands Farrokh Alemi, PhD

Slides:



Advertisements
Similar presentations
Query Methods (SQL). What is SQL A programming language for databases. SQL (structured Query Language) It allows you add, edit, delete and run queries.
Advertisements

Basic SQL Introduction Presented by: Madhuri Bhogadi.
What is MySQL? MySQL is a relational database management system (A relational database stores data in separate tables rather than putting all the data.
A Guide to MySQL 7. 2 Objectives Understand, define, and drop views Recognize the benefits of using views Use a view to update data Grant and revoke users’
A Guide to SQL, Seventh Edition. Objectives Understand, create, and drop views Recognize the benefits of using views Grant and revoke user’s database.
INFORMATION TECHNOLOGY IN BUSINESS AND SOCIETY SESSION 16 – SQL SEAN J. TAYLOR.
Database Management System Lecture 2 Introduction to Database management.
Nichelle K. Norris IS 373: World Wide Web Standards.
ASP.NET Programming with C# and SQL Server First Edition
Learningcomputer.com SQL Server 2008 – Introduction to Transact SQL.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
CS 474 Database Design and Application Terminology Jan 11, 2000.
1 Welcome: To the second learning sequence “ Data Base (DB) and Data Base Management System (DBMS) “ Recap : In the previous learning sequence, we discussed.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
1 Working with MS SQL Server Textbook Chapter 14.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Working with MSSQL Server Code:G0-C# Version: 1.0 Author: Pham Trung Hai CTD.
1 Copyright © 2004, Oracle. All rights reserved. Introduction.
Database Design and Management CPTG /23/2015Chapter 12 of 38 Functions of a Database Store data Store data School: student records, class schedules,
Instructor: Dema Alorini Database Fundamentals IS 422 Section: 7|1.
M1G Introduction to Database Development 5. Doing more with queries.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
Intro to Programming Web Design ½ Shade Adetoro. Programming Slangs IDE - Integrated Development Environment – the software in which you develop an application.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. DATABASE.
1 A Very Brief Introduction to Relational Databases.
SQL Basics Review Reviewing what we’ve learned so far…….
Concepts of Database Management, Fifth Edition Chapter 3: The Relational Model 2: SQL.
© 2017 by McGraw-Hill Education. This proprietary material solely for authorized instructor use. Not authorized for sale or distribution in any manner.
Database Principles: Fundamentals of Design, Implementation, and Management Chapter 1 The Database Approach.
Database and Cloud Security
SELECT, IMPLEMENT & USE TODAY’S ADVANCED BUSINESS SYSTEMS
Aga Private computer Institute Prepared by: Srwa Mohammad
ASP.NET Programming with C# and SQL Server First Edition
DBMS and SQL.
Running a Forms Developer Application
MySQL: Part II.
Introduction To Database IT-402
Microsoft Access 2013 Bobby Wan.
REV 00 Chapter 4 SQL and QBE DDC 2483 – Database Systems.
Introduction to Triggers
Dead Man Visiting Farrokh Alemi, PhD Narrated by …
What is a Database and Why Use One?
Basic Concepts in Data Management
Chapter 8 Working with Databases and MySQL
Microsoft Word - Formatting Pages
Automating reports with Python
Introduction to Computer Programming
Introduction to TouchDevelop
Teaching slides Chapter 8.
What Are Databases? Organized by Dr. Farrokh Alemi PhD
SELECT & FROM Commands Farrokh Alemi, PhD
Structured Query Language
Creating Tables & Inserting Values Using SQL
A Guide to SQL, Eighth Edition
CS122 Using Relational Databases and SQL
Access: Access Basics Participation Project
Indexing & Computational Efficiency
M1G Introduction to Database Development
Contents Preface I Introduction Lesson Objectives I-2
Chapter 1 Database Systems
REST APIs Maxwell Furman Department of MIS Fox School of Business
CS1222 Using Relational Databases and SQL
Database Management Systems
Queries.
Database SQL.
CS122 Using Relational Databases and SQL
Presentation transcript:

Types of SQL Commands Farrokh Alemi, PhD This set of slides were organized by Professor Alemi

Introduction to SQL This section of the course introduces you to Standard Query Language and key commands within it. SQL is a standard language for accessing and manipulating relational databases. SQL is an American National Standards Institute standard, its core commands are the same across vendors. The current standard is from 1999, which is incredibly long time for a standard to remain stable. This is in part due to the fact that SQL is well suited to the task of data manipulation.

Data Manipulation Commands The data manipulation language is designed to add, change, and remove data from a database. In this section, we primarily focus on data manipulation commands. Some examples of SQL commands include commands to retrieve data from a database, to insert data in a database, to update data already in the database, and to delete data from a database.

Data Definition Commands SQL also includes data definition language. These commands are used to create a database, modify its structure, and destroy it when you no longer need it. We will later discuss how one creates tables or deletes them. There are also different types of tables. There are for example, temporary tables of data that delete when you close your SQL data management software.

Data Control Commands SQL also includes data control language. These commands protect the database from unauthorized access, from harmful interaction among multiple database users, and from power failures and equipment malfunctions. We will not cover these commands in this course.

SELECT, INTO, FROM, COUNT, MIN, MAX, WHERE, HAVING, & GROUP BY The list of SQL commands is short. That is good news, your task is simple. The bad news is that these commands can be used in a variety of ways to accomplish different tasks. In this section of the course we go over five of these commands: select, into, from, where, and group by commands.

Learn format from the Web I learn more out of a web search than I could from asking my instructor One usually learns the format for the command through searches on the web. I assume that you can do so on your own. In fact, whenever you run into an error you should always search for the error on the web and you will see many instances of others posting solutions to your problem. Do this first because this is the best way to get your problems solved. Most students of SQL admit that they learned more from web searches than any instruction. The beauty of such learning is that you learn just enough to solve your problem at hand.

Not Compiled SQL code is not compiled and you can run just a small portion of the code. This helps de-bug faster as the portion with the error can be quickly identified. Lack of compiling does reduce the speed of the code.

-- This text is a comment Comment out line by line until you find the error Anything to the right of two dashed lines is considered a comment and ignored by the SQL server. When you have an error that is particularly difficult to figure out, comment out the code line by line until you find the line where the error is occurring.

Learn as You Go Yay! To understand SQL commands, always seek an example that demonstrate the command. Don’t just read about the command, try it out on data. Take a look at a simple example and make it work. You can learn the exact format and other examples later. You can’t learn SQL without practice and you can’t practice without downloading some data and writing SQL code.

Try Your Hand at Coding SQL is not learned from books, keep trying it out, and eventually you will become proficient.