1. A plain query SELECT "LastName", "FirstName" FROM "Students" WHERE "Department" = 'CS'; Query Plan: Query plan text: "Seq Scan on "Students" (cost=0.00..12.88.

Slides:



Advertisements
Similar presentations
SUBQUERIES. ACTIVITY 4-1 Create a database called Subexamples Start a logfile called ACT4-1 Save the subtext.txt file – Copy the contents of the file.
Advertisements

SQL-week5-1 In-Class Exercise Answer IST 210 Organization of Data IST2101.
Class Scope class Student { private: string id; string firstName, lastName; float gpa; public: void Read() { cin >> id >> firstName >> lastName >> gpa;
&o1 &o12&o24&o29 &o43 &o96 &o243 &o206 &o25 “Serge” “Abiteboul” 1997 “Victor” “Vianu” paper book paper references author title year http author.
Intelligent Information Retrieval CS 336 –Lecture 2: Query Language Xiaoyan Li Spring 2006 Modified from Lisa Ballesteros’s slides.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
SQLite 1 CS440. What is SQLite?  Open Source Database embedded in Android  SQL syntax  Requires small memory at runtime (250 Kbytes)  Lightweight.
Appendix A Database Design CS Database design principles  database design: the act of deciding the schema for a database  database schema: a description.
1. Intro to the relational data model & simple SQL queries 1. What is a database? 2. What is a database management system? 3. Tables 4. The relational.
More on Views (3.6—3.7) Author: Dr. Adam Anthony For text: Database Management Systems (Ramakrishnan and Gherke)
Object-Based Databases Jose Reyes Jose. Overview Object-relational data model extends the relational data model by providing a richer type system including.
Example simpsons database
Lecture 15: Relational Algebra
Subqueries Steve Perry 1.
Chapter 8 Database Redesign We only discuss complex sub-queries.
Structure TDate struct TDate { int year, month, day; }; // Define a new data type.
SQL-5 In-Class Exercise Answer IST 210 Organization of Data IST2101.
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2009.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Database Management Systems Chapter 5 SQL.
Employee Info Manager. Employee Info Employee_id First_name Last_name cell Apartment_id.
Learning With Computers II (Level Orange) ©2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly.
The Student Registry Database Ian Van Houdt and Muna alfahad.
CS 405G: Introduction to Database Systems Instructor: Jinze Liu Fall 2007.
CS 405G: Introduction to Database Systems SQL III.
"NANOSCIENCE AND HEALTHCARE" - November 8th 2013 Firstname LASTNAME – Lab, Affiliation Brief image caption (max. 50 characters )
Query Processing and Query Optimization CS 157B Dennis Le Weishan Wang.
Fall Lab 131 CS105 Lab 13 – Logical Operator Precedence and Joining Tables Announcements: MP 3 released Friday, 11/20 Honors project due: Tuesday,
COMP 430 Intro. to Database Systems Grouping & Aggregation Slides use ideas from Chris Ré and Chris Jermaine. Get clickers today!
Access Test Solutions Fall 2014 Questions 7 and 8 Karl Lieberherr.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 10 – September 18,
CHAPTER 7 DATABASE ACCESS THROUGH WEB
Paper Title in One or Two Lines
Paper Title in One or Two Lines
Summary Set up testing environment on KISTI AMGA server
NURS6803 Clinical DB Design Katherine Sward, PhD, RN
Paper Title in One or Two Lines
Lecture#7: Fun with SQL (Part 2)
TVX-in-Industry Paper Title in One or Two Lines
CS 405G: Introduction to Database Systems
Views Materialized Views.
Paper Title in One or Two Lines
Index Structure.
Paper Title in One or Two Lines
Announcements End of SQL today (Hopefully) Comments on midterm
Relational Databases Relational Algebra (1) Select, project, join.
CSC 453 Database Systems Lecture
PHP and MySQL.
Paper Title in One or Two Lines
Introduction To Structured Query Language (SQL)
Poster Title Department of Mechanical Engineering
CMPT 354: Database System I
Paper Title in One or Two Lines
Instructor: Mohamed Eltabakh

CSC 453 Database Systems Lecture
A Very Brief Introduction to Relational Databases
Paper Title in One or Two Lines
Prepare slides in 16:9 aspect ratio
Paper Title in One or Two Lines
Paper Title in One or Two Lines
Paper Title in One or Two Lines
Firstname Lastname FISU Place and date
The Basics of Excel Part I Monday, April 3rd 2017
Paper Title in One or Two Lines
Paper Title in One or Two Lines
CASE/ISAM 2016 Digest Template Paper Title in One or Two Lines
Paper Title in One or Two Lines
Topic/Title – Introduction Slide
CSC 453 Database Systems Lecture
Title Firstname Lastname 1, Firstname Lastname 2 and Firstname Lastname 3 1 Affiliations. Dummy text, dummy text, dummy text 2 Affiliations. Dummy text,
Presentation transcript:

1. A plain query SELECT "LastName", "FirstName" FROM "Students" WHERE "Department" = 'CS'; Query Plan: Query plan text: "Seq Scan on "Students" (cost= rows=1 width=236)" " Filter: (("Department")::text = 'CS'::text)"

2 A little complex query select I."Cid",max("Grade") from "Inroll" as I, "Students" as S where S."Sid" = I."Sid" And S."Department" = 'CS' group by I."Cid"; Query Plan:

3. Nested Query select "LastName", "Firstname" from "Inroll" as I, "Students" as S where S."Sid" = I."Sid" and I."Cid" = 'CS2223' and I."Sid" in (select "Sid" from "Inroll" where "Cid" = 'CS4432'); Query Plan: