Download presentation

Presentation is loading. Please wait.

Published byPierce Ayre Modified over 2 years ago

1
CH4 EXERCISES 4.2. Given two relations R1 and R2, where R1 contains N1 tuples, R2 contains N2 tuples, and N2 > N1 > 0, give the min and max possible sizes for the resulting relational algebra expressions: (1) R1UR2, (2) R1∩R2, (3) R1−R2, (4) R1×R2, (5) σa=5(R1), and (6) πa(R1) Sigma Select rows Pi Projection, extract columns UNION COMPATIBLE: Have same number of fields AND Have corresponding fields, taken in order from left to right, have the same domains.

2
CH4 EXERCISES 4.4. Consider the Supplier-Parts-Catalog schema from the previous question. State what the following queries compute: Find the Supplier names of the suppliers who supply a red part that costs less than 100 dollars. This Relational Algebra statement does not return anything than 100 dollars and a green part that costs less than 100 dollars. **Natural joins 3… because of the sequence of projection operators. Once the sid is projected, it is the only field in the set. Therefore, projecting on sname will not return anything.

3
CH4 EXERCISES 4.4. Consider the Supplier-Parts-Catalog schema from the previous question. State what the following queries compute: Find the Supplier ids of the suppliers who supply a red part that costs less than 100 dollars and a green part that costs less than 100 dollars. Find the Supplier names of the suppliers who supply a red part that costs less than 100 dollars and a green part that costs less than 100 dollars.

4
CH4 EXERCISES 4.6. What is relational completeness? If a query language is relationally complete, can you write any desired query in that language? Relational completeness means that a query language can express all the queries that can be expressed in relational algebra. It does not mean that the language can express any desired query.

Similar presentations

OK

(define (make-rat n d) (if (and (number? n) (number? d) (not (= d 0))) (cons n d) (error "cannot make a rat with denominator 0"))) (define (numer r) (head.

(define (make-rat n d) (if (and (number? n) (number? d) (not (= d 0))) (cons n d) (error "cannot make a rat with denominator 0"))) (define (numer r) (head.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on spiritual leadership sanders Laser video display ppt online Ppt on care of public property Ppt on poet robert frost Ppt on teacher's day messages Ppt on phonetic transcription alphabet Ppt on pi in maths what is the range Ppt on content development examples Ppt on regular expression reference Ppt on muscle physiology