问题 问答题


阅读以下说明和关系表,回答问题1~5。
[说明]
已知某儿童医院的医疗数据库的模式如下:
PATIENT (PNUM,PNAME,SEX,AGE)
DOCTOR (DNUM,DNAME,DEPT)
ORDER (PNUM,DNUM,NUMBER)
其中PNUM表示病人号,PNAME表示病人姓名,SEX表示病人的性别,AGE表示病人的年龄,DNUM表示医生工作号,DNAME表示医生的姓名,DEPT表示医生所在的科室, NUMBER表示医生给病人所看病的次数。
试定义下列完整性约束:

[问题1]
在PATIENT中插入病人的性别时必须为“男”或“女”,年龄在1~18岁之间。

答案

参考答案:

解析:在定义PREATE时使有检查子句:CREATE TABLE PATIENT(PNUM CHAR(4),PNAME CHAR(S) NOT NULL,SEX CHAR (2),AGE SMALLINT,PRIMARY KEY( PNUM),CHECK( SEX: ’男’OR SEX = ’女’,CHECK(AGE > =0 AND AGE < = 18) );

写作题
单项选择题

Drug use is rising dramatically among the nation’s youth after a decade of decline. From 1993 to 1994, marijuana use among young people (1) from 12 to 17 jumped 50 percent. One in five high school seniors (2) marijuana daily. Monitoring the Future, which (3) student drug use annually, reports that negative attitudes about drugs have declined for the fourth year in a row. (4) young people see great risk in using drugs. Mood-altering pharmaceutical drugs are (5) new popularity among young people. Ritalin, (6) as a diet pill in the 1970s and now used to (7) hyperactive children, has become a (8) drug on college campuses. A central nervous system (9) , Ritalin can cause strokes, hypertension, and seizures. Rohypnol, produced in Europe as a (10) tranquilizer, lowers inhibitions and suppresses short-term memory, which has led to some women being raped by men they are going out with. (11) taken with alcohol, its effects are greatly (12) . Rock singer Kurt Cobain collapsed from an (13) of Rohypnol and champagne a month before he committed (14) in 1994. In Florida and Texas, Rohypnol has become widely abused among teens, who see the drug as a less expensive (15) for marijuana and LSD. Alcohol and tobacco use is increasing among teenagers, (16) younger adolescents. Each year, more than one million teens become regular smokers, (17) they cannot legally purchase tobacco. By 12th grade, one in three students smokes. In 1995, one in five 14-year-olds reported smoking regularly, a 33 percent jump (18) 1991. Drinking among 14-year-olds climbed 50 percent from 1992 to 1994, and all teens reported substantial increases in (19) drinking. In 1995, one in five 10th graders reported having been drunk in the past 30 days. Two-thirds of high school seniors say they know a (20) with a drinking problem.

20()

A.student

B.man

C.youth

D.peer