MySQL元數(shù)據(jù)管理的試題及答案探討_第1頁
MySQL元數(shù)據(jù)管理的試題及答案探討_第2頁
MySQL元數(shù)據(jù)管理的試題及答案探討_第3頁
MySQL元數(shù)據(jù)管理的試題及答案探討_第4頁
MySQL元數(shù)據(jù)管理的試題及答案探討_第5頁
已閱讀5頁,還剩10頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

MySQL元數(shù)據(jù)管理的試題及答案探討姓名:____________________

一、單項選擇題(每題2分,共10題)

1.MySQL中,用于存儲數(shù)據(jù)庫元數(shù)據(jù)的系統(tǒng)表是:

A.information_schema

B.mysql

C.performance_schema

D.sys

2.在MySQL中,以下哪個操作可以查看數(shù)據(jù)庫的元數(shù)據(jù)?

A.SELECT*FROMinformation_schema.tables;

B.SELECT*FROMmysql.tables;

C.SELECT*FROMperformance_schema.tables;

D.SELECT*FROMsys.tables;

3.以下哪個命令可以查詢當(dāng)前數(shù)據(jù)庫中所有的表?

A.SELECT*FROMinformation_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名';

B.SELECT*FROMmysql.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名';

C.SELECT*FROMperformance_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名';

D.SELECT*FROMsys.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名';

4.在MySQL中,以下哪個系統(tǒng)表可以查看數(shù)據(jù)庫中所有表的創(chuàng)建語句?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

5.以下哪個命令可以查詢當(dāng)前數(shù)據(jù)庫中某個表的索引信息?

A.SELECT*FROMinformation_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

B.SELECT*FROMmysql.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

C.SELECT*FROMperformance_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

D.SELECT*FROMsys.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

6.在MySQL中,以下哪個系統(tǒng)表可以查看數(shù)據(jù)庫中所有表的存儲引擎?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

7.以下哪個命令可以查詢當(dāng)前數(shù)據(jù)庫中某個表的存儲引擎?

A.SELECTengineFROMinformation_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

B.SELECTengineFROMmysql.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

C.SELECTengineFROMperformance_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

D.SELECTengineFROMsys.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

8.在MySQL中,以下哪個系統(tǒng)表可以查看數(shù)據(jù)庫中所有表的字符集和校對規(guī)則?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

9.以下哪個命令可以查詢當(dāng)前數(shù)據(jù)庫中某個表的字符集和校對規(guī)則?

A.SELECTcharacter_set_name,collation_nameFROMinformation_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

B.SELECTcharacter_set_name,collation_nameFROMmysql.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

C.SELECTcharacter_set_name,collation_nameFROMperformance_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

D.SELECTcharacter_set_name,collation_nameFROMsys.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

10.在MySQL中,以下哪個系統(tǒng)表可以查看數(shù)據(jù)庫中所有表的注釋信息?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

二、多項選擇題(每題2分,共5題)

1.MySQL元數(shù)據(jù)管理的系統(tǒng)表包括:

A.information_schema

B.mysql

C.performance_schema

D.sys

2.以下哪些命令可以查詢當(dāng)前數(shù)據(jù)庫中所有的表?

A.SELECT*FROMinformation_schema.tables;

B.SELECT*FROMmysql.tables;

C.SELECT*FROMperformance_schema.tables;

D.SELECT*FROMsys.tables;

3.在MySQL中,以下哪些系統(tǒng)表可以查看數(shù)據(jù)庫中所有表的索引信息?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

4.以下哪些命令可以查詢當(dāng)前數(shù)據(jù)庫中某個表的存儲引擎?

A.SELECTengineFROMinformation_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

B.SELECTengineFROMmysql.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

C.SELECTengineFROMperformance_schema.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

D.SELECTengineFROMsys.tablesWHEREtable_schema='當(dāng)前數(shù)據(jù)庫名'ANDtable_name='表名';

5.在MySQL中,以下哪些系統(tǒng)表可以查看數(shù)據(jù)庫中所有表的字符集和校對規(guī)則?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

三、簡答題(每題5分,共10分)

1.簡述MySQL元數(shù)據(jù)管理的概念。

2.簡述information_schema表的作用。

四、編程題(共10分)

1.編寫一個SQL語句,查詢當(dāng)前數(shù)據(jù)庫中所有表的名稱、存儲引擎、字符集和校對規(guī)則。

答案:

一、單項選擇題

1.A

2.A

3.A

4.A

5.A

6.A

7.A

8.A

9.A

10.A

二、多項選擇題

1.AB

2.ABD

3.ABCD

4.ABD

5.ABCD

三、簡答題

1.MySQL元數(shù)據(jù)管理是指對MySQL數(shù)據(jù)庫中各種元數(shù)據(jù)的查詢、統(tǒng)計和分析等操作。元數(shù)據(jù)是關(guān)于數(shù)據(jù)的描述性信息,包括數(shù)據(jù)庫結(jié)構(gòu)、表結(jié)構(gòu)、字段信息、索引信息等。

2.information_schema表是MySQL提供的一個虛擬表,用于存儲數(shù)據(jù)庫的元數(shù)據(jù)信息。通過查詢information_schema表,可以獲取數(shù)據(jù)庫、表、字段、索引等詳細(xì)信息。

四、編程題

SELECTtable_name,engine,character_set_name,collation_name

FROMinformation_schema.tables

WHEREtable_schema='當(dāng)前數(shù)據(jù)庫名';

二、多項選擇題(每題3分,共10題)

1.MySQL中,以下哪些是用于存儲元數(shù)據(jù)的系統(tǒng)數(shù)據(jù)庫?

A.information_schema

B.mysql

C.performance_schema

D.sys

2.以下哪些操作可以用來獲取數(shù)據(jù)庫的元數(shù)據(jù)?

A.SELECT*FROMinformation_schema.tables;

B.SELECT*FROMmysql.db;

C.SELECT*FROMperformance_schema.table_instances;

D.SELECT*FROMsys.tables;

3.在MySQL中,以下哪些系統(tǒng)表可以用來查詢數(shù)據(jù)庫中所有表的索引信息?

A.information_schema.statistics

B.information_schema.table_constraints

C.information_schema.key_column_usage

D.information_schema.columns

4.以下哪些系統(tǒng)表可以用來查詢數(shù)據(jù)庫中所有表的存儲引擎信息?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

5.以下哪些系統(tǒng)表可以用來查詢數(shù)據(jù)庫中所有表的字符集和校對規(guī)則信息?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

6.在MySQL中,以下哪些系統(tǒng)表可以用來查詢數(shù)據(jù)庫中所有表的注釋信息?

A.information_schema.tables

B.information_schema.columns

C.information_schema.table_constraints

D.information_schema.key_column_usage

7.以下哪些命令可以用來查詢當(dāng)前數(shù)據(jù)庫中所有表的創(chuàng)建語句?

A.SELECTCREATETABLEFROMinformation_schema.tables;

B.SELECTTABLE_DEFINITIONFROMinformation_schema.tables;

C.SELECTCREATETABLEFROMmysql.tables;

D.SELECTTABLE_DEFINITIONFROMmysql.tables;

8.在MySQL中,以下哪些系統(tǒng)表可以用來查詢數(shù)據(jù)庫中所有表的觸發(fā)器信息?

A.information_schema.triggers

B.information_schema.table_triggers

C.information_schema.columns

D.information_schema.key_column_usage

9.以下哪些系統(tǒng)表可以用來查詢數(shù)據(jù)庫中所有存儲過程和函數(shù)的信息?

A.information_cedures

B.information_schema.routines

C.information_schema.columns

D.information_schema.key_column_usage

10.在MySQL中,以下哪些系統(tǒng)表可以用來查詢數(shù)據(jù)庫中所有事件的詳細(xì)信息?

A.information_schema.events

B.information_schema.event_schedule

C.information_schema.columns

D.information_schema.key_column_usage

三、判斷題(每題2分,共10題)

1.MySQL的information_schema數(shù)據(jù)庫是一個真實的數(shù)據(jù)庫,其中包含了數(shù)據(jù)庫的元數(shù)據(jù)信息。()

2.在MySQL中,所有關(guān)于元數(shù)據(jù)的查詢都可以通過information_schema數(shù)據(jù)庫來實現(xiàn)。()

3.performance_schema數(shù)據(jù)庫中的表主要用于監(jiān)控MySQL的性能指標(biāo)。()

4.sys數(shù)據(jù)庫是MySQL5.7及以上版本引入的系統(tǒng)數(shù)據(jù)庫,用于存儲MySQL的元數(shù)據(jù)信息。()

5.在MySQL中,使用SHOWTABLES命令可以查看當(dāng)前數(shù)據(jù)庫中所有表的列表。()

6.information_schema.tables表中的engine字段表示表的存儲引擎。()

7.information_schema.columns表中的is_nullable字段表示字段是否可以為NULL。()

8.information_schema.table_constraints表中的constraint_type字段表示約束的類型,如PRIMARYKEY,FOREIGNKEY等。()

9.MySQL的元數(shù)據(jù)信息是靜態(tài)的,不會隨著數(shù)據(jù)庫的操作而改變。()

10.使用SELECT命令可以直接從information_schema數(shù)據(jù)庫中查詢到數(shù)據(jù)庫的元數(shù)據(jù)信息。()

四、簡答題(每題5分,共6題)

1.簡述MySQL中存儲過程和函數(shù)的區(qū)別。

2.解釋MySQL中觸發(fā)器的概念及其作用。

3.描述MySQL中事件調(diào)度器的基本功能。

4.說明如何在MySQL中創(chuàng)建一個臨時表,并簡要說明臨時表與普通表的區(qū)別。

5.列舉至少三種MySQL中用于性能分析的命令或工具。

6.解釋什么是MySQL的字符集和校對規(guī)則,以及它們對數(shù)據(jù)庫的影響。

試卷答案如下

一、單項選擇題

1.A

解析思路:information_schema數(shù)據(jù)庫是一個信息模式,它包含了MySQL數(shù)據(jù)庫的所有元數(shù)據(jù)信息。

2.A

解析思路:information_schema.tables是專門用來查詢數(shù)據(jù)庫中所有表的元數(shù)據(jù)信息的系統(tǒng)表。

3.A

解析思路:通過information_schema.tables可以查詢到數(shù)據(jù)庫中所有表的名稱、類型、引擎、字符集等元數(shù)據(jù)。

4.A

解析思路:information_schema.tables表包含了所有表的創(chuàng)建語句信息。

5.A

解析思路:通過information_schema.tables可以查詢到數(shù)據(jù)庫中所有表的索引信息。

6.A

解析思路:information_schema.tables表包含了所有表的存儲引擎信息。

7.A

解析思路:通過information_schema.tables可以查詢到數(shù)據(jù)庫中所有表的字符集和校對規(guī)則信息。

8.A

解析思路:information_schema.tables表包含了所有表的注釋信息。

9.A

解析思路:information_schema.tables表包含了所有表的創(chuàng)建語句信息。

10.A

解析思路:information_schema.tables表包含了所有表的觸發(fā)器信息。

二、多項選擇題

1.AB

解析思路:information_schema和mysql數(shù)據(jù)庫都包含元數(shù)據(jù)信息,而performance_schema和sys數(shù)據(jù)庫則是用于性能監(jiān)控和系統(tǒng)信息。

2.ABCD

解析思路:以上所有命令都可以用來查詢數(shù)據(jù)庫的元數(shù)據(jù)。

3.ABCD

解析思路:這些系統(tǒng)表都包含了索引相關(guān)的信息。

4.AB

解析思路:information_schema.tables和information_schema.columns都包含了存儲引擎信息。

5.AB

解析思路:information_schema.tables和information_schema.columns都包含了字符集和校對規(guī)則信息。

6.AB

解析思路:information_schema.tables和information_schema.columns都包含了注釋信息。

7.AB

解析思路:以上命令都可以查詢到當(dāng)前數(shù)據(jù)庫中所有表的創(chuàng)建語句。

8.AB

解析思路:information_schema.triggers和information_schema.table_triggers都包含了觸發(fā)器信息。

9.AB

解析思路:information_cedures和information_schema.routines都包含了存儲過程和函數(shù)的信息。

10.AB

解析思路:information_schema.events和information_schema.event_schedule都包含了事件調(diào)度的詳細(xì)信息。

三、判斷題

1.×

解析思路:information_schema是一個信息模式,不是一個真實的數(shù)據(jù)

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論