数据库试题 英文卷
SQL_Server_2008数据库试题(C)

SQL Server 2008网络数据库试题C班级:学号:_________ 姓名:分数一.单项选择题(每小题2分,共50分)1. 在概念设计阶段可用E-R图,其中矩形表示实体,()表示实体联系A. 圆形框B. 椭圆形框C. 箭头 D .菱形框2. 通过使用文件组,可以()。
A. 提高存取数据的效率。
B.提高数据库备份与恢复的效率C. 简化数据库的维护D. ABC都可以。
3. 下列四项中不属于数据库特点的是()A. 数据共享B. 数据完整性C. 数据冗余高D. 数据独立性4. 不同实体间可以有()A. 只有一种联系B. 可以有多种联系 C .不能有联系 D.只有多对多联系5. 建立在计算机外部设备上的结构化的有联系的数据集合是()A. 数据库B. 数据库管理系统C. 数据结构 D .数据文件6. 实体间存在多种联系,下面那种数据模型可以描述实体间多对多的联系()A. 层次模型B. 网状模型C. 关系模型D. 对象模型7. ()是位于用户和操作系统之间的一层数据管理软件。
数据库在建立,使用和维护时由其统一管理,统一控制。
A.DBMS(数据库管理系统)B. DB(数据库)C. DBS(数据库系统) D .DBA(数据库管理员)8. SQL语言允许使用通配符进行字符串匹配的操作,其中‘%’可以表示()A .零个字符B .1个字符串C.多个字符串D. 以上都是9. 英文缩写DBA代表()A. 数据库管理系统B. 数据库管理员C. 数据定义语言D. 数据库操纵语言10 以下不是SQL数据定义语言的是()A. CREATE B .DROP C. SELECT D. ALTER11. 下面聚集函数中哪个只能用于计算数值类型的数据()A. COUNT( )B. MIN( ) C .MAX( ) D .SUM( )12. 以下哪个关键字用来定义记录在某属性上的约束条件()A. DEFAULTB. CONSTRAINTC. UNIQUED. CHECK13. 欲往表中增加一条记录,应该用哪一条SQL语句()A. ALTER TABLEB. INSERT INTO TABLEC. CREA TE TABLE D . DROP TABLE14. 以下哪一个不是逻辑运算符()A. NOT B .AND C. OR D. IS15. 在创建表的过程中,哪个关键字用来定义默认值()A. DISTINCT B .UNIQUE C. CHECK D. DEFAULT16. 以下哪些描述符合数据库阶段的特点()1) 文件的组织形式可以是顺序的,也可以是随机的2)数据结构化3)数据可以共享4)程序独立于数据5)统一的数据管理功能6)数据面向应用7)数据不保存A. 1) 2) 7)B. 2) 3) 4) 5)C.2) 4) 5) D .2) 3) 5) 6)17. 主键约束用来强制数据的()完整性。
数据库试题及答案

一、单项选择题(每题0.5分,共200题,合计100分)1. SQL Server 2008是一个( C)的数据库系统。
(A)网状型(B)层次型(C)关系型(D)以上都不是2.关于主键描述正确的是:( C )(A)包含一列(B)包含两列(C)包含一列或者多列(D)以上都不正确3. SQL Server 2008 采用的身份验证模式有(D )。
(A)仅Windows身份验证模式(B)仅SQL Server身份验证模式(C)仅混合模式(D)Windows身份验证模式和混合模式4. SQL 语言按照用途可以分为三类,下面选项中哪一种不是的:(C )(A)DML (B)DCL (C)DQL (D)DDL5. 在SELECT语句的WHERE子句的条件表达式中,可以匹配0个到多个字符的通配符是(B )(A) * (B)% (C)- (D)?6. SQL Server提供的单行注释语句是使用(B )开始的一行内容。
(A)“/*” (B)“--” (C)“{” (D)“/”7. 以下那种类型不能作为变量的数据类型(C )。
(A)text (B)ntext (C)table (D)image8. 下面不属于数据定义功能的SQL语句是:(C )A.CREATE TABLEB.CREATE CURSORC.UPDATED.ALTER TABLE9. 如果希望完全安装SQL Server,则应选择( A)。
A. 典型安装B. 最小安装C. 自定义安装D. 仅连接10. 在SQL SERVER中局部变量前面的字符为:(D )(A)* (B)# (C)@@ (D) @11. 假如有两个表的连接是这样的: table_1 INNER JOIN table_2 其中table_1和table_2是两个具有公共属性的表,这种连接会生成哪种结果集?(D )(A)包括table_1中的所有行,不包括table_2的不匹配行(B)包括table_2中的所有行,不包括table_1的不匹配行(C)包括和两个表的所有行(D)只包括table_1和table_2满足条件的行12. 对视图的描述错误的是:(D )(A)是一张虚拟的表(B)在存储视图时存储的是视图的定义(C)在存储视图时存储的是视图中的数据(D)可以像查询表一样来查询视图13. 在T-SQL语言中,若要修改某张表的结构,应该使用的修改关键字是(C )。
数据库原理-期末考试试题及答案

数据库原理-期末考试试题及答案(本大题共15小题,每小题2分,共30分)在每小题列出的四个备选项中只有一个是符合题目要求的,错选、多选或未选均无分。
1.要保证数据库的数据独立性,需要修改的是()A.三层模式之间的两种映射B.模式与模式C.模式与外模式D.三层模式2.下列四项中说法不正确的是()A.数据库减少了数据冗余B.数据库中的数据可以共享C.数据库避免了一切数据的重复D.数据库具有较高的数据独立性3.公司中有多个部门和多名职员,每个职员只能属于一个部门,一个部门可以有多名职员,从职员到部门的联系类型是()A.多对多B.一对一C.多对一D.一对多4.将E-R模型转换成关系模型,属于数据库的()A.需求分析B.概念设计C.逻辑设计D.物理设计5.五种基本关系代数运算是()A.∪,—,×,π和σB .∪,—,,π和σC.∪,∩,×,π和σD .∪,∩,,π和σ6.下列聚合函数中不忽略空值 (NULL) 的是()。
A.SUM (列名) B.MAX (列名)C.COUNT ( * ) D.AVG (列名)7. SQL中,下列涉及空值的操作,不正确的是()。
A. AGE IS NULLB.AGE IS NOT NULLC.AGE = NULLD.NOT (AGE IS NULL)8.已知成绩关系如表1所示。
执行SQL语句:SELECT COUNT(DISTINCT学号)FROM成绩WHERE分数>60查询结果中包含的元组数目是()表1 成绩关系A. 1B. 2C. 3D. 49.在视图上不能完成的操作是()A.更新视图B.查询C. 在视图上定义新的基本表D. 在视图上定义新视图10.关系数据模型的三个组成部分中,不包括()A.完整性约束B.数据结构C. 恢复D. 数据操作11.假定学生关系是S (S #,SNAME ,SEX ,AGE ),课程关系是C (C #,CNAME ,TEACHER ),学生选课关系是SC (S #,C #,GRADE )。
数据库模拟试题1

12、目前ORACLE数据库DBA中级认证是什么? (D)
A. OCM B. DBA C. RHCA D. OCP
A. RedHat Linux B. SUSE Linux C. 红旗 Linux D. Oracle enterprise Linux
15、下列哪一个产品不是来源于开源世界? (D)
25、信息传输的安全应保证信息在网络传输的过程中不被泄漏和不被攻击,下列哪些属于攻击方法 ( D )
1.复制信息 2.剪裁信息 3.窃听信息
A.1,2 B. 2,3 C. 1,3 D. 全部
26、计算机病毒是一种具有破坏性的程序,它是 ( C )
A. 数据的存储结构是数据间关系的抽象描述
B. 数据的存储结构是逻辑结构在计算机存储器中的实现
C. 数据的存储结构分为线性结构和非线性结构
D. 数据的存储结构对数据运算的具体实现没有影响
28、2009年ORACLE公司以74亿美金的价格收购了哪家公司? (D)
33、描述事物的符号记录称为________。 (B)
A、信息 B 、数据 C、 记录 D、记录集合
34、 _____是长期存储在计算机内的有组织,可共享的数据集合. (C)
A. 4 B. 8 C. 16 D. 20
8、目前ORACLE已发布的最新的ORACLE数据库版本是什么? 基于什么关系模型的? (C)
A. 层次型 B. 平面型 C. 关系型 D. 面向对象型
2、被称为关系数据库之父的是哪一位? (A)
A. 最初由系统自动生成的程序 B. 具有恶毒内容的文件
C. 具有自我再生能力的程序 D. 只通过网络传播的文件
数据库试题及答案

《数据库技术与应用》样题一、选择题( 共30 分,1--20 每小题1 分,21—25 每小题2 分。
下列各题A)、B)、C)、D)四个选项中,只有一个选项是正确的)1 在SQL Server 中,关于视图的正确叙述是A)视图与数据库表相同,用来存储数据B)视图不能同数据库表进行连接操作C)在视图上不能进行更新操作D)视图是从一个或多个数据库表导出的虚拟表2 SQL 是那几个英文单词的缩写A)Standard Query LanguageB)Structured Query LanguageC) Select Query LanguageD)以上都不是3 不属于SQL Server 系统全局变量的是()。
A、@@ErrorB、@@ConnectionC、@@Fetch_StatusD、@Records4 下面描述错误的是()A、每个数据文件中有且只有一个主数据文件B、日志文件可以存在于任意文件组中C、主数据文件默认为primary 文件组D、文件组是为了更好地实现数据库文件组织5 SQL Server 数据库文件有三类,其中主数据文件的后缀为()A、.mdfB、.ldfC、.ndfD、.idf6、下面标识符不合法的是()A、[my delete]B、_mybaseC、$moneyD、trigger17 下面字符串能与通配符表达式[ABC]%a 进行匹配的是()A、BCDEFB、A_BCDC、ABC_aD、A%8、下面对索引的相关描述正确的是()列值唯一的列适合间索引A、经常被查询的列不适合建索引B、列值惟一的列适合建索引C、有很多重复值的列适合建索引D、是外键或主键的列不适合建索引9、在“连接”组中有两种连接认证方式,其中在()方式下,需要客户端应用程序连接时提供登录时需要的用户标识和密码。
A、Windows 身份验证B、SQL Server 身份验证C、以超级用户身份登录时D、其他方式登录时10、索引是在基本表的列上建立的一种数据库对象,它同基本表分开存储,使用它能够加快数据的()速度。
数据库竞赛-试题

计算机程序设计竞赛第一部分理论知识一、单项选择题(共30题,每题1分,总计30分)1.删除表中数据的语句是()。
A. DROPB. ALTERC. UPDATED. DELETE2.限制输入到列的值的范围,应使用()约束。
A. CHECKB. PRIMARY KEYC. FOREIGN KEYD. UNIQUE3. 触发器可引用视图或临时表,并产生两个特殊的表是()。
A.Deleted、Inserted B. Delete、InsertC. View、TableD. View1、table14.关于视图下列哪一个说法是错误的()。
A. 视图是一种虚拟表B. 视图中也存有数据C. 视图也可由视图派生出来D. 视图是保存在数据库中的SELECT查询5.创建表的命令是()。
A. Create database 表名B. Create VIEW 表名C. Create TABLE 表名D. ALTER TABLE 表名6.用于模糊查询的匹配符是( )。
A. _B. []C. ^D. LIKE7. 在SQL SERVER中不是系统数据库的是( )。
A. masterB. modelC. tempdbD. pubs8.关于关系图下列哪一个是正确的()。
A. 关系图是在同一个表中不同字段之间建立关联B. 关系图是在不同表中的字段之间建立关联C. 关系图是表与表之间建立关联,与字段无关。
D. 关系图是在不同数据库之间建立关联9.触发器可以创建在( )中。
A. 表B. 过程C. 数据库D. 函数10.删除表的语句是( )。
A.DROPB.ALTERC.UPDATED.DELETE11. 以下触发器是当对[表1]进行( )操作时触发。
Create Trigger abc on 表1For insert , update , deleteAs ……A.只是修改B.只是插入C.只是删除D.修改、插入、删除12. 规则对象在使用上与( )约束类似。
计算机三级数据库技术题库文档

计算机三级数据库技术题库文档English Answer:1. What is a database?A database is a collection of organized data stored ina computer system. It is designed to provide efficient access to data for various applications and users.中文回答,数据库是一个计算机系统中存储和组织数据的集合。
它的目的在于为各种应用程序和用户提供对数据的有效访问。
2. What are the different types of databases?There are several types of databases, including:Relational databases: Store data in tables with rowsand columns.NoSQL databases: Store data in non-tabular formats forflexibility and scalability.Object-oriented databases: Store data as objects, allowing for complex data modeling.中文回答:数据库有不同的类型,包括:关系型数据库,以表格的形式存储数据,表格包含行和列。
非关系型数据库,以非表格格式存储数据,以提高灵活性和可扩展性。
面向对象数据库,以对象的形式存储数据,允许对复杂数据建模。
3. What is the structure of a database?A database is typically organized into three main components:Tables: Store data in a structured format.Fields: Represent individual pieces of data within a table.Records: Collections of related fields that form a complete row in a table.中文回答:数据库通常由三个主要组件组成:表格,以结构化的格式存储数据。
数据库技术(SQL Server)A

2010~2011学年第二学期哈尔滨华夏计算机职业技术学院期末考试数据库技术(SQL Server )试题(A 卷)答题说明:如有答题卡,请将所有答案做在答题卡上,在试卷上做答无效.一、 单项选择题(共20小题,每小题1分,共计20分)1. 下列不能表示精确数值的数据类型是( )。
A . intB . numericC . floatD . smallint 2. 在SQL 中,建立数据库用( )。
A . CREATE TRIGGER 命令B . CREATE TABLE 命令C . CREATE DATABASE 命令D . CREATE INDEX 命令3. 删除经销商1018的数据记录的代码为:( )_____ from distributors where distri_num=1018 A . drop columnB . drop tableC . delete *D . dele 4. 短整型数据类型用( )。
A . intB . numericC . floatD . smallint5. 在Transact-SQL 语法中,SELECT 语句的完整语法较复杂,但至少包括的部 分( )A. SELECT ,INTOB. SELECT ,FROMC. SELECT ,GROUPD. 仅SELECT6. 在SQL 中,建立索引用( )。
A . CREATE TRIGGER 命令B . CREATE TABLE 命令C . CREATE VIEW 命令D . CREATE INDEX 命令7.视图删除的语句是()。
A. SET VIEWB.UPDATE VIEWC.ALTER VIEWD.DROP VIEW8.防止数据库出现意外的有效方法是()。
A. 重建B. 追加C. 备份D. 删除9. SQL Server2005中的编程语言就是()。
A. T-SQLB. S-SQLC. Q-SQLD. R-SQL10. 创建用户自定义函数的命令是()。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
哈尔滨理工大学 2006-2007学年第一学期考试试题 A 卷 软件工程系 出题教师:崔香、刘欢 系主任:考试科目: 数据库系统 考试时间:120分钟 试卷总分100分I 、Choice Questions (choose ONE corresponding description from four choices for the following terms ) ( 2 marks × 10 = 20 marks ) 1. The relationship among Database(DB), Database System(DBS) and Database Management System(DBMS) is ___b____. A . DBMS includes DB and DBS B .DBS includes DB and DBMS C .DB includes DBS and DBMS D .DB is DBS, also as DBMS 2. In relation schemas, the relation ship among different normal forms is __c_____.A. 1NF ⊂ 2NF ⊂ 3NFB. 3NF ⊂ 1NF ⊂ 2NFC. 3NF ⊂ 2NF ⊂ 1NFD. 2NF ⊂ 1NF ⊂ 3NF3. A collection of operations that performs a single logical function in a databaseapplication is called as _d______.A. Query languageB. Query ProgramC. FileD. Transaction4. In database fields, we refer SQL as b________.A. Standard Query LanguageB. Structured Query LanguageC. System Query LanguageD. Sequence Query Language5. Choose the only one incorrect description from the followings: ___d_____A. Neither tuples nor attributes have order.B. Attributes can appear in any order and the relation is still the same.C. Each value in the database must be a member of some domain.D. Duplicate tuples can exist in relation.6. Choose the only one correct expression from the followings: __c______.A. (≠ some) ≡ in B. (= all) ≡ not inC. exists r ⇔ r ≠ ØD. X – Y ≠ Ø ⇔ X ⊆ Y7. Database users are differentiated by the way they expect to interact with thesystem, ‘bank tellers’ belong to _d_______ from the following four kinds.A. application programmersB. sophisticated usersC. specialized usersD. naïve users8.The following figure shows ___d_____ parallel database architectures.A. ‘Shared memory’B. ‘Shared disk’C. ‘Shared nothing’D. ‘Hierarchical’9.Consider the following kinds of storage media :Tape storage, Flash memory, Optical storage, Magnetic-disk,choose the fastest one from the above four kinds of media: _b_______.A.Tape storageB. Flash memoryC. Optical storageD. Magnetic-disk10.Choose the proper choice to make the following query to realize:Find the names of all customers whose street includes the substring “Main”.select customer_namefrom customerwhere customer_street ___c__________A. like‘Main\%’B. like ‘_Main_’C. like ‘%Main%’D. like ‘\Main_’II、Blank-filling Questions.(2 marks ×9 = 18 marks)1.To design a trigger mechanism, we must:Specify the ①① condition(s) under which the trigger is to be executed;Specify the ② action(s)to be taken when the trigger executes.2.Given two original values A=200, B=100; compute the values of A and B afterthe transactions T1 and T2 with the next schedule.2007年01 月11 日哈尔滨理工大学2006-2007学年第一学期考试试题A卷A= 150; B= 120.3.In database systems there are three levels of abstraction. They are physicallevel, ①logical level and view level.Given 0.2ms as time to transfer one block and 0.1ms as time for one seek. If we ignore CPU costs, the cost is 4ms for 15 block transfers and 10 seeks for simplicity.4.The basic query process has been list in the following figure, please fill theTWO blanks.① optimizer ② evaluation engineIII、A nswer FOUR briefly from the next five questions. Please mark the question numbers clearly. ( 4marks × 4 = 16 marks)1.Explain the differences among the terms superkey, candidate key and primary 软件工程系出题教师:崔香、刘欢系主任:key?A superkey is a set of one or more attributes that, taken collectively, to identify uniquely an entity in the entity set. Candidate keys are minimal superkeys which no proper subset is a superkey. Primary key is a candidate key that is chosen as the principal means of identifying entities within an entity set.2. List at least FOUR main functions of a DBA.● Schema definition● Storage structure and access method definition● Schema and physical organization modification● Granting user authority to access the database● Specifying integrity constraints● Acting as liaison with users● Monitoring performance and responding to changes in requirements3. Here is an authorization graph.a) List the users who still have authorization after only edge m is moved. b) List the users who still have authorization after only edge l is moved.a) U2, U3 and U5;b) U1, U3, U4 and U5.4. Let R be a relation scheme with a set F of functional dependencies:R = (A, B, C, D, E, H), F = {A → B, B → E , A → C, CD → E, CD →H }. Is AD a candidate key? Please compute the closure of AD under F , (AD)+ . result = ADresult = ABCD (A → C and A → B)result = ABCDE (CD → E and CD ⊆ ADBC)result = ABCDEH (CD → H and CD ⊆ ADBCE)Is AD a candidate key?U 1U 5 U 3 U 2DBA l mU 4哈尔滨理工大学2006-2007学年第一学期考试试题A卷1.Is AD a super key?1Does AD →R? == Is (AD)+ ⊇ R2.Is any subset of AD a superkey?1Does A→R? == Is (A)+ ⊇ R2Does D→R? == Is (D)+ ⊇ R5.Given the following relation SCT and two functional dependencies:Is the relation schema in BCNF? Why? If it isn’t, decompose it into BCNF. IV、Complete the following queries. (29marks)Consider the relational database of a banking enterprise with the following relation schemas, where the primary keys are underlined.branch (branch_name, branch_city, assets)customer (customer_name, customer_street, customer_city)loan (loan_number, branch_name, amount)borrower (customer_name, loan_number)account (account_number, branch_name, balance)depositor (customer_name, account_number)1.Give an expression in the relational algebra to express each of the followingqueries: (3 marks × 3=9 marks)a)Find the names of all customers who have a loan, an account, or both,from the banka) ∏customer_name (borrower) ⋃∏customer_name (depositor)b)Delete all account records in the Perryridge branch.b) account ←account –σbranch_name = “Perryridge” (account )c)Insert information in the database specifying that Smith has $1200 inaccount A-973 at the Perryridge branch.account ←account ⋃{(“Perryridge”, A-973, 1200)}depositor ←depositor ⋃{(“Smith”, A-973)}2.Define the relation ‘account’ in SQL. (4 marks)Tip: Describe primary keys, foreign keys and check constrains if necessary. create table account( account_number char(10),branch_name char(15),balance numeric(12,2),primary key (account_number),foreign key (branch_name) references branch,check (balance >=0))3.Give an expression in SQL for each of the following queries.(4 marks × 4=16 marks)a)To find all loan number for loans made at the Perryridge branch with loanamounts greater than $1200.b)Find all customers who have both a loan and an accountc)Find the names of all branches where the average account balance is morethan $1,200.d)Find all loan number which appear in the loan relation with null values foramounta) select loan_numberfrom loanwhere branch_name = ‘ Perryridge’ and amount > 1200b) (select customer_name from depositor)intersect(select customer_name from borrower)c) select branch_name, avg (balance)from accountgroup by branch_namehaving avg (balance) > 1200d) select loan_numberfrom loanwhere amount is nullV、Resolve the following questions of designing. (17marks)A university registrar’s office maintains data about the following entities:哈尔滨理工大学2006-2007学年第一学期考试试题A卷(a)students, including student-id, name, program;.(b)instructors, including id, name, department and title.(c)courses, including c-number, title, credits, syllabus and prerequisites;(d)course offerings, including course number, year, semester, section number,instructor(s), timings, and classroom;Further, the enrollment of students in courses and grades awarded to students in each course the are enrolled for must be appropriately modeled. A class meets only at one particular place and time.1.Construct an E-R diagram for the university registrar’s office. ( 10 marks)(This E-R diagram needn’t model a class meeting at different places atdifferent times; also needn’t guarantee that the database does not have twoclasses meeting at the same place and time.)2.Design a relational database corresponding to the preceding E-R diagramwith marked primary keys. ( 7 marks)The relational database corresponding to the preceding E-R diagram:student( sid, name, program)course_offering(courseno, secno, year, semester, time, room)Instructor(iid, name, department,title)courses(courseno, title, credits, syllabus)enrolls(sid, secno, grade)teaches( iid, secno)requires(couseno, prerequisite, maincourse)。