Database 4th Lab Notes
Database 4th Lab Notes
MetaBase : contains the description of all objects of the databases (index , views ,
tables , users ....) , maanged by the DBMS , itself is orgnised as a database , most
of the tablesin this dictionary cannot be modfied by the usrs (only the adminstrator)
but are authorized to be explored .
The tables of the dictionary are usually encrypted . however, their content is
accessible through views. There are mainly four types of views :
CONNECT system/password@your_database;
DESC DICT;
DESC ALL_TAB_COLUMNS;
USER_USERS: Information about the currently connected user.
```sql
DESC USER_USERS;
```
ALL_CONSTRAINTS: Metadata about constraints in tables.
DESC ALL_CONSTRAINTS;
---
```sql
SELECT USER FROM DUAL;
4. Compare ALL_TAB_COLUMNS and
USER_TAB_COLUMNS
View structure of both:
```sql
DESC ALL_TAB_COLUMNS;
DESC USER_TAB_COLUMNS;
```
5. Verify Tables Created During the Previous Lab
SELECT TABLE_NAME FROM ALL_TAB_COLUMNS WHERE OWNER='DBASCHOOL'; --
has to be in capital letters (outputs all table names owned by the
user DBASchool)
DBASchool's tables:
OUTPUT