问题 单项选择题

关系模型中可以有三类完整性约束:实体完整性、参照完整性和用户定义的完整性。实体完整性规则定义了对关系中主属性取值的约束,即对主属性的值域的约束;而参照完整性规则定义了参照关系和被参照关系的外码与主码之间的参照约束,即对参照关系的外码属性值域的约束,规定外码属性的值域只能是空值或是相应被参照关系主码属性的值。用户定义完整性就是针对某一具体的关系数据库的约束条件,反映某一具体应用所涉及的数据必须满足的语义要求,由应用的环境决定。例如,银行的用户帐户规定必须大于等于100000,小于999999。所以,用户定义的完整性通常是定义对关系中除主码与外码属性之外的其他属性取值的约束,即对其他属性的值域的约束。

试题

b.查询其它系比数学系MS所有学生年龄都要小的学生姓名及年龄的SQL语句为: 

SELECT Sname,Sage

FROM students

WHERE Sage (SELECT Sage

FROM students

WHERE ()

AND ()

AND ()

A.SD=’MS’

B.SD<>’MS’

C.’SD’=MS

D.’SD’<>MS

答案

参考答案:B

解析:

本题考查数据库基本概念和SQL语言。

由于学生号Sno能唯一区别学生关系中的每一个元组(记录),所以Sno是学生关系的主键。

虽然SD不是学生关系的码,但SD是关系Dept的主键,所以SD是外键。

由于子查询中WHERE SD=’MS’意味着找出数学系所有学生的年龄,所以当外查询的学生年龄都小于子查询中的学生年龄即满足条件。

根据题意需查询其他系比数学系MS所有学生年龄都要小的学生姓名及年龄,所以外查询中的条件语句需加上SD<>’MS’进行限定。

根据以上分析,完整的SQL语句如下:

SELECT Sname, Sage

FROM Students

WHERE Sage<ALL

(SELECT Sage

FROM Students

WHERE SD=’MS’) AND SD<>’MS’:

填空题

"Universal history, the history of what man has accomplished in this world, is at bottom the History of the Great Men who have worked here," wrote the Victorian stage Thomas Carlyle. Well, not any more it is not.

Suddenly, Britain looks to have fallen out with its favourite historical form. This could be no more than a passing literary craze, but it also points to a broader truth about how we now approach the past: less concerned with learning from forefathers and more interested in feeling their pain. Today, we want empathy, not inspiration.

From the earliest days of the Renaissance, the writing of history meant recounting the exemplary lives of great men. In 1337, Petrarch began work on his rambling writing De Viris Illustribus—On Famous Men, highlighting the virtus (or virtue) of classical heroes. Petrarch celebrated their greatness in conquering fortune and rising to the top. This was the biographical tradition which Niccolo Machiavelli turned on its head. In The Prince, the championed cunning, ruthlessness, and boldness, rather than virtue, mercy and justice, as the skills of successful leaders.

Over time, the attributes of greatness shifted. The Romantics commemorated the leading painters and authors of their day, stressing the uniqueness of the artist’s personal experience rather than public glory. By contrast, the Victorian author Samual Smiles wrote Self-Help as a catalogue of the worthy lives of engineers, industrialists and explores. "The valuable examples which they furnish of the power of self-help, if patient purpose, resolute working and steadfast integrity, issuing in the formulation of truly noble and many character, exhibit," wrote Smiles. "what it is in the power of each to accomplish for himself" His biographies of James Walt, Richard Arkwright and Josiah Wedgwood were held up as beacons to guide the working man through his difficult life.

This was all a bit bourgeois for Thomas Carlyle, who focused his biographies on the truly heroic lives of Martin Luther, Oliver Cromwell and Napoleon Bonaparte. These epochal figures represented lives hard to imitate, but to be acknowledged as possessing higher authority than mere mortals.

Communist Manifesto. For them, history did nothing, it possessed no immense wealth nor waged battles: "It is man, real, living man who does all that. "And history should be the story of the masses and their record of struggle. As such, it needed to appreciate the economic realities, the social contexts and power relations in which each epoch stood. For: "Men make their own history, but they do not make it just as they please; they do not make it under circumstances chosen by themselves, but under circumstances directly found, given and transmitted from the past. "

This was the tradition which revolutionized our appreciation of the past. In place of Thomas Carlyle, Britain nurtured Christopher Hill, EP Thompson and Eric Hobsbawm. History from below stood alongside biographies of great men. Whole new realms of understanding—from gender to race to cultural studies—were opened up as scholars unpicked the multiplicity of lost societies. And it transformed public history too: downstairs became just as fascinating as upstairs.

 

[A] emphasized the virtue of classical heroes.
41. i Petrarch[B] highlighted the public glory of the leading artists.
42. Niccolo Machiavelli[C] focused on epochal figures whose lives were hard to imitate.
43. Samuel Smiles[D] opened up new realms of understanding the great men in history.
44. Thomas Carlyle[E] held that history should be the story of the masses and their record ofstruggle.
45. Marx and Engels[F] dismissed virtue as unnecessary for successful leaders.
 [G] depicted the worthy lives of engineer industrialists and explorers.

44()

单项选择题 A1/A2型题