《数据库原理双语试卷.doc》由会员分享,可在线阅读,更多相关《数据库原理双语试卷.doc(13页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、数据库原理双语考试试卷第一套课程号5807605040考试时间100分钟适用专业年级方向:计算机科学与技术2007级考试方式及要求:闭卷笔试题号一二三四五总分得分阅卷人一、单项选择题每题2分,共40分,将答案填在下表内题号12345678910答案题号111281920答案1. Physical data independence(物理数据独立性) AAllows us to access(访问) the physical data independently(独立地) from all applications(应用程序)BAllows us to rewrite(重写) the queri
2、es(查询) on the database without affecting(影响) the physical dataCAllows us to physically reorganize(重新组织) the data in the database without affecting the applications running on the databaseDAll of the above2. Which of the following is NOT an advantage优点 of database systems ARedundant data冗余的数据 BProgra
3、m-data independence(应用程序与数据相互独立) CBetter data quality 更好的数据质量DReduced program maintenance减少应用程序维护3. Which of the following is an example of a database integrity constraint(完整性约束条件) AThe grade assigned(分配) to a student for a course must be either an A, B, C, D or FBEvery course must have a unique(唯一的
4、) value for its course number CThe name of any student must be less than 30 characters(字母) in lengthDAll of the above4. Customers(顾客), cars, and parts(零件) are examples of Aentities(实体) Battributes(属性) Crelations Drelationships(联系) 5. A(n) _ is the relationship between a weak entity type and its owne
5、r. Aweak relationship B identifying(识别) relationship Cnon-identifying(非识别) relationship Downer relationship6. The relational data model关系数据模型 consists of(由组成) which components(组件) AData structure数据构造 BData manipulation数据操作CData integrity 完整性约束DAll of the above 7. A primary key that consists of more
6、than one attribute is called a Aforeign key外键Bcomposite key复合键Cmultivalued key多值键Dcandidate key候选键8. A rule that states that each foreign key value must match a primary key value in the other relation is called the Areferential integrity constraint参照完整性约束Bentity integrity constraint实体完整性约束Cdomain in
7、tegrity constraint域完整性约束Dnull constraint空值约束9. Which of the following are anomalies异常 that can be caused by redundancies(冗余) in tables Ainsertion插入 Bdeletion删除 Cmodification修改 Dall of the above 10. A candidate key候选键 must satisfy满足 all of the following conditions EXCEPT除了 Athe key must uniquely唯一地 i
8、dentify识别 the row Bthe key must indicate the rows position in the table说明行在表中的位置Cthe key must be nonredundant非冗余的Deach nonprime attribute非主属性 is functionally dependent upon函数依赖于 it. 11. The intersection(交集) of two relations R(A,B,C) and S(A,B,C) can be computed by A RSBR(RS)C RSD all of the above12.
9、 This operation is commutative(可交换的) A Union(并)B Intersection(交)C Cartesian product(笛卡尔积)D all of the above13. What does the following SQL statement do Alter Table Customer_T Add (Type Varchar (2);AAlters the Customer_T table to accept Type 2 VarcharsBAlters the Customer_T table to be a Type 2 Varch
10、arCAlters the Customer_T table, and adds a field called TypeDAlters the Customer_T table by adding a 2-byte field called Varchar14. What does the following SQL statement do Update Product_T Set Unit_Price = 775 Where Product_ID = 7AChanges the price of a unit called Product_T to 7BChanges the unit p
11、rice of Product 7 to 775CChanges the length of the Unit_Price field to 775DUpdates the Product_T table to have a unit price of 77515. Assume(假设) we have executed(执行) the following CREATE TABLE statement: CREATE TABLE Emp ( Ssn CHAR(9) Primary Key; SuperSsn CHAR(9) REFERENCES EMP(Ssn) ;Which of the f
12、ollowing could be used to insert(插入) the first row into the Emp table AINSERT INTO Emp(Ssn) VALUES (123456789)BINSERT INTO Emp(Ssn, SuperSsn) VALUES (123456789, 987654321)CINSERT INTO Emp(SuperSsn) VALUES (987654321)Dall of the above 16. _ is a set of commands命令 used to update and query a database.
13、ADML BDDL CDCL DDPL 17. In an SQL statement, which of the following finds all groups meeting stated conditions符合条件的组 ASelectBWhereCHaving DFind 18.To eliminate duplicate rows消除重复行 in a query, the _ qualifier限定符 is used in the SQL Select command. AalterBdistinctCcheckDspecific 19. _ takes a value of
14、true if a subquery子查询 returns an intermediate results(中间结果) table which contains包含 one or more rows. AInBHavingCExistsDExtents20.A _is a temporary table临时表 used in the FROM clause子句 of an SQL query. Acorrelated subquery相关子查询Bderived table导出表Cview table视图表DNone of the above二、判断题每题1分,共10分,正确的填T,错误的填F,
15、将答案填在下表内题号12345678910答案1. We can define(定义) a relation schema(关系模式) R(A1, A2, A3) where A1 is the primary key(主键) and A3 is a foreign key(外键) that refers to(参考) R. 2. A constraint约束 is a rule in a database system that can be violated违反 by users. 3. The E-R model is used to construct构建 a conceptual m
16、odel概念模型. 4. The entity integrity rule实体完整性规那么states that a primary key attribute can be null. 5. The attribute value in a tuple元组 that makes up组成 a foreign key(外键) can be null. 6. A composite key复合键 consists of only one attribute. 7. One property特征 of a relation is that each attribute within a rela
17、tion has a unique唯一的 name. 8. The columns of a relation can be interchanged交换 without changing the meaning or use of the relation. 9. The DELETE SQL command is used to remove去掉 a table from the database. 10. Subqueries子查询 can only be used in the WHERE clause. 三、操作题每题3分,共15分现有关系数据库模式如下:学生(学号,姓名,性别,专业
18、,年龄)课程(课程号,名称,学分)学习(学号,课程号,分数)用关系代数表达式实现12小题,用T-SQL语言实现35小题。1. 查询“学生关系学生中都有哪些专业。2.检索“数据库原理课程成绩高于90分的所有学生的学号、姓名、专业与分数。3. 检索没有选修课程号为“C135”课程的学生信息,包括学号,姓名与专业。4. 从“学生关系中删除成绩出现过0分的所有学生信息。5. 定义“英语专业学生所学课程的信息视图English_View,包括学号、姓名、课程号与分数。四、T-SQL编程题10分请用T-SQL编写程序计算1239899100的值。五、数据库设计题第1题15分,第2题10分,共25分1. 某
19、医院病房计算机管理系统中需要如下信息: 科室:科室名,科室地址,科室 病房:病房号,床位数,所属科室名医生:姓名,职称,所属科室名,年龄,工作证号病人:病历号,姓名,性别,主管医生,病房号假设一个科室可有多个病房与多个医生,一个病房只能属于一个科室,一个医生只能属于一个科室,但可负责多个病人的诊治,一个病人的主管医生只有一个。一个病房可住多个病人。1设计满足上述业务需求的E-R图,并写出你在确定E-R模型约束条件时所做的其他假设(注意:实体、属性与联系名称均用中文表示)。 2将该E-R图转换为等价的符合第3范式(3NF)的关系模式,分别指出每个关系的主键与外键,并画出各关系间的主键、外键参照(注意:关系模式的表示标准请参照下列图;关系与属性名称均用中文表示)。 2. 假设为自学考试成绩管理系统设计了一个关系RS,SN,C,CN,G,U,其属性的含义依次为考生号、姓名、课程号、课程名、分数与主考学校名称。规定每个学生学习一门课程只有一个分数;一个主考学校主管多门课程的考试,且一门课程只能属于一个主考学校管理;每名考生有唯一的考生号,每门课程有唯一的课程号。1写出关系模式R根本的函数依赖集即找出R中所有存在的函数依赖。2写出关系模式R的候选键。3将R标准化为3NF。第 13 页
限制150内