MySQL数据字典理解试题及答案_第1页
MySQL数据字典理解试题及答案_第2页
MySQL数据字典理解试题及答案_第3页
MySQL数据字典理解试题及答案_第4页
MySQL数据字典理解试题及答案_第5页
已阅读5页,还剩7页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

MySQL数据字典理解试题及答案姓名:____________________

一、单项选择题(每题2分,共10题)

1.MySQL数据字典中,存储所有数据库对象信息的系统表是:

A.information_schema

B.mysql

C.performance_schema

D.sys

2.以下哪个命令可以查看当前数据库中所有表的创建语句?

A.DESCtable_name

B.SHOWCREATETABLEtable_name

C.SELECT*FROMinformation_schema.tables

D.SELECT*FROMmysql.tables

3.在MySQL中,以下哪个系统表包含了数据库中所有存储过程的信息?

A.information_cedures

B.information_schema.views

C.information_schema.tables

D.information_schema.columns

4.在MySQL中,以下哪个命令可以查看当前数据库中所有存储过程和函数的名称?

A.SELECTPROCEDURE_NAMEFROMinformation_cedures

B.SELECTFUNCTION_NAMEFROMinformation_cedures

C.SELECTPROCEDURE_NAME,FUNCTION_NAMEFROMinformation_cedures

D.SELECTPROCEDURE_NAME,FUNCTION_NAMEFROMinformation_schema.tables

5.MySQL数据字典中,以下哪个系统表包含了数据库中所有索引的信息?

A.information_schema.indexes

B.information_schema.tables

C.information_schema.columns

D.information_cedures

6.在MySQL中,以下哪个命令可以查看当前数据库中所有触发器的名称?

A.SELECTTRIGGER_NAMEFROMinformation_schema.triggers

B.SELECTEVENT_NAMEFROMinformation_schema.events

C.SELECTTRIGGER_NAME,EVENT_NAMEFROMinformation_schema.triggers

D.SELECTTRIGGER_NAME,EVENT_NAMEFROMinformation_schema.tables

7.MySQL数据字典中,以下哪个系统表包含了数据库中所有用户的信息?

A.information_schema.users

B.information_schema.tables

C.information_schema.columns

D.information_cedures

8.在MySQL中,以下哪个命令可以查看当前数据库中所有用户权限的信息?

A.SELECTuser,hostFROMinformation_schema.users

B.SELECTuser,host,dbFROMinformation_schema.db

C.SELECTuser,host,db,grantorFROMinformation_schema.db

D.SELECTuser,host,db,grantorFROMinformation_schema.tables

9.MySQL数据字典中,以下哪个系统表包含了数据库中所有事件的名称?

A.information_schema.events

B.information_schema.tables

C.information_schema.columns

D.information_cedures

10.在MySQL中,以下哪个命令可以查看当前数据库中所有事件的创建语句?

A.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_schema.events

B.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_schema.tables

C.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_schema.columns

D.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_cedures

二、多项选择题(每题3分,共10题)

1.MySQL数据字典中,以下哪些系统表包含了数据库中所有表的信息?

A.information_schema.tables

B.information_schema.columns

C.information_schema.indexes

D.information_schema.table_privileges

2.在MySQL中,以下哪些命令可以查看当前数据库中所有表的创建语句?

A.DESCtable_name

B.SHOWCREATETABLEtable_name

C.SELECT*FROMinformation_schema.tables

D.SELECT*FROMmysql.tables

3.以下哪些是MySQL数据字典中用于存储数据库对象权限的系统表?

A.information_schema.table_privileges

B.information_schema.column_privileges

C.information_cedure_privileges

D.information_schema.role_table_grants

4.在MySQL中,以下哪些系统表包含了数据库中所有存储过程和函数的信息?

A.information_cedures

B.information_schema.functions

C.information_schema.tables

D.information_schema.columns

5.以下哪些是MySQL数据字典中用于存储数据库用户信息的系统表?

A.information_schema.users

B.information_schema.db

C.information_schema.tables

D.information_schema.columns

6.在MySQL中,以下哪些命令可以查看当前数据库中所有用户的权限信息?

A.SELECTuser,hostFROMinformation_schema.users

B.SELECTuser,host,dbFROMinformation_schema.db

C.SELECTuser,host,db,grantorFROMinformation_schema.db

D.SELECTuser,host,db,grantorFROMinformation_schema.tables

7.MySQL数据字典中,以下哪些系统表包含了数据库中所有索引的信息?

A.information_schema.indexes

B.information_schema.tables

C.information_schema.columns

D.information_cedures

8.在MySQL中,以下哪些命令可以查看当前数据库中所有触发器的信息?

A.SELECTTRIGGER_NAMEFROMinformation_schema.triggers

B.SELECTEVENT_NAMEFROMinformation_schema.events

C.SELECTTRIGGER_NAME,EVENT_NAMEFROMinformation_schema.triggers

D.SELECTTRIGGER_NAME,EVENT_NAMEFROMinformation_schema.tables

9.以下哪些是MySQL数据字典中用于存储数据库事件信息的系统表?

A.information_schema.events

B.information_schema.tables

C.information_schema.columns

D.information_cedures

10.在MySQL中,以下哪些命令可以查看当前数据库中所有事件的名称和定义?

A.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_schema.events

B.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_schema.tables

C.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_schema.columns

D.SELECTEVENT_NAME,EVENT_DEFINITIONFROMinformation_cedures

三、判断题(每题2分,共10题)

1.MySQL数据字典中的信息是动态更新的,每当数据库中的对象被创建、修改或删除时,相应的系统表都会更新。()

2.information_schema数据库是一个特殊的数据库,它包含了MySQL中所有其他数据库的所有信息。()

3.在MySQL中,SHOWTABLES命令可以显示当前数据库中所有表的名称。()

4.information_schema.tables系统表中的table_schema字段表示表的所属数据库。()

5.information_schema.columns系统表中的is_nullable字段表示列是否可以为NULL值。()

6.在MySQL中,所有的存储过程和函数都存储在information_cedures系统中。()

7.MySQL数据字典中的信息是静态的,不会随着数据库操作而改变。()

8.information_schema.indexes系统表中的table_schema字段表示索引所属的数据库。()

9.在MySQL中,触发器是存储在information_schema.triggers系统表中的。()

10.information_schema.events系统表中的event_name字段表示事件的名称。()

四、简答题(每题5分,共6题)

1.简述MySQL数据字典的概念及其作用。

2.列举至少三个常用的MySQL数据字典系统表及其主要字段。

3.描述如何使用information_schema.tables系统表查询数据库中所有表的名称和类型。

4.说明如何通过information_schema.columns系统表获取某个表中所有列的详细信息。

5.解释information_schema.indexes系统表中的key_name和seq_in_index字段分别表示什么。

6.阐述如何在MySQL中使用information_cedures系统表查找数据库中所有存储过程和函数的信息。

试卷答案如下

一、单项选择题

1.A

解析思路:information_schema数据库包含了所有数据库对象的元数据,是MySQL的数据字典。

2.B

解析思路:SHOWCREATETABLE命令可以显示表的创建语句。

3.A

解析思路:information_cedures系统表存储了所有存储过程的信息。

4.A

解析思路:information_cedures系统表包含存储过程的名称。

5.A

解析思路:information_schema.indexes系统表存储了数据库中所有索引的信息。

6.A

解析思路:information_schema.triggers系统表存储了所有触发器的信息。

7.A

解析思路:information_schema.users系统表存储了数据库中所有用户的信息。

8.A

解析思路:information_schema.users系统表可以查看所有用户的权限信息。

9.A

解析思路:information_schema.events系统表存储了数据库中所有事件的名称。

10.A

解析思路:information_schema.events系统表可以查看事件的名称和定义。

二、多项选择题

1.ABCD

解析思路:这些系统表都包含了数据库中所有表的信息。

2.BC

解析思路:DESC和SHOWCREATETABLE可以查看表的创建语句,information_schema.tables也可以。

3.ABCD

解析思路:这些系统表都包含了数据库对象权限的信息。

4.AB

解析思路:information_cedures和information_schema.functions存储了存储过程和函数的信息。

5.AB

解析思路:information_schema.users和information_schema.db存储了数据库用户信息。

6.ABC

解析思路:SHOWGRANTS命令可以查看用户权限信息,information_schema.users和information_schema.db也可以。

7.ABC

解析思路:information_schema.indexes、information_schema.tables和information_schema.columns都包含索引信息。

8.AC

解析思路:information_schema.triggers和information_schema.events都包含触发器信息。

9.A

解析思路:information_schema.events系统表存储了数据库中所有事件的名称。

10.A

解析思路:information_schema.events系统表可以查看事件的名称和定义。

三、判断题

1.√

解析思路:数据字典的信息是动态更新的,以反映数据库的当前状态。

2.×

解析思路:information_schema是数据字典的一部分,但它不是数据库的一部分。

3.√

解析思路:SHOWTABLES命令用于显示当前数据库中所有表的名称。

4.√

解析思路:table_schema字段表示表的所属数据库。

5.√

解析思路:is_nullable字段表示列是否可以为NULL值。

6.×

解析思路:存储过程和函数存储在数据库中,而不是information_schema。

7.×

解析思路:数据字典的信息是动态更新的,会随着数据库操作而改变。

8.√

解析思路:table_schema字段表示索引所属的数据库。

9.×

解析思路:触发器存储在数据库中,而不是information_schema。

10.√

解析思路:event_name字段表示事件的名称。

四、简答题

1.MySQL数据字典是一个包含数据库所有对象元数据的集合,它帮助用户和管理员了解和管理数据库的结构和内容。

2.information_s

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论