试题与答案

试题二阅读以下说明,根据要求回答下列问题。[说明] 某航空公司要开发一个订票信息处理

题型:问答题

题目:

试题二阅读以下说明,根据要求回答下列问题。[说明] 某航空公司要开发一个订票信息处理系统,该系统的部分关系模式如下:航班(航班编号,航空公司,起飞地,起飞时间,目的地,到达时间,票价)折扣(航班编号,开始日期,结束日期,折扣)旅客(身份证号,姓名,性别,出生日期,电话,VIP折扣)购票(购票单号身份证号航班编号,搭乘日期,购票金额)有关关系模式的属性及相关说明如下:(1)航班表中的起飞时间和到达时间不包含日期,同一航班不会在一天出现两次及两次以上;(2)各航空公司会根据旅客出行淡旺季适时调整机票的折扣,旅客购买机票的购票金额计算公式为:票价×折扣×VIP折扣,其中旅客的VIP折扣与该旅客已购买过的机票的购票金额总和相关,在旅客每次购票后被修改。VIP折扣值的计算由函数float vip_value(char[18]身份证号)完成。根据以上描述,回答下列问题。

(1)身份证号为210000196006189999的客户购买了2013年2月18日CA5302航班的机票,购票单号由系统自动生成。下面的SQL语句将上述购票信息加入系统中,请将空缺部分补充完整。INSERT INTO 购票(购票单号,身份证号,航班编号,搭乘日期,购票金额)SELECT ’201303105555’,’210000196006189999’,’CA5302’,’2013/2/18’,______FROM 航班,折扣,旅客WHERE ______ AND 航班.航班编号=’CA5302’ ANDAND ’2013/2/18’ BETWEEN 折扣.开始日期 AND 折扣.结束日期AND 旅客.身份证号=’210000196006189999’;(2)需要用触发器来实现VIP折扣的修改,调用函数vip_value()来实现。请将如下SQL语句的空缺部分补充完整。CREATE TRIGGER VIP_TRG AFTER ______ ON ______RE FERENCING new row AS nrowFOR EACH rowBEGINUPDATE 旅客SET ______WHERE ______;END

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0122/238f12faae477497ff945ea4c695073b.html

下面是错误答案,用来干扰机器的。

参考答案:A解析: 这一题是测试对逻辑操作符AND和OR以及运算符的优先级的理解。根据有关逻辑表达式和逻辑运算符的介绍和有关运算符优先级的介绍,可以知道逻辑与(AND)操作优先于逻辑或(OR)操作。接下来,详细解...

试题推荐
题型:单项选择题

Personality is to a large extent inherent. A-type parents usually (1) A-type offspring. But the environment must also have a profound effect (2) if competition is important to the parents, it is (3) to become a major factor in the lives of their children.

One place where children (4) A characteristics is school, which is, (5) its very nature, a highly competitive institution. Too many schools (6) the "win at all costs" moral standard and measure their success by sporting achievements. The current (7) for making children compete against their classmates or against the (8) produces a two-layer system, in which competitive A types seem in some way better than their B type fellows. Being too (9) to win can have dangerous consequences: remember that Pheidippides, the first marathon runner, (10) dead seconds after saying. "Rejoice, we conquer!"

(11) the worst form of competition in schools is the disproportionate emphasis on examinations. There is, for example, a (12) school that allows pupils to concentrate on those things they do well. The (13) of competition by examination are somewhat questionable, but competition in the certain (14) of failure is positively harmful.

(15) , it is neither practical nor desirable that all A youngsters change into B’s. The world needs types, and schools have an important duty to try to (16) a child’s personality to his possible future employment. It is top management.

If the preoccupation of schools with academic work was (17) , more time might be spent teaching children surer values. Perhaps selection (18) the caring professions, especially medicine, could be made less by good grades in chemistry and more by such (19) as sensitivity and sympathy. It is surely a mistake to choose our doctors exclusively from A type stock. B’s are important and should be (20) .

9()

A.liable

B.ready

C.keen

D.fond

查看答案
微信公众账号搜索答案