tutorial.sql Assignment



Similar documents
Personal Portfolios on Blackboard

How to Copy A SQL Database SQL Server Express (Making a History Company)

DDN CUSTOMER SUPPORT COMMUNITY QUICK START GUIDE

Ricardo Perdigao, Solutions Architect Edsel Garcia, Principal Software Engineer Jean Munro, Senior Systems Engineer Dan Mitchell, Principal Systems

Microsoft Exchange Hosted Archive (MEHA)

Setting Up ALERE with Client/Server Data

Enter your User Id and Password and click the Log In button to launch the application.

ACCESSING THE PARAGON SYSTEM PARAGON WEBSITE ADDRESS:

Getting Started In Your Davidson College Blackboard Course

TIMETABLE ADMINISTRATOR S MANUAL

8x8 Click2Pop User Guide

CEFNS Web Hosting a Guide for CS212

Remedy ITSM Service Request Management Quick Start Guide

SAS Visual Analytics 7.1 for SAS Cloud. Quick-Start Guide

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

Create a Simple Website. Intel Easy Steps Intel Corporation All rights reserved.

Kentico Content Management System (CMS

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

A Tutorial on SQL Server CMPT 354 Fall 2007

Published. Technical Bulletin: Use and Configuration of Quanterix Database Backup Scripts 1. PURPOSE 2. REFERENCES 3.

1. Tutorial Overview

Video Administration Backup and Restore Procedures

HOW TO USE OIT VIA THE WEB

QUANTIFY INSTALLATION GUIDE

Information Technology Services

21 What is a threaded discussion on a Blackboard Discussion Board list? 22 Where do I access a Group Discussion on Blackboard?

ilaw Installation Procedure

MySQL Manager. User Guide. July 2012

Installation Guide. . All right reserved. For more information about Specops Inventory and other Specops products, visit

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

ADA Applicant Business Process Guide

OUTLOOK WEB APP (OWA): MAIL

Florida National University Online Courses Platform

How To Use Query Console

For further support information, refer to the Help Resources appendix. To comment on the documentation, send an to

Using Outlook Web Access

March Module 3 Processing MOVES Output

UNIT ASSESSMENT SYSTEM DOCUMENTATION FACULTY

Hamline University Administrative Computing Page 1

INTRODUCTION TO THE LS360 LMS

Acrolinx IQ. Acrolinx IQ Plug-in for Adobe CQ Rich Text Editor Installation Guide Version: 2.9

LABSHEET 1: creating a table, primary keys and data types

Specops Command. Installation Guide

Introduction to Windows XP

JMC Next Generation Web-based Server Install and Setup

Welcome to Collage (Draft v0.1)

Aradial Installation Guide

Getting Started in Moodle

Rational Software. Getting Started with Rational Customer Service Online Case Management. Release 1.0

SAS Visual Analytics 7.2 for SAS Cloud: Quick-Start Guide

PC Troubleshooting Steps

Basic SQL Server operations

CUNY TUMBLEWEED (SECURE TRANSPORT) USER GUIDE

DISTANCE EDUCATION. Blackboard Learn - Getting Started Guide for Students. VISIT US ONLINE AT

Charter Business Phone. Online Control Panel Getting Started Guide. Document Version 1.0

ecopy ShareScan 5.0 SQL installs guide

Technical Bulletin. SQL Express Backup Utility

Outlook Web Application (OWA) Basic Training

We begin with a number of definitions, and follow through to the conclusion of the installation.

InventoryControl for use with QuoteWerks Quick Start Guide

Remote Viewer Recording Backup

Cypress Connexion HELP Guide

Welcome to the documentation on how to use the new Andrews University Content Management System (CMS) to manage your Andrews website.

How To Sync Google Drive On A Mac Computer With A Gmail Account On A Gcd (For A Student) On A Pc Or Mac Or Mac (For An Older Person) On An Ipad Or Ipad (For Older People) On

Business Objects InfoView Quick-start Guide

Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.

How to File the FBAR Electronically. The following steps describe the process of filing an FBAR electronically with our system.

Access to Moodle. The first session of this document will show you how to access your Lasell Moodle course, how to login, and how to logout.

Open OWA by going to Provide your user name and password.

Getting Started using the SQuirreL SQL Client

Getting Ready for Web Ticket Training

HOW TO Share Files & Folders in Google Drive

exacqvision Web Server Quick start Guide

How to Edit Your Website

Database Forms and Reports Tutorial

Document Services Online Customer Guide

ITP 101 Project 3 - Dreamweaver

E-LEARNING STUDENT S MANUAL

NOTE: New directions for accessing the Parent Portal using Single Sign On

Angel Learning Management System Introductory Tutorial for Students

Neehr Perfect Educational EHR STUDENT GUIDE

How To Set Up Dataprotect

The Course Navigator also allows instructors to assess students' work, track progress, download results, and view upcoming events.

Appendix A How to create a data-sharing lab

Deploying Physical Solutions to InfoSphere Master Data Management Server Advanced Edition v11

OWA - Outlook Web App

HowTo. Planning table online

Getting Started with Microsoft Office Live Meeting. Published October 2007 Last Update: August 2009

How to configure the DBxtra Report Web Service on IIS (Internet Information Server)

Getting Started with Microsoft Office Live Meeting. Published October 2007

SAM Brief Student User Guide

Appendix K Introduction to Microsoft Visual C++ 6.0

Available on VitalSource

Welcome to Business Internet Banking

CA Service Desk Manager (SDM) r12.6 SDM Basic Navigation and Functionality

BID2WIN Workshop. Advanced Report Writing

Transcription:

tutorial.sql Assignment Complete tutorial.sql using phpmyadmin Web Based Standard for MySQL Access All Web-Hosting Companies Provide phpmyadmin Its Not for Active Production Systems The System for Testing Development tutorial Assignment Videos MySQL Pre-tutorial PHPMyAdmin: testing Database http://cim.saddlebck.edu/phpmyadmin Most Recent Version http://cim.saddleback.edu/phpmyadmin4.4 Video Version Deprecated Closed Caption http://cim.saddleback.edu/phpmyadmin3.5 http://cim.saddleback.edu/~premiere (Import in PHPMyAdmin) Import fruit.sql to create fruit tables 2 Intro to PHPmyAdmin and tutorial.sql 1 st 5 Queries Video 2: Intro to Submit and Submit tutorial.sql 1 st 5 Queries http://cim.saddleback.edu/submit Video 3: 2 nd Five Queries for tutorial.sql 9/15, 6/2011, 8/08 & 11/05 Professor T. DeDonno 2 Professor T. DeDonno CIMW 105 Hand-Out Page 1

MySQL Pre tutorial Login to PHPMyAdmin Select Your Database Import fruit.sql Creates Fruit Tables 8/15, 6/11, 8/08 & 11/2005 Professor T. DeDonno 3 Accomplished Goal Fruit Tables 4 1) Login to phpmyadmin http://cim.saddleback.edu/phpmyadmin 2) Username: sbusername, password Student Number/ID (not mysite pswd) 3) Select your database DB0username 4) Click Import tab, 5) Select premiere fruit.sql import file will create these tables Table: fruit fruitid name price 1 apple 2.50 2 pear 3.00 3 banana 1.00 4 grpe.75 8 pluot 4.50 6 plum 1.25 8/15, 6/11, 8/08 & 11/05 Professor T. DeDonno Table: inventory fruitid quantity 1 100 3 500 2 100 1 250 2 200 4 Tutorial PHPMyAdmin Import Professor T. DeDonno CIMW 105 Hand-Out Page 2

After fruit.sql import 5 8/15, 6/2011, 8/08 & 11/2005 Professor T. DeDonno Tutorial PHPMyAdmin Import 5 MySQL 1st Tutorial Goal Create First 5 Queries for tutorial.sql To Do This #T1 SQL Tabl for Show tables #T2, #T3 Navigator for Displaying Contents #T4 #T5 SQL Tab for Describe Query 6/2011, 8/08 & 11/05 Professor T. DeDonno 6 Professor T. DeDonno CIMW 105 Hand-Out Page 3

Part 1: Tutorial Assignment Objectives 7 Five Queries to Complete w Comments #T1) show tables; #T2) select * from fruit; #T3) select * from inventory; #T4) describe fruit; #T5) describe inventory; Add # comment before each Query Click SQL Tab,Write Query to Display Tables show tables; Use Navigator Display Table Contents select * from tablename; USE SQL Tab enter describe Tablename Query describe tablename; 8/15, 6/2011, 8/08 & 11/05 Professor T. DeDonno Tutorial 1 st 5 Queries 7 #T1 Show Table Names Just Created 8 I. Login to phpmyadmin http://cim.saddleback.edu/pma II. Select Your Database III. Click SQL Tab IV. Type Script show tables; V. Add # Comment VI. Optional Save Queries Locally using Text Editor 8/15, 6/2011, 8/08 & 11/05 Professor T. DeDonno Tutorial 1 st 5 Queries 8 Professor T. DeDonno CIMW 105 Hand-Out Page 4

#T2,3) Display Content fruit, inventory 9 ) 1. Left Nav-Bar Navigator 2. Click fruit Table 3. Notice Main Window Pane 4. Edit select * fruit; 5. Add Comment #T3 display newline 6. Repeat for Inventory 9 Tutorial 1 st 5 Queries #T4 & #T5) Describe tablename; 10 6/2011, 8/08 & 11/2005 Professor T. DeDonno Describe table name; Also Click Tab Structure Add comments Tutorial 1 st 5 Queries 10 Professor T. DeDonno CIMW 105 Hand-Out Page 5

Keypoint Summary Quiz 11 Can Save local version of tutorial.sq Can Also use command line interface Other Deprecated Videos Cover This PHPMyAdmin has become the defacto standard for MySQL/Database Web-Based Interface (T or F)? Unravel the location of key information (phpmyadmin, database scripts, submit) don t let the Web Guide You (T or F)? 11 9/15, 6/13, 6/11, 8/08 & 11/05 Professor T. DeDonno Tutorial 1 st 5 Queries submit Skills to Memorize!!! Learn to Set Browser Startup Pages Always Let Web Guide You Do Not Decipher Short-cuts http://cim.saddleback.edu/submit Ctrl^C Copy. Ctrl^V Paste 8/15, 6/11, 8/08 & 11/05 Professor T. DeDonno 12 Professor T. DeDonno CIMW 105 Hand-Out Page 6

21 st Century Browsing 13 Critical Skill Advance Surfer Level Pick a Browser You don t Use Chrome, Opera, IE, Safari, Konqueror FireFox, CyberFox (64 bit FirFox) I m using Chrome minimum default Real Estate Let Web Guide (Create Tab for 5 Key Sites) Open initial site either class site, blackboard, or DB http://cim.saddleback.edu/cimw105 Set Other Tabs: submit, premiere, blackboard, phpmyadmin Save Default Pages as Starting Home Page 8/15, 6/11, 8/08 & 11/05 Professor T. DeDonno 13 Setting CIMW105 Browser 14 Install a new Browser (I m using Chrome) Go to Class Site http://cim.saddleback.edu/cimw105 Right^Click Submit Assignment Link Open in New Tab Login Using your SBUsername, Student Number http://cim.saddleback.edu/submit Go Back Right^Click New Tab Premiere DB Scripts http://cim.saddleback.edu/~premiere Video/Quizzes Right^Click new tab Blackboard Link Testing DB Right^Click new tab PHPMyAdmin Link CIM Login SBUsername, Student Number 8/15, 6/11, 8/08 & 11/05 Professor T. DeDonno 14 Professor T. DeDonno CIMW 105 Hand-Out Page 7

I m Using Chrome for Class You can use whatever Student Question ( I Just Open Chrome ) CyberFox is my main browser 15 Click Control Menu Setting Login to your gmail (android) Click Set Pages 15 submit 24/7 Auto Grader 16 Creates the File tutorial.sql in your Home Folder This is not your Web Site (public_html is a sub-folder) Queries Executed using a default user/database Make sure your Queries are Working Submit is for Submitting not Debugging May turn in Assignments Multiple Times (Due Dates Matter) Last Submitted Assignment is Recorded Pay Attention to Input/Output Specifications On Error Displays Your Output Versus Solution 16 Professor T. DeDonno CIMW 105 Hand-Out Page 8

Submit Grading Table 17 List Current Grade, Date of Last Submission; Due Date (is Usually Monday at 9AM) Quizzes Generally Expire Sunday 11:55PM 25% Penalty up to 7 Days Late 50% Penalty After That Don t Resubmit Correct Assignment after Due Date Semester May End before a Sunday You cannot submit final assignments late Blackboard Welcome Announcement Key Dates 17 Submit tutorial.sql test First 5 18 Submit Link: Blackboard, Assignments, Premiere http://cim.saddleback.edu/submit Goal submit tutorial.sql first 5 Queries Use Browser s 5 Tabs Use PHPMyAdmin Console History copy (Control^C) queries then Paste (Control^V) them into submit editing pane Ctrl^C Universal Copy Ctrl^V Universal Paste Can Wait to Fix Errors in next Video Set 9/15, 6/2011, 8/08 & 11/05 Professor T. DeDonno 18 Professor T. DeDonno CIMW 105 Hand-Out Page 9

Assignment Submit Page 19 Click Accordion to Open Click for Grade Table Edit w VI or set Themes Control^G Hot Key Grade 19 MySQL 2 nd Tutorial Create & Comment 2 nd Five Queries Add Them to Submit One at a time http://cim.saddleback.edu/submit 20 Professor T. DeDonno CIMW 105 Hand-Out Page 10

Outline MySQL 2 nd Tutorial 21 Use Browser with 5 Tab Home Page Ctrl^C Copy and Ctrl^V Paste Use PMA for Queries 6..10 & Submit One at a time Copy and Paste from History can be tricky Comments for 2 nd 5 tutorial.sql Queries # T6 Display only fruit Names # T7 Display Total Inventory Quantity for all Fruit # T8 Display Fruit Name w fruitid=1 # T9 Sum All Fruit in inventory w fruitid 1 # T10 display inventory verify #7 & #9 correct 21 #T6) Select name from fruit; Login phpmyadmin Select DB SB0username Select Table fruit Start SQL Tab Select * and (click name left colum) Go Add Comment Terminate query with ; Copy & Paste into submit 22 6/2011, 8/08 & 11/2005 Professor T. DeDonno 22 Professor T. DeDonno CIMW 105 Hand-Out Page 11

Accent, Single, Double Quote 23 Use ` accent for column, table &/or DB names On Keyboard Accent is Upper Left Corner Use ' Single Quote Literal values Keyboard Right Side Shift Double Quote Use " Double Quotes : Character String #Display costs as pennies for fruit w ID of 1 select `price` * '100' as "pennies" from fruit where `fruitid` = '1'; PHPMyAdmin Inserts Accents, Quotes Automatically Critical when Variables or Views Exist Universal Single Quote Literal Quote 23 9/15, 6/2011, 8/08 & 11/2005 Professor T. DeDonno Write Query #T7 and #T8 7) #T7 Display Total Inventory Quantity for all Fruit select sum( quantity ) from inventory; 24 8) #T8 Display Fruit Name w fruitid=1 select name from fruit where fruitid=1; Table: fruit fruitid Name Price 1 Apple 2.50 2 Pear 3.00 3 Banana 1.00 4 Grpe.75 8 Pluot 4.50 6 Plum 1.25 Table: inventory fruitid quantity 1 100 3 500 2 100 1 250 2 200 Total 1150 24 Professor T. DeDonno CIMW 105 Hand-Out Page 12

Write Last 2 Queries and Save 25 9) #T9 Sum All Fruit in inventory w fruitid 1 select sum( quantity ) from inventory where fruitid=1; 10)#T10 look at output from query, then #make sure this comment verifies 7 and 9 select * from inventory; fruitid 1 100+250 = 350 Sum( quantity ) = 100+500+100+250+200 = 600 + 350+200 = 1150 25 Other Interfaces for tutorial.sql 26 Create a local tutoral.sql File Putty - Command Line Interface Batch Commands, Note All Assignments are Batch Files Actually See Submit & MySQL Input/Output MySQL Workbench PC/Mac/Linux GUI Application Install a Local Copy of MySQL & WorkBench I don t debug Failed Installation But Vary Interface Frequently & it s a Configurable Workspace Supporting PHPMyAdmin Web Based Interface Also Web-Casts NetBeans SQL Editor Programmers Interface 26 Professor T. DeDonno CIMW 105 Hand-Out Page 13

Tutorial.sql Summary 27 Control^C Copy Control^V Paste Control ^G short cut key grade submit Show Tables; Select * from fruit Where fruitid=1; Select * from fruit Where fruitid= 5; How Would you list contents of table:inventory? 27 Accent Mark (Key Below ~) Review in tutorial.sql Videos Enclose Field & Table Names in Accent Want to use reserved keyword as Table name Select * from `select`; select * from `orders`; 28 If Not MySQL May Try Variable Expansion When You Click to Create Query PHPMyAdmin Does This Automatically View Present Must Delimit Table/Field Names For Production Code Add Accents 2/14, 5/2013, 8/08 Professor T. DeDonno 28 Professor T. DeDonno CIMW 105 Hand-Out Page 14

intermediate.sql assignment 29 Get intermediate.sql http://cim.saddleback.edu/database Links Also Assignments and Blackboard Save File Locally Import or Cut and Paste One Query at a Time Tell me What each SQL cmd does You do this by adding a comment before Each line, I did this for the first Query. submit intermediate.sql Your Version Must have # Comments Before Each Query 6/2011, 8/08 & 11/2005 Professor T. DeDonno 29 Assignment File Name MOVED TO SELECT SUBMIT 30 Filenames Matters (tutorial.sql not Tutorial.sql tutorial.sql.txt) Always Include # or comments Blanks Lines also increase readability But Don t Intermingle #, -- and/or ; inside Query Statements Always end SQL query with ; semicolon Not Always Evident with PHPMyAdmin Main Link http://cim.saddleback.edu/submit Actual Location cim.saddleback.edu/~tdedonno/submit Links for Submit Everywhere, assignments, blackboard, etc. 30 Professor T. DeDonno CIMW 105 Hand-Out Page 15