数据库理论与技术复习题

合集下载

复习题(理论)

复习题(理论)

<数据库应用技术> 习题一、选择题1.下列四项中,不属于数据库特点的是( c )。

A.数据共享 B.数据完整性C. 数据冗余很高D.数据独立性高2.目前( a )数据库系统已逐渐淘汰了网状数据库和层次数据库,成为当今最为流行的商用数据库系统。

A.关系 B.面向对象 C.分布3.关于索引的描述,错误的是 [ b ]A、索引必须依赖于表而建立B、索引是虚拟表C、索引是一个单独的、物理的数据库结构D、索引存放在索引页面上4.关系数据库提供的完整性约束不包括 [ a ]A、命名完整性B、参照完整性C、实体完整性D、用户自定义完整性数据库设计中的概念结构设计的主要工具是( b )。

A.数据模型 B.E—R模型 C.新奥尔良模型 D.概念模型5.创建表时在stuid列上建立命为pk_id的主键约束的正确语句是 [ b ]A、… stuid primary pk_idB、… constraint pk_id primary key(stuid)C、… constraint pk_id primary key on(stuid)D、… constraint pk_id on primary key(stuid)6.( a )是位于用户与操作系统之间的一层数据管理软件,它属于系统软件,它为用户或应用程序提供访问数据库的方法。

数据库在建立、使用和维护时由其统一管理、统一控制。

A.DBMS B.DB C.DBS D.DBA7.删除stu表中记录,条件是score值低于60且Age值大于30,以下正确的是 [ a ]A、delete from stu where score<60 and Age>30B、delete stu where score<60 and Age>30C、delete from stu where score<60 and Age>=30D、delete stu where score<=60 and Age>308.以下对视图描述错误的是 [ d ]A、视图可以为用户集中需要的数据B、视图可以简化用户权限管理C、视图可以屏蔽数据库的复杂性D、视图同基本一样存储了用户数据9.关系模型的完整性规则不包括 ( c )。

数据库复习题

数据库复习题

一、选择题1、在数据管理技术的发展过程中,经历了人工管理阶段、文件系统阶段和数据库系统阶段。

在这几个阶段中,数据独立性最高的是()阶段。

A.数据库系统B.文件系统C.人工管理D.数据项管理2、数据库的概念模型独立于()。

A.具体的机器和DBMS B.E-R图C.信息世界D.现实世界3、()是存储在计算机内有结构的数据的集合。

A.数据库系统B.数据库C.数据库管理系统D.数据结构4、关系数据库管理系统应能实现的专门关系运算包括()。

A.排序、索引、统计B.选择、投影、连接C.关联、更新、排序D.显示、打印、制表5、关系模型中,一个关键字是()。

A.至多由一个属性组成B.可由一个或多个其值能惟一标识该关系模式中任何元组的属性组成C.可由多个任意属性组成D.以上都不是6、自然连接是构成新关系的有效方法。

一般情况下,当对关系R和S使用自然连接时,要求R和S含有一个或多个共有的()。

A.元组B.行C.记录D.属性7、SQL语言是()的语言,易学习。

A.过程化B.非过程化C.格式化D.导航式8、设有一个关系:DEPT(DNO,DNAME ),如果要找出倒数第3个字母为W,并且至少包含4个字母的DNAME,则查询条件子句应写成WHERE DNAME LIKE()A.'W%' B.'_%W_ _' C.'W' D.'W%'9、在关系数据库设计理论中,如果一个关系R满足1NF,但R的某个非码属性传递函数依赖于码,则关系R至多属于( )A.1NF B.2NF C.3NFD、BCNF10、设关系R与关系S具有相同的目(或称度),且相对应的属性的值取自向一个域,则S-(S-R)等于()A.R∪S B.R∩S C.R×S D.R-S 11、保护数据库,防止未经授权的或不合法的使用造成的数据泄漏、更改破坏。

这是指数据的()。

A.安全性B.完整性C.并发控制D.恢复12、数据库的()是指数据的正确性和相容性。

数据库原理与技术复习题及参考答案

数据库原理与技术复习题及参考答案

数据库原理与技术复习题及参考答案《数据库原理与技术》课程复习资料⼀、名词解释:1.数据管理2.DB3.DBMS4.DBS5.RDBMS6.DBA7.ORDBMS8.SQL9.关系10.关系模型11.关系系统12.完整性控制13.属性14.2NF15.候选码⼆、单项选择题:1.任何由⼆个属性组成的关系可能是 [ ]A.1NFB.2NFC.3NFD.不能判定2.数据冗余引起的问题主要是花费 [ ]A.时间B.空间C.时间与空间D.时间或空间3.在数据库中,存储冗余数据是 [ ]A.不应该的B.应该且合理的C.合理的但不能过度冗余D.视情况⽽定4.在关系运算中,进⾏⾃然联接运算的两个关系 [ ]A.必有相同的列名B.必有相同的关键字C.没有要求D.必有类型相同的列5.在数据库系统中,DBMS与DB 的关系是 [ ]A.DBMS包括DBB.DB 包括DBMSC.不⼀定的D.同级关系6.在SQL的查询语句的WHERE⼦句中,下列哪个不能出现? [ ]A.sumB. !=C.<>D.<=7.关系模式 R,S具有共同的属性X,且X是R的主码,则X称为S的 [ ]A.主码B.外码C.关键字D.相对主码8.关系系统不会具有如下哪个特征? [ ]A.⽀持关系数据结构B.⽀持关系数据操作C.⽀持关系模型所有特征D.⽀持表结构9.⼀个外部关键字的属性可以 [ ]A.1 个B.不超过2个C.多个D.最多1个10.设属性组 X,Y,Z分别是m, n, k⽬的,则R(X,Y)÷S(Y,Z)是( )⽬的。

[ ]A. mB.nC. kD. m+n-k11.数据库与数据仓库关系是 [ ]C.不⼀样的概念D.不确定的12.数据库管理系统是⼀个 [ ]A.软件系统B.硬件系统C.软硬件结合的系统D.数据集合13.数据模型是( )数据特征的抽象。

[ ]A.计算机世界B.现实世界C.模型空间D.概念世界14.在SQL的查询中,⼦查询中( )返回多个记录。

数据库复习题

数据库复习题

数据库复习题数据库原理复习题(2336)一、单项选择题1、关系中属性个数称为“元数”,元组个数称为( C )。

A、行数B、列数C、基数D、超键2、SQL的主码子句和外码子句属于DBS的 A 。

A、完整性措施B、安全性措施C、恢复措施D、并发控制措施3、概念设计结果是( B )。

A、一个与DBMS相关的概念模式B、一个与DBMS无关的概念模式C、数据库系统的公用视图D、数据库系统的数据字典4、启动、暂停或停止SQL Server数据库服务器要使用哪种工具?( C)A、企业管理器B、查询分析器C、服务管理器D、服务器网络实用工具5、设k元关系R,则σ2>’4’表示( B )。

A、从R中挑选第4个分量的值小于2的元组所构成的关系B、从R中挑选第2个分量值大于4的元组所构成的关系C、从R中挑选第2个分量值大于第4个分量值的元组所构成的关系D、σ 2>’4’与R相比,基数不变,元数减少6、在SQL中,与“IN”等价的操作符是( D )。

A、=ALLB、<>SOMEC、<>ALLD、=SOME7、若以选课(学号,课号,成绩)表达“某学生选修某课程获得了某个成绩。

”则在( C )的情况下,成绩不完全函数依赖于学号。

A、一个学生只能选修一门课B、一门课程只能被一个学生选修C、一个学生可以选修多门课D、一门课程可以被多个学生选修8、当同一个实体集内部的实体之间存在着一个M:N联系时,那么根据ER模型转换成关系模型的规则,这个ER结构转换成关系模式个数为( B )。

A、1个B、3个C、5个D、7个9、SQL Server 2000 企业版可以安装在____D_____操作系统上。

A、Microsoft Windows 98B、Microsoft Windows Me 和 XPC、Microsoft Windows 2000 ProfessionalD、Microsoft Windows NT10、在SELECT 语句中,与关系代数中π运算符对应的是( A )子句。

2022数据库原理与技术复习题及参考答案

2022数据库原理与技术复习题及参考答案

2022数据库原理与技术复习题及参考答案数据库原理与技术一、名词解释:1.DB2.DBS3.DBA4.DBMS5.DBMS6.SQL7.NF8.BCNF9.完整性控制10.PL/SQL11.3NF12.安全性控制13.关系模型14.关系数据库二、判断题:1.任何由二个属性组成的关系不可能是3NF。

()2.数据冗余引起的问题主要是花费空间。

()3.R(某,Y,Z)是个三元关系,某,Y,Z是单属性且某是码,则R一定是2NF。

()4.DB设计中优化设计的目标是减少DB设计时间。

()5.在数据库中,不应该存储任何冗余数据。

()6.关系中的行、列均可交换。

()7.在关系统运算中,进行自然联接运算的两个关系必须具有相同关键字。

()8.在数据库设计中,由分E-R图生成总E-R图,主要是消除结构冲突与命名冲突。

()9.在关系笛卡尔积运算记号R某S中,R、S均为属性名。

()10.关系代数运算中,运算对象为两个关系的运算有并、交、选择、投影等。

()11.常用的关系运算是关系代数和逻辑演算。

()12.在数据库系统中,DBMS包括DBS和DB。

()13.SQL的标准库函数COUNT,SUM等是不允许直接出现在查询语句中的。

14.在SQL的查询语句的WHERE子句中,我们可以使用“字段!=null”。

()15.数据库具有数据结构化、较小冗余、易于扩充等特点。

()16.数据模型包括数据结构,数据操作,完整性约束条件。

()17.关系模式R,S具有共同的属性某,且某是R的主码,则某称为S的外部码。

()18.关系系统是支持关系模型所有特征的系统。

()19.一个外部关键字的属性至多一个。

()20.设属性组某,Y,Z分别是m,n,k目的,则R(某,Y)÷S(Y,Z)是m目的。

21.描述事物的符号记录称为数据。

()22.数据库也就是数据仓库。

()23.数据库管理系统是一个软件系统。

()24.数据库系统指软件为主,不包括数据库与用户。

数据库技术总复习题

数据库技术总复习题

《数据库技术》复习要点一、选择题1.物理结构的改变不影响整体逻辑结构的性质,称为数据库的(A)A.物理数据独立性B.逻辑数据独立性C.物理结构独立性D.逻辑结构独立性2.ER模型属于(D)A.概念模型B.层次模型C.网状模型D.关系模型3.数据库系统的三级模式结构中,定义索引的组织方式属于()A.概念模式B.外模式C.逻辑模式D.内模式4.一个供应商可供应多种零件,而一种零件可由多个供应商供应,则实体供应商与零件之间的联系是(D)A.一对一B.一对多C.多对一D.多对多5.数据库中存储的是( A)。

A.数据B.数据模型C.数据之间的联系D.数据以及数据之间的联系6.反映现实世界中实体及实体间联系的信息模型是( C)。

A.关系模型B.层次模型C.网状模型D.E-R模型7.下列四项中,可以直接用于表示概念模型的是( A)。

A.实体-联系(E-R)模型B.关系模型C.层次模型D.网状模型8. 下列四项中说法不正确的是( C)。

A.数据库减少了数据冗余B.数据库中的数据可以共享C.数据库避免了一切数据的重复D.数据库具有较高的数据独立性9.要求“学生”关系的“性别”属性只能取0或1,这属于关系的( )。

A.参照完整性规则B.实体完整性规则C.用户定义完整性规则D.域完整性规则10.多个用户同时对同一数据进行操作,描述的是( B)。

A.数据库的完整性B.数据库的并发控制C.数据库的恢复D.数据的完整性11.视图是一个“虚表”,视图的构造基于( C)。

A.基本表B.视图C.基本表或视图D.数据字典12.SQL语言中,SELECT语句的执行结果是( B )。

A.属性B.表C.元组D.数据库13.SQL语言中,条件“年龄BETWEEN 20 AND 30”表示年龄在20至30之间,且( A)。

A.包括20岁和30岁B.不包括20岁和30岁C.包括20岁但不包括30岁D.包括30岁但不包括20岁14.在SQL语言中,对输出结果排序的是(A)。

数据库期末复习题

数据库期末复习题

第1章数据库技术基础一、单选题1.数据模型反映的是(A )。

A.事物本身的数据和相关事物之间的联系B.事物本身所包含的数据C.记录中所包含的全部数据D.记录本身的数据和相关关系2.数据库系统的核心是(C )。

A.数据库B.数据库管理员C.数据库管理系统 D.文件3.数据库管理系统中负责数据模式定义的语言是(A )。

A.数据定义语言B.数据管理语言C.数据控制语言D.数据操纵语言4.数据库管理系统是(B )。

A.操作系统的一部分B.在操作系统支持下的系统软件C.一种编译系统D.一种操作系统5.在数据管理技术发展的三个阶段中,数据共享最好的是(C ).A.人工管理阶段B.文件系统阶段C.数据库系统阶段D.三个阶段相同6.用Access创建的数据库文件,其扩展名是( D ).A..adp B..dbf C.。

frm D..mdb7.数据库系统是由数据库、数据库管理系统、应用程序、(A )、用户等构成的人机系统。

A.数据库管理员B.程序员C.高级程序员D.软件开发商8.在数据库中存储的是(B )。

A.信息B.数据C.数据结构D.数据模型9.在下面关于数据库的说法中,错误的是(D )。

A.数据库有较高的安全性B.数据库有较高的数据独立性C.数据库中的数据可以被不同的用户共享D.数据库中没有数据冗余10.不是数据库系统特点的是(C )。

A.较高的数据独立性B.最低的冗余度C.数据多样性D.较好的数据完整性11.Access是( C )数据库管理系统.A.层次B.网状C.关系型D.树状12.在Access中,数据库的基础和核心是(A ).A.表B.查询C.窗体D.宏13.在下面关于Access数据库的说法中,错误的是(B ).A.数据库文件的扩展名为mdb B.所有的对象都存放在同一个数据库文件中C.一个数据库可以包含多个表D.表是数据库中最基本的对象,没有表也就没有其他对象14.Access数据库管理系统依赖于(B )操作系统.A.Dos B.Windows C.Unix D.Ucdos15.常见的数据模型有3种,它们是( B )。

数据库原理考试总复习题库 你懂的 肯定帮的到你

数据库原理考试总复习题库  你懂的 肯定帮的到你

数据库原理总复习题一、填空题1. SQL Server数据库应用的处理过程分布在客户机(或客户端)__ 和服务器上。

2. SQL Server提供了动态的自我管理机制,能够自动增大或缩小数据库所占用的硬盘空间。

3、. 常见的SQL Server2005的版本一般包括企业版、标准版、工作组版、精简版(次序无先后)。

6. SQL Server主数据文件、次数据文件和事务日志文件默认的扩展名分别为mdf、ndf、ldf (次序无先后)。

7. SQL Server客户机传递到服务器上的一组完整的数据和SQL语句称为批处理_ 。

9. 函数LEFT(…abcdef‟,2)的结果是‟ab‟。

10. SQL Server中的整数类型包括____ bigint、int、smallint、tinyint (次序无先后)___四种。

11. Microsoft SQL Server2005是运行在_____ windows _____操作系统平台上的、逻辑模型为___关系_____型数据库管理系统。

12. SQL Server将数据组织到用户可以看见的逻辑组件____ ,而在磁盘上则作为操作系统文件实现。

13. 如果希望修改数据库的名字,可以使用的系统存储过程是sp_renamedb。

14. 数据库备份和恢复的Transact-SQL语句分别是____ Backup Database_____和____ Restore Database _____。

15. 找回被删除表的惟一方法是事先做好数据库的备份工作。

16. 索引是一种常用的改善数据库性能的技术。

17. 索引会影响对基本表的___插入、删除、修改____等操作的速度。

18. 聚集索引与非聚集索引相比,查询速度要快。

19. SQL Server中为局部变量赋值的语句是SELECT和SET。

20. 使用create database命令定义一个数据库,包括定义_____数据_____文件和_____日志_____文件两个部分。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

《数据库理论与技术》期终考试复习题一、选择题:1.Chubby presents itself to clients as this service:a) Centralized mutual exclusion b) Hierarchical mutual exclusionc) Token-based mutual exclusion d) Contention-based mutual exclusion.2.Which statement best describes a client's interaction with Chubby?a) A client contacts any Chubby server, which then forwards the request to the appropriateserver in the Chubby cell.b) A client contacts any Chubby server, which can process the request since all Chubbyservers are replicated.c) A client contacts the Chubby master, which then forwards the request to the appropriateserver in the Chubby cell.d) A client contacts the Chubby master, which handles all client requests.3.By sending messages through Paxos, processes can ensure that concurrent messages become:a) Global time ordered multicasts. b) Totally ordered multicasts.c) Causally ordered multicasts. d) Unordered multicasts.4.Based on their vector timestamps, which event causally precedes (4, 2, 8, 5)?a) (3, 1, 7, 7) b) (5, 1, 6, 2) c) (4, 2, 8, 4) d) (4, 3, 8, 5)5.With Paxos, message sequence numbers are assigned by the:a) Acceptor b) Client c) Learner d) Proposer6.Paxos reaches agreement when:a)All proposers agree on a value to send to the acceptors.b)All acceptors agree to a proposed value.c)The majority proposers agree on a value to send to the acceptors.d)The majority of acceptors agree to a proposed value.7. A write-ahead log does NOT enable a process to:a) Undo changes in case of an abort. b) Record that a transaction has committed.c) Record the response that was sent to a vote in a commit protocol.d) Achieve higher performance by prefetching data.8.To abort a distributed transaction:a)At least one participant must vote to abort.b)The majority of participants must vote to abort.c)All of the participants must vote to abort.d)All live participants must vote to abort.9.The motivation for an eventual consistency model was:a)It is impossible to have highly available replicated data that is fully consistent in asystem that can survive network partitioning.b)Data inconsistencies are highly undesirable, so the primary focus should be on ensuringthat all replicas are consistent.c)Distributed commit protocols can never work reliably, so data is bound to becomeinconsistent on some participants.d)Data might be in an inconsistent state during the execution of transactions but will bemade consistent when they commit.10.In Bigtable, each server is responsible for serving tablets. A tablet is:a)A subset of rows and column families.b)A subset of rows but stores all column family data for those rows.c)A set of one or more column families but it stores all row data for those column families.d)Exactly one row and one column family.11.Differing from a distributed hash table, Bigtable:a) Can support replication for fault tolerance.b) Supports more than one primary key for looking up data.c) Can associate large amounts of data with a key.d) Sorts its data by the key and allows iteration over rows of sorted data.12.Which of these operations is most efficiently implemented on a large-scale GFS (Google FileSystem) system?a) Read one 1 TB file. b) Read 1 million 1 MB files.c) Write one 1 TB file. d) Write 1 million 1 MB files.13.The partitioning function in MapReducea) Determines which shard will be assigned to a specific map worker.b) Filters out unnecessary input data prior to being processed by the map worker.c) Determines the division of available servers into map workers and reduce workers.d) Determines which reduce worker will process data associated with a particular key.14.Amazon Dynamo allows an administrator to add a greater load to a bigger server in the groupbya) Configuring the client library to issue a higher percentage of its requests to that server.b) Configuring other servers to forward some percentage of their requests to the biggerserver.c) Using consistent hashing and giving a larger consecutive range of the hash space to theserver.d) Assigning more virtual nodes to that server.15.Which of the following is NOT a responsibility of a map worker in the MapReduceframework:a) Generate (key, value) pairs.b) Target (key, value) data for one of Rreduce workers.c) Partition original data into shards. d) Discard data of no interest.16. A key design principle of the Google cluster architecture isa) Merging is fast; break up databases into lots of pieces and use lots of processes, eachworking on a piece of the data.b) Minimize the number of phases in a task; create many replicas of a database and alloweach system full access to it without the need for sharing or locking.c) Minimize context switch overhead; machines are cheap and it's more efficient to devote anode to one task exclusively.d) Machines and software fail; run the same task redundantly in parallel to ensure successfulexecution.二、简答题:1.考虑用二元联系(图1)对三元联系(图2)的表示:图1图21)分别给出图1中E,A,B,C,R A,R B和R C的一个实例,这些实例不对应图2中A,B,C和R的任何实例;2)更改图1中的ER图,引入适当的约束以确保满足约束的E,A,B,C,R A,R B和RC的任何实例都对应于A,B,C和R的一个实例;3)更改以上的转化以表示在三元联系上的全参与约束;2. Suppose that we are using extendable hashing on a file that containsrecords with the following search-key values:2, 3, 5, 7, 11, 17, 19, 23, 29, 31,35,271) Show the extendable hash structure for this file if the hash function ish(x) = x mod 11 and buckets can hold three records.2) Show how the extendable hash structure of part 1) changes as theresult of each of the following steps:a. Delete 11.b. Insert 15.c. Delete 31.d. Insert 25.3. The key-value store uses quorums for consistency. The total number ofreplicas, N, for a key, is fixed – however, N may be different for different keys. Each read has to access at least r replicas (and returns if all of them agree), while each write has to write to at least w replicas.For each of the following design choices, say whether it (by itself) does or does not guarantee strong consistency, i.e., one copy serializability?a. w=3, r=1b. w = 2N/3c. r+w = Nd. w = Ne. r + w > N/2f. r + w > 3N/2g. r + w > 3N/2, w > 2N/34. The following scenario is a distributed file system which spans multipledatacenters. There are several choices for how to handle network partitions that occur in between datacenters (given below). For each of these choices, tell me: if it violates consistency?a. Allow all partitions to process both reads and writes.b. Allow all partitions to process reads, but only one special partition(prechosen)to process writes.c. Allow only the partition which has at least a quorum number of servers(measured across all datacenters) to execute writes.d. Until partitions are repaired, allow only reads but no writes.e. Allow only partitions with a quorum of servers (measured across alldata centers) to execute writes and reads.5. Lamport’s Logical Clocks, amon g other things, help make inferences aboutconsistency of replicated data items operated upon concurrently. The following figure shows the time-line diagrams of three processes P, Q and R.a. Fill in the logical times for each event (a)–(o) in the three processesusing the rules of local ordering, send/receive ordering and transitiveclosure.b.Assuming you are given only the logical times for each event in a process,answer the following True, False or Unknown questionsi.Event b happened before event a.ii.Events a, h and m happened concurrently.iii.Event n happened before event c.iv.Events d, k and n occur at the same time instant.v.Event g did not happen before event l.vi.Event o happened after event l.6.设某WEB内容缓存系统采用一致性哈希算法进行内容分发管理。

相关文档
最新文档