SQL and Databases. Assignment 1. Create the table, and insert the data, shown in the next slide. 2. Display the first name and age for everyone that's.

Slides:



Advertisements
Similar presentations
Virtual training week 4 structured query language (SQL)
Advertisements

Copyright © by Royal Institute of Information Technology Introduction To Structured Query Language (SQL) 1.
This course has taken from This unique introductory SQL tutorial not only provides easy-to-understand SQL instructions, but it allows.
SQL SQL stands for Structured Query Language SQL allows you to access a database SQL is an ANSI standard computer language SQL can execute queries against.
Structured Query Language Part I Chapter Three CIS 218.
30-Jun-15 SQL A Brief Introduction. SQL SQL is Structured Query Language Some people pronounce SQL as “sequel” Other people insist that only “ess-cue-ell”
Mary K. Olson PS Reporting Instance – Query Tool 101.
1ISM - © 2010 Houman Younessi Lecture 3 Convener: Houman Younessi Information Systems Spring 2011.
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
Session 5: Working with MySQL iNET Academy Open Source Web Development.
CPS120: Introduction to Computer Science Information Systems: Database Management Nell Dale John Lewis.
ASP.NET Programming with C# and SQL Server First Edition
1 IT420: Database Management and Organization SQL - Data Manipulation Language 27 January 2006 Adina Crăiniceanu
LOGO 1 Lab_02: Basic SQL. 2 Outline  Database Tables  SQL Statements  Semicolon after SQL Statements?  SQL DML and DDL  SQL SELECT Statement  SQL.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Structured Query Language. SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database systems.
Database A collection of related data. Database Applications Banking: all transactions Airlines: reservations, schedules Universities: registration, grades.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
SQL: Data Manipulation Presented by Mary Choi For CS157B Dr. Sin Min Lee.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
Structured Query Language Chris Nelson CS 157B Spring 2008.
Nitin Singh/AAO RTI ALLAHABAD 1 SQL Nitin Singh/AAO RTI ALLAHABAD 2 OBJECTIVES §What is SQL? §Types of SQL commands and their function §Query §Index.
SQL for Data Retrieval. Running Example IST2102 Data Preparation Login to SQL server using your account Select your database – Your database name is.
Topic 1: Introduction to SQL. SQL stands for Structured Query Language. SQL is a standard computer language for accessing and manipulating databases SQL.
Intro to SQL Management Studio. Please Be Sure!! Make sure that your access is read only. If it isn’t, you have the potential to change data within your.
SQL Unit – 2 Base Knowledge Presented By Mr. R.Aravindhan.
STRUCTURED QUERY LANGUAGE SQL-II IST 210 Organization of Data IST210 1.
SQL. คำสั่ง SQL SQL stands for Structured Query Language is a standard language for accessing and manipulating databases.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
Fox MIS Spring 2011 Database Week 5 SQL basics SELECT, INSERT, UPDATE, DELETE.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
CIS 375—Web App Dev II SQL. 2 Introduction SQL (Structured _______ Language) is an ANSI standard language for accessing databases.ANSI SQL can execute.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Information Technology Structured Query Language Grade11.
(SQL - Structured Query Language)
Chapter 11 Database and SQL. Flat Files and Databases Flat files Databases Advantages Efficient use of resources Access control Disadvantages Security.
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
April 2002 Information Systems Design John Ogden & John Wordsworth 1 Database Design SQL (1) John Wordsworth Department of Computer Science The University.
Introduction to Database SEM I, AY Department of Information Technology Salalah College of Technology Chapter No.3 SQL.
به نام خدا SQL QUIZ جوانمرد Website: ejavanmard.blogfa.com.
SQL LANGUAGE TUTORIAL Prof: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
SQL: Structured Query Language It enables to create and operate on relational databases, which are sets of related information stored in tables. It is.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
Advanced Accounting Information Systems Day 12 Understanding the SQL Language September 21, 2009.
Structured Query Language SQL-II IST 210 Organization of Data IST2101.
SQL Structured Query Language. SQL is an ANSI (American National Standards Institute) standard computer language for accessing and manipulating database.
 MySQL is a database system used on the web  MySQL is a database system that runs on a server  MySQL is ideal for both small and large applications.
SQL SQL Ayshah I. Almugahwi Maryam J. Alkhalifa
Web Systems & Technologies
SQL Query Getting to the data ……..
MySQL DML Commands By Prof. B.A.Khivsara
Introduction to Structured Query Language(SQL)
PL/SQL LANGUAGE MULITPLE CHOICE QUESTION SET-1
Structured Query Language – The Basics
Structured Query Language (SQL) William Klingelsmith
SQL Tutorial.
Chapter 8 Working with Databases and MySQL
Introduction To Structured Query Language (SQL)
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall
Database systems Lecture 3 – SQL + CRUD
SQL Queries Chapter No 3.
Lesson Plan Instructional Objective Learning Objective
Introduction To Structured Query Language (SQL)
Structured Query Language
PHP and MySQL.
Presentation transcript:

SQL and Databases

Assignment 1. Create the table, and insert the data, shown in the next slide. 2. Display the first name and age for everyone that's in the table. 3. Display the first name, last name, and city for everyone that's not from Payson. 4. Display all columns for everyone that is over 40 years old. 5. Display all columns for everyone whose first name equals "Mary". 6. Display all columns for everyone whose first name contains "Mary". 7. Mary Ann Weber just got married to Bob Williams. She has requested that her last name be updated to Weber-Williams. 8. Sebastian Smith's birthday is today, add 1 to his age. 9. All secretaries are now called "Administrative Assistant". Update all titles accordingly. 10. Display all names using “Lastname, Firstname” 11. What’s the average Age of employees in Arizona 12. Who is the oldest employee 13. Erica Williams just quit, remove her from the table 14. Display Firstname, Lastname, and age for people between 30 and 40 years old; and order them from youngest to oldest. SHOW SCREENSHOTS FOR EACH STEP

FirstNameLastNameID (pk) agecitypositionstate JohnJones10045PaysonSales RepArizona MaryJones10125PaysonSecretaryArizona EricEdwards10232San DiegoSales RepCalifornia Mary AnnWeber10332PhoenixBookkeeperArizona GingerHowell10442MissionSecretaryTexas SebastianSmith10523Gila BendWarehouse Assistant Arizona GusGray10635McAllenSupervisorTexas Mary AnnMay10752TucsonSecretaryArizona EricaWilliams10860Show LowPayrollArizona LeroyBrown10922PinetopTechnicianArizona ElroyCleaver11022GlobeTechnicianArizona Use this table to complete your assignment.

Submit your assignment via BlackBoard

What is a Database?

SQL  Structured Query Language  Standard language for creating and manipulating a database.  DDL (Data Definition Language)- applies to the structure of the database schema  CREATE DATABASE - creates a new database  CREATE TABLE - creates a new table  DROP TABLE - deletes a table  DML (Data Manipulation Language) - apply to rows / records  SELECT - extracts data from a database  UPDATE - updates data in a database  DELETE - deletes data from a database  INSERT INTO - inserts new data into a database

 A SQL SELECT statement can be broken down into numerous elements, each beginning with a keyword. Although it is not necessary, common convention is to write these keywords in all capital letters. In this article, we will focus on the most fundamental and common elements of a SELECT statement, namely  SELECT  FROM  WHERE  ORDER BY

Examples  SELECT column_name(s) FROM table_name  SELECT * FROM Persons WHERE FirstName='Tove' AND LastName='Svendson‘ SELECT column_name(s) FROM table_name WHERE column_name operator value

 Useful aggregate functions:  AVG() - Returns the average value  COUNT() - Returns the number of rows  FIRST() - Returns the first value  LAST() - Returns the last value  MAX() - Returns the largest value  MIN() - Returns the smallest value  SUM() - Returns the sum

M`

SQL COUNT The COUNT(column_name) function returns the number of values (NULL values will not be counted) of the specified column: SELECT COUNT(column_name) FROM table_name

WAMP  Download and install WAMP Server at their official website: Test your WampServery:  Open your favorite browser  Type, OR  Hit Enter You have successfully installed WampServer on your computer if you have seen the welcome screen of WampServer.

PHP myAdmin  You can launch phpMyAdmin console by one of the following means,  Click on phpmyadmin link on WampServer welcome screen  Type: OR in the browser address bar  Hit Enter  You will be at phpMyAdmin index to manage your MySql databases.

Useful Links  -> This site will show you how to use SQL step by step  Search YouTube for video tutorials on installing WAMP