Hour 21, Working with the System Catalog

Team-Fly    

 
Sams Teach Yourself SQL in 24 Hours, Third Edition
By Ronald R. Plew, Ryan K. Stephens
Table of Contents
Appendix C.  Answers to Quizzes and Exercises


Hour 21, "Working with the System Catalog"

Quiz Answers

1:

The system catalog is also known as what in some implementations ?

A1:

The system catalog is also known as the data dictionary .

2:

Can a regular user update the system catalog?

A2:

Not directly; however, when a user creates an object such as a table, the system catalog is automatically updated.

3:

What Sybase system table is used to retrieve information about views that exist in the database?

A3:

SYSVIEWS

4:

Who owns the system catalog?

A4:

The owner of the system catalog is often a privileged database user account called SYS or SYSTEM. The system catalog can also be owned by the owner of the database, but is not ordinarily owned by a particular schema in the database.

5:

What is the difference between the Oracle system objects ALL_TABLES and DBA_TABLES?

A5:

ALL_TABLES shows all tables that are accessible by a particular user, whereas DBA_TABLES shows all tables that exist in the database.

6:

Who makes modifications to the system tables?

A6:

The database server itself.

Exercise Answers

1:

In Hour 19, you looked at the MySQL system tables in the default mysql database. Review these tables.

A1:
 DESCRIBE COLUMNS_PRIV;  DESCRIBE DB; DESCRIBE FUNC; DESCRIBE HOST; DESCRIBE TABLES_PRIV; DESCRIBE USER; 
2:

At the mysql> prompt, type the following to show common commands:

  HELP;  
A2:
3:

Type the following command to see the current status of MySQL:

  STATUS;  

What is the current database?

A3:
 mysql 
4:

At the mysql> prompt, change your database from mysql to learnsql, and then check the status again.

A4:
 USE LEARNSQL;  STATUS; 

Team-Fly    
Top
 


Sams Teach Yourself SQL in 24 Hours
Sams Teach Yourself SQL in 24 Hours (5th Edition) (Sams Teach Yourself -- Hours)
ISBN: 0672335417
EAN: 2147483647
Year: 2002
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net