[試題] 103-1 周承復 計算機概論 期末考
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:
---> Leak ---> drip ---> Leak --->
|_________^ |_________^
b) Is the collections of statements ~R, (T or R), (P or ~Q), (Q or ~T), and
(R or ~P) consistent? Explain your answer.
3. 10% Hash & Data Integrity
a) Suppose you were going to construct a hash file with 26 to 30 buckets
using the division hash function discussed in the text. How many buckets
should you actually use?
b) List and explain 2 different schemes, which within a DBMS are used to
maintain database integrity.
4. 10% Search and Complexity
a) At most, how many entries in a list of 5000 names will be interrogated
when using binary search algorithm?
b) At most, how many entries in a list of 5000 names will be interrogated
when using the sequential search algorithm?
5. 25% Network
5.1) Where would be the most likely place to put a firewall to provide each
of the following services?
a) Protect an entire domain from attacks from the cloud.
b) Protect an entire domain from spam email.
c) Protect an individual machine from worms and viruses.
5.2) What are some distinctions between UDP and TCP?
5.3) What is the primary difference between using Telnet and SSH to connect
to a remote server?
6. 10% Call the function CodeWrite (defined below) with the value 101 and
record the values that are printed.
def CodeWrite(N)
if (N>0)
print(N)
CodeWrite(N/2)
print(N+2)
7. 10% What is the difference between congestion control and flow control?
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.196.109
※ 文章網址: https://www.ptt.cc/bbs/NTU-Exam/M.1421583193.A.6C1.html
推
01/18 21:36, , 1F
01/18 21:36, 1F
→
01/18 22:47, , 2F
01/18 22:47, 2F