SQL language: set operators

Similar documents
Database Management Systems. Chapter 5

sname rating 8 .forward Relational Algebra Operator Precedence Sample Query 0 Example Schema bid 103 sname( ( Sailors) Relational Algebra Queries

Comp115: Databases. Relational Algebra

Couples, Relations and Functions

SQL Aggregate Queries

Database Systems CSE 414

CS 461: Database Systems. Relational Algebra. supplementary material: Database Management Systems Sec. 4.1, 4.2 class notes

WEDNESDAY NIGHT SOCIAL COMPETITION. Rules of Play

THE CONSTITUTION OF THE INTERNATIONAL STUDENTS UNION OF NARVIK

CSIT5300: Advanced Database Systems

PRE BID QUERIES FOR CNG & CITY GAS DISTRIBUTION FOR HYDERABAD. Clause No. Description in tender documents Clarifications / Request for change

Cooroy Golf Club Inc. (ABN ) of 28 Myall Street, Cooroy Q4563

Spring Helmet Campaign

2018 Equity in Athletics Union County College

The Coach then sorts the 25 players into separate teams and positions

service contractors conventions & expositions

Friday Nite Odd Couples

The Uniform Traffic Act Is Amended

WORLD CHAMPIONSHIP RULES 3 Cushion Individuals

Limit/Imbalance Violation and Report - Manual

Franklin County Country Club

Instructions for Completion of Hazard Evaluation Requests

LMS DAILY ANNOUNCEMENTS 2/15/2019 GOOD MORNING LMS!

Lesson 1: Decimal Place Value. Concept/Topic to Teach: Students use Bruins statistical data to order and compare decimals to the thousandths.

Swimming pool barriers. Schedule 1 - Modifications to the Standard... 5 MP 3.4 SWIMMING POOL BARRIERS. Table of Contents

HAXL-TEC-11.2 D170 AND D190 GENUINE SPICER OUTPUT SHAFT BEARING RACE PARTS CHANGE - REVISED

User s Manual. Model SWTC800. CAUTION: Adult Assembly Required

TOOLKIT STOP ON RED. National. Week August 6-12, 2017 RED-LIGHT RUNNING FACT. #StopOnRed2017 to spread the message!

Using SQL in MS Access

Details for PDQ Operatorr s Production and Disposition Volumes by Lease by Month

Elwood won by 5 wickets

OUTDOOR LED SCOREBOARD CARE & OPERATIONS MANUAL

BUENOS AIRES 2018 YOUTH OLYMPIC GAMES NOMINATION CRITERIA FOR TRIATHLON EVENTS. Triathlon New Zealand ( TriathlonNZ )

The Constitution of the International Students Union Gjøvik University College (ISU GUC)

Taunton vs DPS 1stXI. Taunton won by 1 wickets. Saturday 28 April scored by match umpire(s) match referee(s) player of the match

Cycling Volume Estimation Methods for Safety Analysis

THE ALLIANCE UNIVERSITY NATIONAL DEBATE

Defending Principle: Developing Stage 1 Defence - T ight Shadow Defence! Coaching T ips. Notes. Warm Up. Net ball Co urt 1/5

Adult OPEN 3 on 3 Tournament

State Route 160 (Blue Diamond Highway)

MP 3.4 SWIMMING POOL BARRIERS. Table of Contents

Special Olympics General Rules 2012 Amendment. 16 th November 2012

BUENOS AIRES 2018 YOUTH OLYMPIC GAMES AMENDED NOMINATION CRITERIA FOR KARATE EVENTS UNION OF NEW ZEALAND KARATE ORGANISATION INCORPORATED (KNZ)

End of System Outfall Identification Project in a Permitted MS4 City

QUINTON TOWNSHIP SCHOOL Quinton, New Jersey SCHOOL UNIFORM CODE ALL NEW CHANGES ARE IN BOLD

Markings Technical Committee Chapter 3H: Roundabout Markings APPROVED IN NCUTCD COUNCIL ON JANUARY 20, 2006

SEPTEMBER 2018 EVENT SCHEDULE

LOKRING FOR THE BEST A/C REPLACEMENT CONNECTIONS

CENTRAL DATABASE OF HANDICAPS (CDH) CLUB USER GUIDE. June Version 1

2017 DECV Jumper s, t-shirt s and beanies

Sports Snippets - Term 2 Week 5 - Friday 26th May, 2017

BICYCLE AND TRAILS ADVISORY COMMISSION Meeting Minutes

TOKYO 2020 OLYMPIC GAMES NOMINATION CRITERIA FOR FENCING EVENTS FENCING NEW ZEALAND INCORPORATED

PERSONAL FLOTATION AIDS

AH-03: Bend Tubing. SAFETY FIRST o Follow all Caterpillar facility safety standards when performing this task.

ENDORSEMENT & SELECTION PROCEDURES FOR NATIONAL CHAMPIONSHIPS, ZONAL EVENTS, INTERSECTIONALS, 18 NATIONAL TEAM EVENTS AND WORLD TEAM TENNIS

DISCIPLINARY COMMITTEE OF THE FOOTBALL FEDERATION OF AUSTRALIA DETERMINATION IN THE FOLLOWING MATTER:

OMS P/N: Rev.: B. Description OMS: ASSY BACKUP POD 6.0. DCR# 3137 Date: Operation: Special Instructions: TQC. Torque.

Moving Together Conference Complete Streets from the MassDOT District 5 Perspective

Big Sky News June 2017

Ticket & Hotel Booking Form

USTA Northern California BOARD RESOLUTIONS Last update 12/13/06


- 2 - Companion Web Site. Back Cover. Synopsis

ILLINOIS 4-H HIPPOLOGY CONTEST

Bangalore Sports Calendar Bangalore Delhi Hyderabad Mumbai Pune

2010 Basketball Rules

SVS 1stXI vs DPS 1stXI

THE BAHAMAS 2017 COMMONWEALTH YOUTH GAMES AMENDED NOMINATION CRITERIA FOR CYCLING EVENTS CYCLING NEW ZEALAND

8 th Annual Synchro Illinois Sponsored by the Skating Council of Illinois Friday & Saturday, January 18 th & 19 th, 2019

Referees Body language Players Management

VDOT Crash Analysis Procedures for Roadway Safety Assessments

safety safety style magazine release New Shooter 101 Beginners Workshop 2 How a handgun works

International J/22 Class Association 2016 World Championship. Notice of Race

2019 Team Registration UCI Mountain Bike Teams UCI DataRide Teams Registration process

Arena Use Policies & Procedures

How to use the waypoint module

SOUTHERN HIGHLAND 7s TOURNAMENT RULES 2018

John Kirk Road Proposed Thoroughfare Plan Amendment

Natalie Alleman Beyers, and Pat Sumner Office of Institutional Research

2016 RIO OLYMPIC GAMES AM E N D E D NOMINATION CRITERIA CANOE/KAYAK - Canoe Slalom NZ

ILLINOIS 4-H HIPPOLOGY CONTEST

Guide to the James Cashman Sr. Papers

Statutes of the International Young Physicists Tournament. International Young Physicists Tournament Association IYPT. Statutes TABLE OF CONTENTS

Information on the implementation of Commission Regulation (EC) No 504/2008 on the identification of equidae

ebxml Core Components Structure v1.04

Employer Information. Why choose us? Position: Waitress/Waiter. Inwood Country Club. Employer name: Country Club.

GOLF NSW. Meeting of HANDICAP & COURSE RATING COMMITTEE A G E N D A

BENNEX Advanced Cable Termination ACT Subsea Electrical Termination

Traffic and Pollution in Torino

BICYCLE AND TRAILS ADVISORY COMMISSION Meeting Minutes

Audax Australia Riding Awards

Cheetahs vs Panthers Sunday 07 May 2017 Ashford CC Jitesh

DYNAMIC BEHAVIOUR AND OPTIMISATION OF FRAMES FOR ROAD AND MOUNTAIN BIKES

Description Logic. Agam Sarup Biplab Kar Hitesh Kewalramani

SHEBBEAR COLLEGE. Shebbear, Beaworthy, Devon EX21 5HJ. Senior School Uniform List

AYSO Area 6B Recreational League Traveling U12 'FUN' Games

Athletics Participation - Men's and Women's Teams

Planning and Acting in Partially Observable Stochastic Domains

St. Thomas Aquinas School Uniform Policy

Transcription:

The operator The INTEECT operator The EXCET operator QL language: basics The operator et union operator A B The operator It performs the union of the two relational expressions A and B relational expressions A and B may be generated by ELECT statements removal of duplicates removes duplicates ALL does not remove duplicates Name Color ize Jumper ed 40 2 Jeans Green 48 3 Blouse Blue 48 ome 4 Blouse ed 44 5 kirt Blue 40 horts ed 42 Id Qty 1 300 1 2 200 1 3 400 1 4 200 1 5 100 1 100 2 300 2 2 400 3 2 200 4 3 200 4 4 300 4 5 400 WHEE Color= ed Name Color ize Jumper ed 40 2 Jeans Green 48 3 Blouse Blue 48 ome 4 Blouse ed 44 5 kirt Blue 40 horts ed 42 2013 olitecnico di Torino 1

Find the codes of the products that are either red or Id Qty 1 300 1 2 200 1 3 400 1 4 200 1 5 100 1 100 2 300 2 2 400 3 2 200 4 3 200 4 4 300 WHEE Id= 2 2 D M BG 4 5 400 D M BG WHEE Color= ed WHEE Id= 2 ; 2 2 WHEE Color= ed WHEE Id= 2 ; Duplicate removal 2 chema compatibility WHEE Color= ed WHEE Id= 2 ; ALL: example WHEE Color= ed ALL WHEE Id= 2 ; 2 2 The INTEECT operator 2013 olitecnico di Torino 2

et intersection operator A INTEECT B The INTEECT operator It performs the intersection of the two relational expressions A and B relational expressions A and B may be generated by ELECT statements INTEECT: example Name Color ize Jumper ed 40 2 Jeans Green 48 3 Blouse Blue 48 ome 4 Blouse ed 44 5 kirt Blue 40 horts ed 42 1 mith 20 2 Jones 10 3 Blake 30 4 Clark 20 5 Adams 30 INTEECT: example INTEECT: example 1 mith 20 2 Jones 10 3 Blake 30 4 Clark 20 5 Adams 30 Name Color ize Jumper ed 40 2 Jeans Green 48 3 Blouse Blue 48 ome 4 Blouse ed 44 5 kirt Blue 40 horts ed 42 ome INTEECT: example Equivalence with other operators INTEECT ; ome The intersection operation may also be performed by means of a join the IN operator 2013 olitecnico di Torino 3

Equivalence with join The FOM clause contains the relations involved in the intersection The WHEE clause contains join conditions between the attributes listed in the ELECT clauses of relational expressions A and B Equivalence with join: example, WHEE.=.; Equivalence with the IN operator One of the two relational expressions is turned into a nested query using operator IN The attributes in the outer ELECT clause, joined together by a tuple constructor, make up the lefthand side of the IN operator Equivalence with IN: example WHEE IN ( ); The EXCET operator et difference operator A EXCET B It subtracts relational expression B from relational expression A The EXCET operator 2013 olitecnico di Torino 4

EXCET: example EXCET: example Name Color ize Jumper ed 40 2 Jeans Green 48 3 Blouse Blue 48 ome 4 Blouse ed 44 5 kirt Blue 40 horts ed 42 1 mith 20 2 Jones 10 3 Blake 30 4 Clark 20 5 Adams 30 1 mith 20 2 Jones 10 3 Blake 30 4 Clark 20 5 Adams 30 EXCET: example EXCET: example Name Color ize Jumper ed 40 2 Jeans Green 48 3 Blouse Blue 48 ome 4 Blouse ed 44 5 kirt Blue 40 horts ed 42 ome EXCET ; ome Equivalence with the NOT IN operator Equivalence with the NOT IN operator: example The difference operation may also be performed by means of the NOT IN operator relational expression B is nested within the NOT IN operator the attributes in the ELECT clause of relational expression A, joined together by a tuple constructor, make up the left-hand side of the NOT IN operator WHEE NOT IN ( ); 2013 olitecnico di Torino 5