sql1-ch11 使用資料說明視觀表 (data dictionary) 管理物件. 題號 80 題: 6 、 64 ...

11
SQL1-ch11 使使使使使使使使使 (Data Dictionary) 使使使使

Upload: aron-griffith

Post on 17-Dec-2015

230 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

SQL1-ch11使用資料說明視觀表 (Data Dictionary)管理物件

Page 2: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

題號 80題: 6、 64 140題: 105

Page 3: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

視觀表命名規則

Page 4: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

Q6/80

Which two statements are true? (Choose two.)A. The USER_SYNONYMS view can provide

information about private synonyms.B. The user SYSTEM owns all the base tables and user-

accessible views of the data dictionary.C. All the dynamic performance views prefixed with V$

are accessible to all the database users.D. The USER_OBJECTS view can provide information

about the tables and views created by the user only.E. DICTIONARY is a view that contains the names of all

the data dictionary views that the user can access.

Page 5: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

user_objects視觀表

Page 6: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

user_tables視觀表

Page 7: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

user_constraints視觀表

Page 8: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

CONSTRAINT_TYPE 的值包括: C –check, P –primary key, U -unique R –reference

DELETE_RULE 的值包括: CASCADE:刪除父項記錄時,子項記錄一起刪除。 NO ACTION:只能刪除沒有子項記錄的父項記錄。

STATUS 的值包括: ENABLED:限制條件可使用。 DISABLED:限制條件不可使用。

Page 9: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

Q64/80

Evaluate the following SELECT statement and view the Exhibit to examine its output:

SELECT constraint_name, constraint_type, search_condition, r_constraint_name, delete_rule, status

FROM user_constraintsWHERE table_name = ORDERS;

Which two statements are true about the output? (Choose two.)

Page 10: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

A. In the second column, indicates a check constraint.B. The STATUS column indicates whether the table is

currently in use.C. The R_CONSTRAINT_NAME column gives the

alternative name for the constraint.D. The column DELETE_RULE decides the state of the

related rows in the child table when the corresponding row is deleted from the parent table.

Page 11: SQL1-ch11 使用資料說明視觀表 (Data Dictionary) 管理物件. 題號  80 題: 6 、 64  140 題: 105

Q105/140Which statements are true? (Choose all that apply.) A. The data dictionary is created and maintained by the database

administrator. B. The data dictionary views consist of joins of dictionary base

tables and user-defined tables. C. The usernames of all the users including the database

administrators are stored in the data dictionary. D. The USER_CONS_COLUMNS view should be queried to find the

names of the columns to which a constraint applies. E. Both USER_OBJECTS and CAT views provide the same information

about all the objects that are owned by the user. (P11-8)F. Views with the same name but different prefixes, such as DBA,

ALL and USER, use the same base tables from the data dictionary