作業2 參考解答

page 49, Exercise 4.1 (a) to (c)

(a) What PC models have a speed of at least 3.00?

(1) Algebraic expression

<latex>\pi_{model}(\sigma_{speed\geq 3.0}(PC))</latex>

(2) Linear notation

<latex>R:=\sigma_{speed\geq 3.0}(PC)</latex>
<latex>Answer:=\pi_{model}(R)</latex>

(b) Which manufacturers make laptops with a hard disk of at least 100GB?

(1) Algebraic expression

<latex>\pi_{maker}(Product \bowtie ( \sigma_{hd\geq100}(Laptop)) </latex>

(2) Linear notation

<latex>L:=\sigma_{hd\geq 100}(Laptop)</latex>
<latex>Answer:=\pi_{maker}(Product \bowtie L)</latex>

(c) Find the model number and price of all products (of any type) made by manufacturer B.

(1) Algebraic expression

<latex> \pi_{model, price} ( \sigma_{maker=B} (Product \bowtie (\pi_{model,price}(PC) \cup \pi_{model,price}(Laptop) \cup \pi_{model,price}(Printer))))</latex>

(2) Linear notation

<latex> R1:=\pi_{model,price}(PC)</latex>
<latex> R2:=\pi_{model,price}(Laptop)</latex>
<latex> R3:=\pi_{model,price}(Printer)</latex>
<latex> R4:= R1 \cup R2 \cup R3</latex>
<latex> R5:= \sigma_{maker=B}(Product \bowtie R4 )</latex>
<latex> Answer:= \pi_{model, price}(R5) </latex>