[試題] 103-1 周承復 計算機概論 期末考

作者: SahsB (SahsB)   2015-01-18 20:13:11
1. 20% Database System
a) Given the three relations X, Y, and Z below
X: A__B Y: C__D Z: E__F
7 s t 4 2 w
3 z r 2 3 q
1 u
a.1) What values would be retrieved by executing the following statement?
Temp <- JOIN X and Y where X.A > Y.D
Temp1 <- JOIN Temp and Z where Temp.A = Z.E
Result <- PROJECT B, C, and F from Temp1
a.2) Translate the above query into a SQL statement.
b) Describe a scenario in which computing the total deposits in a bank while
also transferring $100 from account X to account Y would result in a final
sum that is $100 too great. Then describe a scenario in which the final
sum turns out to be $100 too small.
c) Describe the wound-wait protocol.
2. 20% Transition Process in Programming Language
a) Show that the grammar below is ambiguous by drawing two distinct parse
trees for the string "drip drip drip."
Leak:

Links booklink

Contact Us: admin [ a t ] ucptt.com