数据库2014试卷及答案

合集下载

三级数据库技术真题2014年03月

三级数据库技术真题2014年03月

三级数据库技术真题2014年03月(总分:100.00,做题时间:90分钟)一、选择题(总题数:30,分数:40.00)1.按照数据库应用系统生命周期模型,在开发某数据库应用系统时,对系统采用的软硬件及技术方案等作出合理的评估并提出选择建议的工作属于______。

(分数:1.00)A.规划与分析阶段的系统规划与定义B.规划与分析阶段的可行性分析√C.需求分析阶段的业务规则需求分析D.系统设计阶段的总体设计解析:[解析] 技术可行性是根据用户提出的系统功能、性能及实现系统的各项约束条件,对系统软件、系统硬件、技术方案做出评估和选择建议,它属于规划与分析阶段的可行性分析。

2.关于数据库应用系统的需求分析工作,下列说法正确的是______。

(分数:1.00)A.通过需求分析过程,需要确定出整个应用系统的目标、任务和系统的范围说明B.在需求分析阶段,系统需求分析员要与用户充分沟通,并做出各类用户视图C.数据需求分析的主要工作是要辩识出数据处理中的数据处理流程D.数据操作响应时间、系统吞吐量、最大并发用户数都是性能需求分析的重要指标√解析:[解析] 数据库应用系统的需求包括:数据需求分析、数据处理需求分析,业务需求分析以及其在性能、存储、安全、备份和恢复等方面的要求。

数据操作响应时间、系统吞吐量、最大并发用户数都是性能需求分析的重要指标。

3.下列用于数据库慨念设计的方法是______。

(分数:1.00)A.DFD方法和IDEFIX方法B.E-R方法和IDEF0方法C.E-R方法和IDEFIX方法√D.DFD方法和IDEF0方法解析:[解析] 用户数据库概念设计的方法包括E-R方法和IDEFlX方法等。

4.关于数据库概念设计阶段的工作目标,下列说法错误的是______。

(分数:1.00)A.定义和描述应用系统设计的信息结构和范围B.定义和描述应用系统中数据的属性特征和数据之间的联系C.描述应用系统的数据需求D.描述需要存储的记录及其数量√解析:[解析] 数据库概念设计阶段的工作目标包括定义和描述应用领域涉及的数据范围;获取应用领域或问题域的信息模型;描述清楚数据的属性特征;描述清楚数据之间的关系;定义和描述数据的约束;说明数据的安全性要求;支持用户的各种数据处理需求;保证信息模型方便地转换成数据库的逻辑结构(数据库模式),同时也便于用户理解。

2014.4互联网数据库试题及答案(可编辑修改word版)

2014.4互联网数据库试题及答案(可编辑修改word版)

⊆ 绝密★考试结束前全国 2014 年 4 月高等教育自学考试互联网数据库试题课程代码:00911请考生按规定用笔将所有试题的答案涂、写在答题纸上。

选择题部分注意事项:1. 答题前,考生务必将自己的考试课程名称、姓名、准考证号用黑色字迹的签字笔或钢笔填写在答题纸规定的位置上。

2. 每小题选出答案后,用 2B 铅笔把答题纸上对应题目的答案标号涂黑。

如需改动,用橡皮擦干净后,再选涂其他答案标号。

不能答在试题卷上。

一、单项选择题(本大题共 15 小题,每小题 2 分,共 30 分)在每小题列出的四个备选项中只有一个是符合题目要求的,请将其选出并将“答题纸”的相应代码涂黑。

错涂、多涂或未涂均无分。

1.在数据模型的三个要素中,用于描述系统静态特性的是A .数据操作B .数据结构C .数据完整性约束D .数据参照2.SQL 语言中的 REVOKE 语句的主要作用是A .结束程序B .返回系统C .收回权限D .提交事务3. JDBC 包含多个类,其中 Java .sql .Time 类属于A .Java JDBC 类B .Java JDBC 接口 C .Java JDBC 异常D .Java JDBC 控制4. 在 CGI 程序中,如果采用 GET 方法传递参数,用来传递查询条件参数的环境变量是A .ENV-STRINGB .CONDITION-STRINGC .CONTENT-STRINGD .QUERY-STRING5. 在 SQL 语句中,与 X BETWEEN 60 AND 90 等价的表达式是A .X>60 AND X<90B .X>=60 AND X< =90C .X>60 AND X< =90D .X>=60 AND X<90 6. 如果关系模式 R(U ,F)中不存在候选码 X 、属性组 Y 以及非属性 Z(Z Y),使得X → Y ,Y → X 和Y →Z 成立,则 R 属于A.3 NF B.4 NFC.5 NF D.BCNF7.在目前的并行数据库体系结构中,实现技术最容易的是A.SN B.SDC.SM D.SK8.在ASP 的内置对象中,从客户端用户提取信息的是A.Session 对象B.System 对象C.Request 对象D.Application 对象9.实体完整性规则规定基本关系中的A.元组不能取空值B.属性不能取空值C.外码不能取空值D.所有主属性都不能取空值10.保护数据以防止未经授权或不合法的使用造成的数据泄露、更改或破坏,是指数据库的A.完整性控制B.安全性控制C.并发控制D.故障恢复11.在数据库设计中,设计用户子模式是在A.需求分析阶段B.概念结构设计阶段C.逻辑结构设计阶段D.物理设计阶段12.在Sybase 开发工具中,基于图形界面的客户/服务器前端应用的工具是A.Power J B.Power+ +C.Power Designer D.PowerBuilder13.在分布式数据库系统中,用户不必关心数据分布的细节,这种性质称为A.分片透明性B.分布透明性C.定位透明性D.位置透明性14.下列不属于数据仓库特征的是A.面向主题的B.集成的C.时变的D.实时更新的15.一个事务的执行不被其他事务干扰,这一特性是指事务的A.隔离性B.一致性C.原子性D.持久性非选择题部分注意事项:用黑色字迹的签字笔或钢笔将答案写在答题纸上,不能答在试题卷上。

2014级《数据库基础及应用》期中综合练习

2014级《数据库基础及应用》期中综合练习

《数据库基础及应用》期中复习题第1 题: (单选题)数据库技术的根本目标是要解决数据的_____。

[A]存储问题 [B]共享问题[C]安全问题 [D]保护问题答案: B第2 题: (单选题)下面关于关系叙述中,错误的是_____。

[A]一个关系是一张二维表 [B]二维表一定是关系[C]有的二维表不是关系 [D]同一列只能出自同一个域答案: B第3 题: (单选题)一个教师可讲授多门课程,一门课程可由多个教师讲授,则教师实体和课程实体间的联系是_____。

[A]一对一的联系 [B]一对多的联系[C]多对一的联系 [D]多对多的联系答案: D P13 实体集间的联系第4 题: (单选题)层次模型、网状模型和关系模型是根据_____划分。

[A]记录长度 [B]文件的大小[C]联系的复杂程度 [D]数据之间的联系方式答案: D P14第5 题: (单选题)下述不满足第二范式的关系是_____。

[A]院系(院系代码、院系名称、院系简介、负责人)[B]专业(专业代码、专业名称、院系代码、专业简介)[C]修课成绩(学号、课程代码、成绩、成绩性质)[D]学生及课程(学号、姓名、性别、课程代码、课程名称、学分、周学时、上课周数)答案: D P19第二范式简单判断就是不可再分第6 题: (单选题)在E-R图中,用来表示实体之间"联系"的图形是_______。

[A]椭圆形 [B]矩形[C]三角形 [D]菱形答案: D P31实体之间的联系形状第7 题: (单选题)DBMS 提供了_____语言,用于实现数据的插入、更新、删除、检索等任务。

[A]DML [B]DDL [C]DMCL [D]APL答案:A P6 6个方面的功能第8 题: (单选题)假定有关系模式:部门(部门号,部门名称),职工(职工号,姓名,性别,职称,部门号),工资(职工号,基本工资,奖金),级别(职称,对应行政级别),要查找在“财务部”工作的职工的姓名及奖金,将涉及的关系是_____。

2014级《数据库理论与技术》课程期中试卷

2014级《数据库理论与技术》课程期中试卷

宁波工程学院2015–2016 学年第 2 学期《数据库理论与技术》课程期中考试卷一、 单项选择题(每小题1分,共20分)1. ( B )是长期存储在计算机内、有组织的、可共享的数据集合。

A .数据库系统B .数据库C .关系数据库D .数据库管理系统 2. 下面哪个不是数据库系统必须提供的数据控制功能(B )。

A .安全性 B .可移植性 C .完整性 D .并发控制3. 通过修改( C )可以保证数据库的逻辑独立性。

A .模式 B .外模式C .外模式/模式映射D .模式/内模式映射4. 学生社团可以接纳多名学生参加,但每个学生只能参加一个社团,从社团到学生之间的联系种类是( D )。

A.多对多B.一对一C.多对一D.一对多 5. 结构数据模型的三个组成部分中,不包括( C )。

A .完整性规则B .数据结构C .恢复D .数据操作 6. SQL 中,下列涉及空值的操作,不正确的是( C )。

A .AGE IS NULLB .AGE IS NOT NULLC .AGE=NULLD .NOT (AGE IS NULL )7. 设有关系模式R (A ,B ,C ),其关系r 如右表所示: 下面叙述正确的是( B )。

A .函数依赖 A →B 在上述关系中成立 B .函数依赖 BC → A 在上述关系中成立 C .函数依赖 B → A 在上述关系中成立D .函数依赖 A → BC 在上述关系中成立8. 关系数据库规范化是为了解决关系数据库中( A )。

A .插入、删除和数据冗余问题而引入的 B .提高查询速度问题而引入的 C .减少数据操作的复杂性问题而引入的 D .保证数据的安全性和完整性问题而引入的 9. 实现关系代数选择运算的SQL 子句是( D )。

A .SELECTB .ORDER BYC .FROMD .WHERE 10.设关系R 和S 的属性个数分别为2和3,则与关系代数表示式12R S> 等价的是( B )。

数据库2014试卷及答案

数据库2014试卷及答案

华南农业大学期末考试试卷(A卷)2014-2015学年第一学期考试科目:数据库系统考试类型:闭卷考试时间:120 分钟学号姓名年级专业Question 1: true-false question (15 points) For each of the following statements, indicate whether it is TRUE or FALSE (Using √for TRUE and ×for FALSE).1. A primary key is a field (or group of fields) that uniquely describes each record inthe database.2.Data redundancy improves the integrity of a database.3.SQL is the language used by relational databases to create objects and tomanipulate and retrieve data.4. A relational database management system does not include tools for backing up &restoring databases.5.An attribute is also known as a row in most databases.6.An association between entities is known as a relationship.7.Integrity constraints limit the number of entities that can be placed in a table ordatabase.8.The Entity-Relationship data model is often used in the physical design phase.9.The concept “relation” in relation model is exactly the same as the concept“relationship” in ER model.10.Most relationship sets in a database system involves two entity sets.11.The closure of an attribute set contains that attribute set.12.Lossless decomposition is necessary in a decomposition algorithm.13.If A →B and C →D hold, then AC →BD also holds.14.It is not necessary that a legal schedule preserves the order in which theinstructions appear in each individual transaction.15.Update operations in database must be written into log before updating database.Question 2 single-choice question (2 points for each problem, 30 points in total)1. is the only one incorrect description from the followings:A. R=(R-S)∪(R∩S)B. R-S=R-(R∩S)C. R∩S=S-(R-S)D. R∩S=S-(S-R)2. Choose the only one correct expression from the followings: _ ______.A. (≠ some) ≡ inB. (= all) ≡ not inC. exists r ⇔ r ≠ ØD. X-Y ≠Ø ⇔ X ⊆ Y3. of the following four expressions of relational algebra is not equivalent to the other three? They are all based on the relations R(A,B) and S(B,C).A.()S R B A ,∏B. ()S R B ∏C.()S R B R A ⨯∏., D.()()()S R R B A ∏⨯∏⋂4. In the following, assume a is an attribute of some character-string type, e.g. CHAR(10), and that it may be NULL.Q1: SELECT * FROM R WHERE a IS NULL;Q2: SELECT * FROM R WHERE a NOT LIKE '%'; A.Q1 and Q2 produce the same answer.B. The answer to Q1 is always contained in the answer to Q2.C. The answer to Q2 is always contained in the answer to Q1.D. Q1 and Q2 produce different answers.5. The Entity-Relationship data model isA. DBMS dependentB. DBMS independentC. both A and BD. neither A nor B 6. In SQL, an UPDATE statement without a WHERE clause: A. Updates every row in a table. B. Updates no rows in a table. C. Updates every column in a table. D. Results in a Cartesian product.7. If a course can be taught by many teachers, and a teacher can teach only one course, then the mapping cardinality from course to teacher isA. one-to-oneB. one-to-manyC. many-to-oneD. many-to-many8. If there is a many-to-one relationship between entity A and B, then A. there exists a functional dependency from the primary key in B to the primary key in A, i.e., PK(B) → PK(A).B. there exists a functional dependency from the primary key in A to the primary key in B, i.e., PK(A) → PK(B).C. both A and B.D. neither A nor B9. If a functional dependency AB →R holds on relation R(A, B, C), then (A, B) is definitely a ______ of R.A. super keyB. primary keyC. candidate keyD. foreign key10. A relational schema R is in _____ if the domains of all attributes of R are atomicA. 1NFB. 3NFC. BCNFD. 4NF 11. Which one of the following statement is true?A. 3NF is more strict than BCNFB. 4NF is more strict than BCNFC. 1NF is more strict than BCNFD. BCNF is the most strict normal form 12. If a transaction T i has obtain an exclusive lock on data item Q, then transition T j can ______.A. obtain an exclusive lock on data item QB. obtain a shared lock on data item QC. wait for lock granting on data item QD. read or write Q without a lock13. If both <Ti start> and <Ti commit> appear in the log after the nearest checkpoint to system crash, then transaction Ti must be ______ A. undone B. redone C. deleted D. Neither A or B 14. ______ is the final state in a life cycle of a transaction. A. committed B. aborted C. failed D. A or B15. in 2PL protocol, at stage, A transaction may obtain locks, but may not release locks.A. Shrinking phaseB. Growing phaseC. CommittedD. AbortedQuestion 3 (12 points) Consider the following database requirement:A hospital has properties like ID, name, location, rank, capacity. A doctor can be described by ID, name, age, skill. A patient has properties like ID, name, age, sex, address. The above three entities must satisfy some constraints: Each doctor can be unemployed or employed by one hospital. If a doctor is employed, his salary needs to be recorded in the database. A patient can go to many hospitals.1. Draw ER diagram to illustrate the above database requirement [8 points].2. Translate your ER diagram into relational database schemas, and point out the primary keys and foreign keys. You can write your answers in the following format: “R(a1, a2, a3, a4), primary key: a1, foreign key: a4”[4 points].Question 4. (24 points) The following five tables are for a company management system:EMPLOYEE (ID, Name, Birthday, Address, Sex, Salary, Dnumber) DEPARTMENT (Dnumber, Dname, MgrID )PROJECT (Pnumber, Pname, Pcity)WORKS_ON (Pnumber, E-ID, Wdate, Hours)CHILD (E-ID, CHD-ID, CHD_name, Sex, Birthday)1. Based on the giving relations, Specify the following queries using relational algebra (3 points for each).1) List the names of all employees with birthday earlier than …1970-1-1‟ and salary less than $5000.2) List the names of all employees who have a child.3) List the cities and the total number of projects which are located on same city.2. Specify the following operations in SQL(3 points for each).1) Define the table WORKS_ON, declare Pnumber, E-ID, Wdate as the primary key, Pnumber as the foreign key referencing the primary key of project, E-ID as the foreign key referencing the primary key of employee, and ensure that the values of Hours are non-negative with default value 8.2) For each employee working on the …Network‟ project(Pname), increase his/her salary by 5%.3) List the names of all department managers who have no child.4) Find the names of all employees in department 5 (Dnumber) who have worked on both 'X' project and 'Y' project (Pname).5) For each project, find the project number, project name and the total hours (by all employees) spent on that project in Oct. 2009.Question 5 (10 points) Consider a relation R(A, B, C, D, E, F) with the set ofFunctional DependenciesF = { A →BCD, BC →DE, B →D, D →A }pute the Closures of attribute sets A+, C+, E+[3 points].2.Give one candidate key of R [2 points].3.Is F equivalent to { A →BC, BC →E, B →D, D →A } ? [2 points]4.What is the highest normal form of R? Explain your reasons [3 points]. Question 6 (9 points) There are 3 transactions:Consider the following schedule S on transitions set {T1, T2, T3, T4}, with R and W denotes read and write operation respectively.S= R1(A) R2(B)R3(A)R2(C)R4(D)W2(B)R1(B)W1(D)R3(B)W3(B)W2(C)1.List all conflict operation pairs in S [3 points].2.Swapping no-conflict operations to see whether it is a serializable schedule [3points].3.Write all its equivalent serial schedules if S is conflict serializable? Or showwhy if it is not conflict serializable [3 points].华南农业大学期末考试试卷(A 卷-Answer Sheets )2014-2015学年第1 学期 考试科目: Database system 考试类型:(闭卷) 考试时间: 120 分钟 学号 姓名 年级专业Instructions to candidates:1. Write your name, student number and class on both the question papers and the answer papers.2. DO NOT write your answers on the question papers. Write them ALL ON THE ANSWER PAPERS.3. Write your answers in either Chinese or English.4. Hand in all papers (both the question papers and the answer papers).Question 3 (12points)hospital(ID, name, location, rank, capacity), primary key: ID,doctor(ID, name, age, skill, hospitalID, salary), primary key: ID, foreign key: hospitalID refer to hospital(ID)patient (ID, name, age, sex, address), primary key: ID,livein(patientID, hospitalID) primary key: (hospitalID, PatientID), foreign key hospitalID refer to hospital(ID), foreign key patientID refer to patient (ID)Question 4 [24 points]1:1)()()'1970-1-1'5000Name ANDSalary Employee πσ<<Birthday 2)()Name ID E IDEmployee Child π=-∞3) (Pnumber)(Project)citycount G2:1) CREATE TALBE Works_On( Pnumber int,E-ID char(15), Wdate date,Hours int default 8 CHECK (Hours >= 0), PRIMARY KEY (Pnumber, E-ID, Wdate),FOREIGN KEY (E-ID) REFERENCES Employee(ID),FOREIGN KEY (Pnumber) REFERENCES Project(Pnumber), ); 2)UPDA TE Employee SET Salary=Salary *1.05 WHERE ID IN(SELECT E-ID FROM Project natural join Works_on WHERE Pname=‟Network‟);3)SELECT Name FROM Employee, Department WHERE ID=MrgID AND ID NOT IN(SELECT E-ID FROM Child);4)SELECT Name FROM EmployeeWHERE Dnumber=5 AND ID IN(SELECT E-ID FROM Project natural join Works_on WHERE Pname=‟X‟) AND ID IN(SELECT E-ID FROM Project natural join Works_on WHERE Pname=‟Y‟); 5)SELECT Pnumber, Pname, SUM(Hours) FROM Project NATURAL JOIN Works_OnWHERE Wdate BETWEEN …2009-10-1‟ AND …2009-10-31‟ GROUP BY Pnumber, Pname;Question 5 [10 points]1 A +=ABCDE, C + =C, E +=E 2. AF is a candidate key of R3. Yes F equivalent to { A → BC, BC → E, B → D, D → A }4. the highest normal form of R is 1NF. The reason lies in that (1) it is not in BCNF, for A is not a super key but A → BCD. (2) It is not in 3NF for all candidate keys are: DF, AF, BF, so that primary attributes are ABDF. To A → BC, A is not a super key and c is not included in any candidate key therefore it violate rules of 3NF. (3) all attribute are atomic.Question 6 [9 points]1. conflict operation pairs (1)W 2(B)R 1(B) (2) W 2(B)R 3(B) (3)W 2(B)W 3(B) (4) R 1(B)W 3(B) (5) R 2(B) W 3(B) (6) R 4(D) W 1(D)2. S= R 1(A) R 2(B)R 3(A)R 2(C)R 4(D)W 2(B)R 1(B)W 1(D)R 3(B)W 3(B)W 2(C)=> R 2(B)R 1(A) R 2(C) R 3(A) W 2(B) R 4(D) R 1(B)W 1(D)R 3(B) W 2(C)W 3(B) => R 2(B) R 2(C)R 1(A) W 2(B) R 3(A) R 4(D) R 1(B)W 1(D) W 2(C)R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 1(A) R 4(D) R 3(A) R 1(B) W 2(C)W 1(D) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D)R 1(A) R 1(B) R 3(A) W 2(C) W 1(D) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D) R 1(A) R 1(B) W 2(C) R 3(A) W 1(D) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D) R 1(A) W 2(C)R 1(B) W 1(D) R 3(A) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D) W 2(C)R 1(A) R 1(B) W 1(D) R 3(A) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) W 2(C)R 4(D) R 1(B) W 1(D) R 3(A) R 3(B) W 3(B) 3. it is a conflict serializable schedule. The equivalent serial schedules are: T 2, T 4, T 1, T 3 or T 4, T 2, T 1, T 3。

2014年10月全国自考数据库及其应用考前密卷和答案02120(含答案)

2014年10月全国自考数据库及其应用考前密卷和答案02120(含答案)

2014年10月全国自考数据库及其应用考前密卷和答案02120(含答案)一、单项选择题(本大题共20小题,每小题2分,共40分)在每小题列出的四个备选项中只有一个是符合题目要求的,请将其代码填写在题后的括号内。

错选、多选或未选均无分。

第1题若关系R属于1NF,且不存在非主属性部分函数依赖于主键,则R属于()A. 1NFB. 2NFC. 3NFD. BCNF【正确答案】 B【你的答案】本题分数2分第2题关系中属性的取值范围称为()A. 域B. 元数C. 元组D. 基数【正确答案】 A【你的答案】本题分数2分第3题由局部E-R图向全局E-R图转换时,需要消除冲突,其中不包括消除()A. 属性冲突B. 结构冲突C. 命名冲突D. 语法冲突【正确答案】 D【你的答案】本题分数2分第4题用来表达用户需求观点的数据库全局逻辑结构的模型称为()A. 逻辑模型B. 外部模型C. 内部模型D. 概念模型【正确答案】 D【你的答案】本题分数2分第5题 Access提供了自定义工作环境命令,若要改变在数据库窗口中鼠标的动作方式(单击或双击),则改变的途径是利用"工具"菜单"选项"命令对话框中的 ()A. "常规"选项卡B. "视图"选项卡C. "键盘"选项卡D. "编辑/查找"选项卡【正确答案】 B【你的答案】本题分数2分第6题设置数据库密码时,应该选择打开数据库的方式是以 ()A. 读写方式打开B. 只读方式打开C. 独占方式打开D. 独占只读方式打开【正确答案】 C【你的答案】本题分数2分第7题下列选项中,用于保证数据库可靠性的措施是 ()A. 复制与粘贴数据库对象B. 备份与还原数据库C. 使用用户级安全机制D. 设置访问数据库的权限【正确答案】 B【你的答案】本题分数2分第8题创建一个人事档案表,其中用于存储照片字段的数据类型应该设置为()A. 超链接B. OLE对象C. 查阅向导D. 备注【正确答案】 B【你的答案】本题分数2分第9题在Access中,若要定义两个字段的组合为主键,则下列说法中正确的是 ()A. 其中一个字段必须为自动编号类型B. 两个字段组合值可以重复C. 两个字段中都不能有空值D. 两个字段都不能有重复值【正确答案】 C【你的答案】本题分数2分第10题假设规定某个日期型字段的取值范围是2008年1月1日到2009年1月1日,则可设置该字段的有效性规则为()A. Between #1/1/2008#And#1/1/2009#B. Between "1/1/2008"And"1/1/2009"C. Between*1/1/2008*And*1/1/2009*D. Between [2008年1月1日] And[2009年1月1日]【正确答案】 A【你的答案】本题分数2分第11题若设置查询准则表达式为:LIKE"P[ABF]###",则满足查询条件的值是 ()A. PAB. P124C. PF123D. PABF【正确答案】 C【你的答案】本题分数2分第12题如果需要反复执行同一查询,但每次查询条件的取值不同,则应该创建一个()A. 参数查询B. 选择查询C. 操作查询D. 更新查询【正确答案】 A【你的答案】本题分数2分第13题有商品表R(商品编码,品名,规格,生产厂家,单价,数量),若要创建一个显示商品信息的窗体,则需指定R为该窗体的()A. 控件来源B. 数据环境C. 属性来源D. 记录源【正确答案】 D【你的答案】本题分数2分第14题假设在窗体中创建了一个标签控件,且需要设置标签中的字体、边框和前/背景颜色等,则应打开标签的"属性"窗口,选择()A. "数据"选项卡B. "格式"选项卡C. "事件"选项卡D. "其他"选项卡【正确答案】 B【你的答案】本题分数2分第15题下列选项中,不属于报表视图的是 ()A. 版面预览视图B. 打印预览视图C. 数据表视图D. 设计视图【正确答案】 C【你的答案】本题分数2分第16题有成绩表S(学号,课程号,分数),如果要在报表中输出每个学生的平均分,则应在报表设计中使用函数()A. =Avg([成绩])B. =Count([成绩])C. =Sum([成绩])D. =Total([成绩])【正确答案】 A【你的答案】本题分数2分第17题下列关于设置数据访问页主题的说法中,错误的是()A. 在Access中主题图形是静态的B. 可以使用主题确定数据访问页的整体风格C. 主题相当于设计数据访问页的模板D. 可以根据主题自动定义数据访问页的数据源【正确答案】 D【你的答案】本题分数2分第18题下列关于数据访问页的说法中,错误的是 ()A. 在"资源管理器"中不能直接打开数据访问页B. 在Access数据库中只保存数据访问页的快捷方式C. 数据访问页是一种直接与数据库连接的网页D. 在IE中使用数据访问页添加和修改的记录将保存在数据库中【正确答案】 A【你的答案】本题分数2分第19题在面向对象程序设计的概念中,类可以分为"容器类"和"控件类",下列选项中属于"控件类"的是()A. 窗体B. 报表C. 选项卡D. 文本框【正确答案】 D【你的答案】本题分数2分第20题下列关于面向对象程序设计概念的说法中,不正确的是()A. 对象特征的描述称为对象的属性B. 事件过程是对事件的一种响应和处理C. 执行对象的方法需要外部事件驱动D. 按钮、文本框、对话框等都视为对象【正确答案】 C二、填空题(本大题共15小题,每小题1分,共15分)请在每小题的空格中填上正确答案。

02120数据库及其应用2014年10月真题及答案

02120数据库及其应用2014年10月真题及答案

2014年10月高等教育自学考试全国统一命题考试数据库及其应用试卷(课程代码02120)本试卷共6页,满分l00分,考试时间150分钟。

考生答题注意南项:1.本卷所有试题必须在答题卡上作答。

答在试卷上无效,试卷空白处和背面均可作草稿纸。

2.第一部分为选择题。

必须对应试卷上的题号使用2B铅笔将“答题卡”的相应代码涂黑。

3.第二部分为非选择题。

必须注明大、小题号,使用0.5毫米黑色字迹签字笔作答。

4.合理安排答题空间,超出答题区域无效。

第一部分选择题一、单项选择题(本大题共20小题。

每小题2分,共40分)在每小题列出的四个备选项中只有一个是符合题目要求的,请将其选出并将“答题卡”的相应代码涂黑。

未涂、锚涂或多涂均无分。

1.在数据库系统中,数据的正确性和一致性称为数据的A.完整性 B.并发控制 C.安全性 D.恢复2.用来表达用户使用观点的数据库局部逻辑结构称为A.概念模型 B.逻辑模型 C.外部模型 D.内部模型3.有学生(学号,姓名,性别,班级号)和班级(班级号,班级名称,专业)两个关系,下列说法中正确的是A.班级关系的外键是“班级号” B.学生关系的主键是“班级号”C.学生关系的外键是“班级号” D.学生关系的主键是“姓名”A. lNF B.2NF C.3NF D.BCNF5.在Access中,可以创建的数据库对象有A.5种 B.6种 C.7种 D.8种6.数据库设计的正确流程是7.在学生(学号,姓名,性别,班级,所属系)表中,可作为主键的字段是A.学号 B.姓名C.班级D.所属系8.长整型字段占用的空间是A.2个字节 B.4个字节C.8个字节 D.16个字节9.如果要限定学生成绩字段的取值范围,则应设定该字段的A.输入掩码 B.默认值C.有效性规则 D.有效性文本A.一对一 B.一对多C.多对一 D.多对多11.有学生表:S(学号,姓名,性别),其中“学号”字段是由文本氆的9位数字组成。

如果要在S中检索学号第5位是3的学生信息,则查询条件表达式是12.有职工表:R(职工号,姓名,性别,出生年月,职务),基于R创建一个检索职工信息的查询,当输入任意一个职工的姓名,可以显示该职工的信息,则该查询的类型是A.更新查询 B.选择查询C.参数查询 D.追加查询A.单页窗体 B.连续窗体C.控制窗体 D.子窗体14.假设有Access数据库A和SQL Server数据库B,在数据库A中直接访问数据库B中表的方法是A.操作查询B.参数查询C.联合查询 D.传递查询15.下列关于报襄数据源的说法中,正确的是A.报表的数据源只能是表B.报表的数据源可以是表或查询C.报表的数据源可以是表或窗体 D.报表的数据源可以是表、查询和窗体16.有职工考勤表:考勤(职工号,日期,工时),如果要在报表中输出每个职工的总工时,则在计算总工时的文本框中输入表达式17.下列选项中,属于数据访问页的视图是A.页面视图 B.访问视图C.预览视图 D.数据表视图18.下列选项中,专门用于数据访问页的控件是19.用于打开指定窗体的宏操作为A.Open B.OpenFormC.OpenWin D.OpenApp20.判断“图书检索”窗体中“分类”字段值为“自然科学”的宏条件表达式为第二部分非选择题二、填空题(本大题共l5小题,每小题l分,共15分) 请在答题卡上作答。

试卷_数据库试卷kui1

试卷_数据库试卷kui1
试卷名称:数据库试卷 kui1 试卷说明:2014 年制 命题教师: 中南大学 信息科学与工程学院 奎晓燕 一、单项选择题(总分 28) 1. (分值:1.0 分)现有表 Employee,字段:id(int),firstname(varchar),lastname(varchar); 以下 sql 语句错误的是( )。 A: SELECT firstname+R .R +lastname as R nameR FROM employee B: SELECT firstname+R .R + lastname =R nameR FROM employee C: SELECT R nameR = firstname+R .R +lastname FROM employee D: SELECT firstname, llastname FROM employee 序号:10 难度:1 考查点:数据查询
C: SELECT,GROUP
D: 仅 SELECT
序号:156 难度:1 考查点:数据查询
11. (分值:1.0 分)下列说法(
)不正确。
A: 每个数据库可以包含若干个主数据文件
B: 主数据文件的扩展名是:mdf
C: 主数据文件中存放的是数据库的系统信息和用户数据库的数据
D: 每个数据库都只包含一个主数据文件
D: CREATE TRIGGER tgz ON 职工工资表 FOR INSERT AS UPDATE 职工工资表 SET 工资合计=a.基本工资+a.奖金 FROM 职工工资表 a JOIN INSERTED b ON a.职工号=b.职工号 AND a.日期=b.日期 序号:81 难度:3 考查点:SQL Server 数据表
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

华南农业大学期末考试试卷(A卷)2014-2015学年第一学期考试科目:数据库系统考试类型:闭卷考试时间:120 分钟学号姓名年级专业Question 1: true-false question (15 points) For each of the following statements, indicate whether it is TRUE or FALSE (Using √for TRUE and ×for FALSE).1. A primary key is a field (or group of fields) that uniquely describes each record inthe database.2.Data redundancy improves the integrity of a database.3.SQL is the language used by relational databases to create objects and tomanipulate and retrieve data.4. A relational database management system does not include tools for backing up &restoring databases.5.An attribute is also known as a row in most databases.6.An association between entities is known as a relationship.7.Integrity constraints limit the number of entities that can be placed in a table ordatabase.8.The Entity-Relationship data model is often used in the physical design phase.9.The concept “relation” in relation model is exactly the same as the concept“relationship” in ER model.10.Most relationship sets in a database system involves two entity sets.11.The closure of an attribute set contains that attribute set.12.Lossless decomposition is necessary in a decomposition algorithm.13.If A →B and C →D hold, then AC →BD also holds.14.It is not necessary that a legal schedule preserves the order in which theinstructions appear in each individual transaction.15.Update operations in database must be written into log before updating database.Question 2 single-choice question (2 points for each problem, 30 points in total)1. is the only one incorrect description from the followings:A. R=(R-S)∪(R∩S)B. R-S=R-(R∩S)C. R∩S=S-(R-S)D. R∩S=S-(S-R)2. Choose the only one correct expression from the followings: _ ______.A. (≠ some) ≡ inB. (= all) ≡ not inC. exists r ⇔ r ≠ ØD. X-Y ≠Ø ⇔ X ⊆ Y3. of the following four expressions of relational algebra is not equivalent to the other three? They are all based on the relations R(A,B) and S(B,C).A.()S R B A ,∏B. ()S R B ∏C.()S R B R A ⨯∏., D.()()()S R R B A ∏⨯∏⋂4. In the following, assume a is an attribute of some character-string type, e.g. CHAR(10), and that it may be NULL.Q1: SELECT * FROM R WHERE a IS NULL;Q2: SELECT * FROM R WHERE a NOT LIKE '%'; A.Q1 and Q2 produce the same answer.B. The answer to Q1 is always contained in the answer to Q2.C. The answer to Q2 is always contained in the answer to Q1.D. Q1 and Q2 produce different answers.5. The Entity-Relationship data model isA. DBMS dependentB. DBMS independentC. both A and BD. neither A nor B 6. In SQL, an UPDATE statement without a WHERE clause: A. Updates every row in a table. B. Updates no rows in a table. C. Updates every column in a table. D. Results in a Cartesian product.7. If a course can be taught by many teachers, and a teacher can teach only one course, then the mapping cardinality from course to teacher isA. one-to-oneB. one-to-manyC. many-to-oneD. many-to-many8. If there is a many-to-one relationship between entity A and B, then A. there exists a functional dependency from the primary key in B to the primary key in A, i.e., PK(B) → PK(A).B. there exists a functional dependency from the primary key in A to the primary key in B, i.e., PK(A) → PK(B).C. both A and B.D. neither A nor B9. If a functional dependency AB →R holds on relation R(A, B, C), then (A, B) is definitely a ______ of R.A. super keyB. primary keyC. candidate keyD. foreign key10. A relational schema R is in _____ if the domains of all attributes of R are atomicA. 1NFB. 3NFC. BCNFD. 4NF 11. Which one of the following statement is true?A. 3NF is more strict than BCNFB. 4NF is more strict than BCNFC. 1NF is more strict than BCNFD. BCNF is the most strict normal form 12. If a transaction T i has obtain an exclusive lock on data item Q, then transition T j can ______.A. obtain an exclusive lock on data item QB. obtain a shared lock on data item QC. wait for lock granting on data item QD. read or write Q without a lock13. If both <Ti start> and <Ti commit> appear in the log after the nearest checkpoint to system crash, then transaction Ti must be ______ A. undone B. redone C. deleted D. Neither A or B 14. ______ is the final state in a life cycle of a transaction. A. committed B. aborted C. failed D. A or B15. in 2PL protocol, at stage, A transaction may obtain locks, but may not release locks.A. Shrinking phaseB. Growing phaseC. CommittedD. AbortedQuestion 3 (12 points) Consider the following database requirement:A hospital has properties like ID, name, location, rank, capacity. A doctor can be described by ID, name, age, skill. A patient has properties like ID, name, age, sex, address. The above three entities must satisfy some constraints: Each doctor can be unemployed or employed by one hospital. If a doctor is employed, his salary needs to be recorded in the database. A patient can go to many hospitals.1. Draw ER diagram to illustrate the above database requirement [8 points].2. Translate your ER diagram into relational database schemas, and point out the primary keys and foreign keys. You can write your answers in the following format: “R(a1, a2, a3, a4), primary key: a1, foreign key: a4”[4 points].Question 4. (24 points) The following five tables are for a company management system:EMPLOYEE (ID, Name, Birthday, Address, Sex, Salary, Dnumber) DEPARTMENT (Dnumber, Dname, MgrID )PROJECT (Pnumber, Pname, Pcity)WORKS_ON (Pnumber, E-ID, Wdate, Hours)CHILD (E-ID, CHD-ID, CHD_name, Sex, Birthday)1. Based on the giving relations, Specify the following queries using relational algebra (3 points for each).1) List the names of all employees with birthday earlier than …1970-1-1‟ and salary less than $5000.2) List the names of all employees who have a child.3) List the cities and the total number of projects which are located on same city.2. Specify the following operations in SQL(3 points for each).1) Define the table WORKS_ON, declare Pnumber, E-ID, Wdate as the primary key, Pnumber as the foreign key referencing the primary key of project, E-ID as the foreign key referencing the primary key of employee, and ensure that the values of Hours are non-negative with default value 8.2) For each employee working on the …Network‟ project(Pname), increase his/her salary by 5%.3) List the names of all department managers who have no child.4) Find the names of all employees in department 5 (Dnumber) who have worked on both 'X' project and 'Y' project (Pname).5) For each project, find the project number, project name and the total hours (by all employees) spent on that project in Oct. 2009.Question 5 (10 points) Consider a relation R(A, B, C, D, E, F) with the set ofFunctional DependenciesF = { A →BCD, BC →DE, B →D, D →A }pute the Closures of attribute sets A+, C+, E+[3 points].2.Give one candidate key of R [2 points].3.Is F equivalent to { A →BC, BC →E, B →D, D →A } ? [2 points]4.What is the highest normal form of R? Explain your reasons [3 points]. Question 6 (9 points) There are 3 transactions:Consider the following schedule S on transitions set {T1, T2, T3, T4}, with R and W denotes read and write operation respectively.S= R1(A) R2(B)R3(A)R2(C)R4(D)W2(B)R1(B)W1(D)R3(B)W3(B)W2(C)1.List all conflict operation pairs in S [3 points].2.Swapping no-conflict operations to see whether it is a serializable schedule [3points].3.Write all its equivalent serial schedules if S is conflict serializable? Or showwhy if it is not conflict serializable [3 points].华南农业大学期末考试试卷(A 卷-Answer Sheets )2014-2015学年第1 学期 考试科目: Database system 考试类型:(闭卷) 考试时间: 120 分钟 学号 姓名 年级专业Instructions to candidates:1. Write your name, student number and class on both the question papers and the answer papers.2. DO NOT write your answers on the question papers. Write them ALL ON THE ANSWER PAPERS.3. Write your answers in either Chinese or English.4. Hand in all papers (both the question papers and the answer papers).Question 3 (12points)hospital(ID, name, location, rank, capacity), primary key: ID,doctor(ID, name, age, skill, hospitalID, salary), primary key: ID, foreign key: hospitalID refer to hospital(ID)patient (ID, name, age, sex, address), primary key: ID,livein(patientID, hospitalID) primary key: (hospitalID, PatientID), foreign key hospitalID refer to hospital(ID), foreign key patientID refer to patient (ID)Question 4 [24 points]1:1)()()'1970-1-1'5000Name ANDSalary Employee πσ<<Birthday 2)()Name ID E IDEmployee Child π=-∞3) (Pnumber)(Project)citycount G2:1) CREATE TALBE Works_On( Pnumber int,E-ID char(15), Wdate date,Hours int default 8 CHECK (Hours >= 0), PRIMARY KEY (Pnumber, E-ID, Wdate),FOREIGN KEY (E-ID) REFERENCES Employee(ID),FOREIGN KEY (Pnumber) REFERENCES Project(Pnumber), ); 2)UPDA TE Employee SET Salary=Salary *1.05 WHERE ID IN(SELECT E-ID FROM Project natural join Works_on WHERE Pname=‟Network‟);3)SELECT Name FROM Employee, Department WHERE ID=MrgID AND ID NOT IN(SELECT E-ID FROM Child);4)SELECT Name FROM EmployeeWHERE Dnumber=5 AND ID IN(SELECT E-ID FROM Project natural join Works_on WHERE Pname=‟X‟) AND ID IN(SELECT E-ID FROM Project natural join Works_on WHERE Pname=‟Y‟); 5)SELECT Pnumber, Pname, SUM(Hours) FROM Project NATURAL JOIN Works_OnWHERE Wdate BETWEEN …2009-10-1‟ AND …2009-10-31‟ GROUP BY Pnumber, Pname;Question 5 [10 points]1 A +=ABCDE, C + =C, E +=E 2. AF is a candidate key of R3. Yes F equivalent to { A → BC, BC → E, B → D, D → A }4. the highest normal form of R is 1NF. The reason lies in that (1) it is not in BCNF, for A is not a super key but A → BCD. (2) It is not in 3NF for all candidate keys are: DF, AF, BF, so that primary attributes are ABDF. To A → BC, A is not a super key and c is not included in any candidate key therefore it violate rules of 3NF. (3) all attribute are atomic.Question 6 [9 points]1. conflict operation pairs (1)W 2(B)R 1(B) (2) W 2(B)R 3(B) (3)W 2(B)W 3(B) (4) R 1(B)W 3(B) (5) R 2(B) W 3(B) (6) R 4(D) W 1(D)2. S= R 1(A) R 2(B)R 3(A)R 2(C)R 4(D)W 2(B)R 1(B)W 1(D)R 3(B)W 3(B)W 2(C)=> R 2(B)R 1(A) R 2(C) R 3(A) W 2(B) R 4(D) R 1(B)W 1(D)R 3(B) W 2(C)W 3(B) => R 2(B) R 2(C)R 1(A) W 2(B) R 3(A) R 4(D) R 1(B)W 1(D) W 2(C)R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 1(A) R 4(D) R 3(A) R 1(B) W 2(C)W 1(D) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D)R 1(A) R 1(B) R 3(A) W 2(C) W 1(D) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D) R 1(A) R 1(B) W 2(C) R 3(A) W 1(D) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D) R 1(A) W 2(C)R 1(B) W 1(D) R 3(A) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) R 4(D) W 2(C)R 1(A) R 1(B) W 1(D) R 3(A) R 3(B) W 3(B) => R 2(B) R 2(C) W 2(B) W 2(C)R 4(D) R 1(B) W 1(D) R 3(A) R 3(B) W 3(B) 3. it is a conflict serializable schedule. The equivalent serial schedules are: T 2, T 4, T 1, T 3 or T 4, T 2, T 1, T 3。

相关文档
最新文档