问题 填空题

阅读下列说明和E-R图,回答问题1至问题3,将解答填入对应栏内。

[说明]

设有下列关于学生成绩管理系统的E-R图(见图2-1)。图中矩形表示实体,圆表示属性,双圆表示关键字属性,菱形表示实体间的联系。假定已通过下列SQL语言建立了基本表:

CREATE TABLE STUDENT(SNo CHAR(6)NOT NULL UNIQUE,

SName CHAR(20),

Sex CHAR(1),

Dept CHAR(20),

Age SMALLINT);

CREATE TABLE COURSE(CNo CHAR(6)NOT NULL UNIQUE,

CName CHAR(20),

Hour SMALLINT,

Credit SMALLINT);

CREATE TABLE SC (SNo CHAR(6),

CNo CHAR(6),

GRADE SMALLINT,

PRIMARY KEY (SNo,CNo));

为了答题的方便,图中的实体和属性同时给出了中英文两种名字,回答问题时只须写出英文名即可。

填充下列SQL程序5.1~5.4中的(1)~(6),使它们分别完成以下查询功能:

程序5.1:检索选修所有课程的学生姓名。

程序5.2:给出全体学生人数。

程序5.3:按学号给出每个学生的平均成绩。

程序5.4:按学号给出每个学生选修课程的门数。

[程序5.1]

SELECT SName FROM STUDENT WHERE (1)

(SELECT FROM COURSE WHERE (2)

(SELECT * FROM SC WHERE (3) ))

[程序5.2]

SELECT (4) FROM STUDENT

[程序5.3]

SELECT (5) FROM SC GROUP BY SNO

[程序5.4]

SELECT (6) FROM SC GROUP BY SNO

(5)处填()。

答案

参考答案:SNO,AVG(GRADE)

单项选择题
阅读理解

阅读理解

     It was Thanksgiving morning. I was busy preparing the traditional Thanksgiving turkey when the

doorbell rang. I opened the front door and saw two small children in rags huddling together on the top

step.

     "Any old papers, lady?" asked one of them.

     I was busy. I wanted to say "no" until I looked down at their feet. They were wearing thin little sandals(凉鞋), wet with heavy snow.

     "Come in and I'll make you a cup of hot cocoa."

     They walked over and sat down at the table. Their wet sandals left marks upon the floor. I served them cocoa and bread to fight against the cold outside. Then I went back to the kitchen and started cooking.

     The silence in the front room struck me. I looked in. The girl held the empty cup in her hands, looking

at it. The boy asked in a flat voice, "Lady, are you rich?"

     "Am I rich? Pity, no!"

     I looked at my wornout slipcovers(椅套). The girl put her cup back in its saucer(茶碟)carefully and

said, "Your cups match your saucers." They left after that, holding their papers against the wind. They had

reminded me that I had so much for which to be grateful.

     Plain blue china cups and saucers were only worth five pence. But they matched.

     I tasted the potatoes and stirred(搅动)the meat soup. Potatoes and brown meat soup, a roof over our heads, my man with a regular job, these matched, too.

     I moved the chairs back from the fire and cleaned the living room. The muddy marks of little sandals

were still wet upon my floor. Let them be for a while, I thought, just in case I should begin to forget how

rich I am.

1. Which of the following would be the best title for the text?

A. Lady, are you rich?

B. A story of Thanksgiving Day

C. Don't forget how rich you are

D. Does cups and saucers match well?

2. The writer let the two children come in and served them well because________.

A. she wanted to sell old papers to them

B. she wanted to invite them to her Thanksgiving party

C. she showed great pity and care on them

D. she had the same experience as them in the past

3. Which of the following statements is NOT true according to the passage?

A. The girl thought the writer was rich just because she wanted to make the writer happy.

B. The writer had thought she wasn't rich because her supplies were not expensive.

C. If cups and saucers match well, they are a best pair even though cheap.

D. After hearing what they said, the writer seemed to understand what a rich life was.

4. The writer left the muddy marks of little sandals on the floor for a while to________.

A. show that she was a kindhearted lady

B. remind her that she shouldn't forget how rich she was

C. leave room for readers to think about what being rich is

D. prove that she had understood what meant being rich

5. It can be inferred from the text that whether you are rich depends on________.

A. how much money you have made

B. what attitude you have had towards life

C. the way you help others

D. your social relationship