Sam Quantz Salt Lake City School District January 21, 2014.

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.
Murach’s Java SE 6, C21© 2007, Mike Murach & Associates, Inc.Slide 1.
Database Theory Each Table in a Database needs a Primary Key Data TypesDescriptionExample TextCharacters (Letters, numbers and symbols) ABC 123 NumberNumerical.
Accounting System Design
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 4-1 David M. Kroenke Database Processing Chapter 2 Structured Query Language.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 8 Foundations of Relational Implementation.
CSE 190: Internet E-Commerce Lecture 10: Data Tier.
ASP.NET Database Connectivity I. 2 © UW Business School, University of Washington 2004 Outline Database Concepts SQL ASP.NET Database Connectivity.
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
© 2002 by Prentice Hall 1 SI 654 Database Application Design Winter 2003 Dragomir R. Radev.
CSC 2720 Building Web Applications Database and SQL.
Database Systems Lecture 5 Natasha Alechina
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Akhila Kondai October 30, 2013.
1 IT420: Database Management and Organization SQL: Structured Query Language 25 January 2006 Adina Crăiniceanu
Microsoft Access Review for Access Exam. Columns are called FIELDS Rows are called RECORDS Navigation Pane:  On left; used to organize DB objects  Collapsable.
Database Lecture # 1 By Ubaid Ullah.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
SQL advanced select using Oracle 1 7. Multiple Tables: Joins and Set Operations 8. Subqueries: Nested Queries.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
Structure Query Language SQL. Database Terminology Employee ID 3 3 Last name Small First name Tony 5 5 Smith James
FEN  Data Definition: CREATE TABLE, ALTER TABLE  Data Manipulation: INSERT, UPDATE, DELETE  Queries: SELECT SQL: Structured Query Language.
BTM 382 Database Management Chapter 7 Introduction to Structured Query Language (SQL) Chitu Okoli Associate Professor in Business Technology Management.
FEN Introduction to the database field:  The Relational Model Seminar: Introduction to relational databases.
SQL: DDL. SQL Statements DDL - data definition language –Defining and modifying data structures (metadata): database, tables, views, etc. DML - data manipulation.
CS146 References: ORACLE 9i PROGRAMMING A Primer Rajshekhar Sunderraman
Chapter 8 Foundations of Relational Implementation David M. Kroenke Database Processing © 2000 Prentice Hall.
1 Why Learn About Database Systems? Database systems process and organize large amounts of data Examples –Marketing manager can access customer data –Corporate.
Chapter 9 Structured Query Language David M. Kroenke Database Processing © 2000 Prentice Hall.
Programming in R SQL in R. Running SQL in R In this session I will show you how to: Run basic SQL commands within R.
Information Building and Retrieval Using MySQL Track 3 : Basic Course in Database.
Database revision.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
SQL introduction 2013.
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,
SQL advanced select using Oracle 1. 2 Select Simple –data from a single table Advanced –data from more tables join sub-queries.
Presentation On How To Create Connection To A Database.
Using FileMaker Pro for PowerSchool Reporting Tim Scoff
Database Management Supplement 1. 2 I. The Hierarchy of Data Database File (Entity, Table) Record (info for a specific entity, Row) Field (Attribute,
DAY 21: MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Aliya Farheen October 29,2015.
SQL in Oracle. Set up Oracle access at IU You need to install Oracle Client: – – For windows:
(SQL - Structured Query Language)
WEEK# 12 Haifa Abulaiha November 02,
Chapter 3: Relational Databases
FEN Introduction to the database field: The development process Seminar: Introduction to relational databases Development process: Analyse.
7 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel 7.6 Advanced Select Queries SQL provides useful functions that.
Databases Introduction - concepts. Concepts of Relational Databases.
MICROSOFT ACCESS – CHAPTER 5 MICROSOFT ACCESS – CHAPTER 6 MICROSOFT ACCESS – CHAPTER 7 Sravanthi Lakkimsety Mar 14,2016.
 MySQL  DDL ◦ Create ◦ Alter  DML ◦ Insert ◦ Select ◦ Update ◦ Delete  DDL(again) ◦ Drop ◦ Truncate.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
SQL - Training Rajesh Charles. Agenda (Complete Course) Introduction Testing Methodologies Manual Testing Practical Workshop Automation Testing Practical.
Aga Private computer Institute Prepared by: Srwa Mohammad
INTRODUCTION TO DATABASES (MICROSOFT ACCESS)
, MS-Access, QBE, Access/Oracle
SQL in Oracle.
Principles of Software Development
DATABASE SQL= Structure Query Language مبادئ قواعد بيانات
Databases and Information Management
SQL 101.
Structured Query Language (SQL) William Klingelsmith
Workbench Data Definition Language (DDL)
قـواعــــد الـبـيــانــات
مقدمة في قواعد البيانات
SQL Fundamentals in Three Hours
Databases and Information Management
Databases Continued 10/18/05.
DATABASE Purpose of database
SQL (Structured Query Language)
Presentation transcript:

Sam Quantz Salt Lake City School District January 21, 2014

What is SQL SQL is a special purpose programming language designed for managing data in a relational database ( DDL (data definition language) (database object statements such as create) DML (data manipulation language) (statements like select, delete, and update)

Query Tools Microsoft Access (Good visual interface, not available on Macs) Oracle SQL Developer (Free runs on Java and works on Windows or Macs) Toad for Oracle (Expensive) Others

How to find Tables and View in PowerSchool Tables vs. Views Data Dictionary DDE/DDA Custom Page Management

Parts of a SQL statement SELECT column names FROM table names (Can include more than one table through joins) WHERE conditions GROUP BY column names. Used to group data. For use with built in functions, such as COUNT(),SUM(),AVG(), etc… ORDER BY column names.

Now you try Get student number, schoolid, grade_level Schoolid 100 Grade_level 9

Answer Select student_number, schoolid, grade_level From students where schoolid=100 and grade_level=9

Try again Get student_number, schoolid, grade_level Schoolid 100 Grade_level 9 or grade_level 10

Answer Select student_number, schoolid, grade_level From students where schoolid=100 and (grade_level=9 or grade_level=10)

Table Joins How tables relate to each other Primary vs. Foreign Keys Inner Joins Outer Joins Left Right

Foreign Keys Students TableSpenrollements Table

Now you try Get name, student_number, program id, program start date, program exit date From students and spenrollments Studentid is 200

Answer Select s.student_number, s.lastfirst, sp.programid, sp.enter_date, sp.exit_date From students s join spenrollments sp on s.id = sp.studentid Where s.id = 200

Accessing custom fields View PVSIS_CUSTOM_STUDENTS Use function ps_customfields.getstudentscf(studentid,field_name)

Example Select s.student_number, s.lastfirst, sp.programid, sp.enter_date, sp.exit_date, ps_customfields.getstudentscf(s.id,'bike_brand') bike_brand From students s join spenrollments sp on s.id = sp.studentid Where s.id = 200

PowerViews PVSIS_ PSSIS_