问题 问答题

事务T1、T2和T3按如下调度方式并发地对数据项X、Y、Z进行访问,假设X、Y、Z的初值分别为X=200,Y=300,Z=500。
①在事务T2刚完成提交后,数据中X、Y、Z的值各是多少
②当事务T3结束后,X、Y、Z的值各是多少

T1 T2 T3
begin-transaction T1
read(X)
X:=X-100
write(X)
rollback
begin-transaction T2
read(Y)
Y:Y+100
write(Y)
commit
begin-transaction T3
read(Z)
Z:Z*2
write(Z)
commit

答案

参考答案:①在事务T2刚完成提交后,T1已回滚,所以X的值不变;T2中Y被修改,由于T3还未提交,所以Z的值未被修改。综上所述,数据库中X、Y、Z的值分别为200、400、500。
②在事务T3结束后,T1已回滚,所以X的值不变;T2中Y被修改,T3中Z被修改。综上所述,数据库中X、Y、Z的值分别为200、400、1000。

判断题
单项选择题

Weak dollar or no, $ 46,000-the price for a single year of undergraduate instruction amid the red brick of Harvard Yard-is (1) But nowadays cost is (2) barrier to entry at many of America’s best universities. Formidable financial-assistance policies have (3) fees or slashed them deeply for needy students. And last month Harvard announced a new plan designed to (4) the sticker-shock for undergraduates from middle and even upper-income families too.

Since then, other rich American universities have unveiled (5) initiatives. Yale, Harvard’s bitterest (6) , revealed its plans on January 14th. Students whose families make (7) than $60,000 a year will pay nothing at all. Families earning up to $ 200,000 a year will have to pay an average of 10% of their incomes. The university will (8) its financial- assistance budget by 43%, to over $ 80m.

Harvard will have a similar arrangement for families making up to $180,000. That makes the price of going to Harvard or Yale (9) to attending a state-run university for middle-and upper-income students. The universities will also not require any student to take out (10) to pay for their (11) , a policy introduced by Princeton in 2001 and by the University of Pennsylvania just after Harvard’s (12) . No applicant who gains admission, officials say, should feel (13) to go elsewhere because he or she can’t afford the fees.

None of that is quite as altruistic as it sounds. Harvard and Yale are, after all, now likely to lure more students away from previously (14) options, particularly state-run universities, (15) their already impressive admissions figures and reputations.

The schemes also provide a (16) for structuring university fees in which high prices for rich students help offset modest prices for poorer ones and families are less (17) on federal grants and government-backed loans.

Less wealthy private colleges whose fees are high will not be able to (18) Harvard or Yale easily. But America’s state-run universities, which have traditionally kept their fees low and stable, might well try a differentiated (19) scheme as they raise cash to compete academically with their private (20) . Indeed, the University of California system has already started to implement a sliding-fee scale.

17()

A.independent

B.thankful

C.detached

D.reliant