Sie sind auf Seite 1von 3

3 Oracle Data Dictionary

The Oracle data dictionary is one of the most important components of the Oracle DBMS. It contains all information about the structures and objects of the database such as tables, columns, users, data files etc. The data stored in the data dictionary are also often called metadata. Althou h it is usually the domain of database administrators !DBAs", the data dictionary is a #aluable source of information for end users and de#elopers. The data dictionary consists of t$o le#els% the internal le#el contains all base tables that are used by the #arious DBMS soft$are components and they are normally not accessible by end users. The e&ternal le#el pro#ides numerous #ie$s on these base tables to access information about objects and structures at different le#els of detail.

3.' Data Dictionary Tables

An installation of an Oracle database al$ays includes the creation of three standard Oracle users% ( S)S% This is the o$ner of all data dictionary tables and #ie$s. This user has the hi hest pri#ile es to mana e objects and structures of an Oracle database such as creatin ne$ users. ( S)ST*M% is the o$ner of tables used by different tools such S+,-.orms, S+,-/eports etc. This user has less pri#ile es than S)S. ( 01B,I2% This is a 3dummy4 user in an Oracle database. All pri#ile es assi ned to this user are automatically assi ned to all users 5no$n in the database. The tables and #ie$s pro#ided by the data dictionary contain information about ( users and their pri#ile es, ( tables, table columns and their data types, inte rity constraints, inde&es, ( statistics about tables and inde&es used by the optimi6er, ( pri#ile es ranted on database objects, ( stora e structures of the database. The S+, command select from DI2T7IO8A/)9: lists all tables and #ie$s of the data dictionary that are accessible to the user. The selected information includes the name and a short description of each table and #ie$. Before issuin this ;uery, chec5 the column definitions of DI2T7IO8A/)9 usin desc DI2T7IO8A/)9 and set

the appropriate #alues for column usin the format command. The ;uery select from TAB: retrie#es the names of all tables o$ned by the user $ho issues this command. The ;uery select from 2O,: <3 returns all information about the columns of one=s o$n tables. *ach S+, ;uery re;uires #arious internal accesses to the tables and #ie$s of the data dictionary. Since the data dictionary itself consists of tables, Oracle has to enerate numerous S+, statements to chec5 $hether the S+, command issued by a user is correct and can be e&ecuted. *&ample% The S+, ;uery select from *M0 $here SA, > <???: re;uires a #erification $hether !'" the table *M0 e&ists, !<" the user has the pri#ile e to access this table, !3" the column SA, is defined for this table etc.

3.< Data Dictionary @ie$s

The e&ternal le#el of the data dictionary pro#ides users a front end to access information rele#ant to the users. This le#el pro#ides numerous #ie$s !in OracleA appro&imately BC?" that represent !a portion of the" data from the base tables in a readable and understandable manner. These #ie$s can be used in S+, ;ueries just li5e normal tables. The #ie$s pro#ided by the data dictionary are di#ided into three roups% 1S*/, A,,, and DBA. The roup name builds the prefi& for each #ie$ name. .or some #ie$s, there are associated synonyms as i#en in brac5ets belo$. ( 1S*/ % Tuples in the 1S*/ #ie$s contain information about objects o$ned by the account performin the S+, ;uery !current user" 1S*/ TAB,*S all tables $ith their name, number of columns, stora e information, statistical information etc. !TABS" 1S*/ 2ATA,OD tables, #ie$s, and synonyms !2AT" 1S*/ 2O, 2OMM*8TS comments on columns 1S*/ 2O8ST/AI8TS constraint definitions for tables 1S*/ I8D*E*S all information about inde&es created for tables !I8D" 1S*/ OBF*2TS all database objects o$ned by the user !OBF" 1S*/ TAB 2O,1M8S columns of the tables and #ie$s o$ned by the user !2O,S" 1S*/ TAB 2OMM*8TS comments on tables and #ie$s 1S*/ T/IDD*/S tri ers defined by the user 1S*/ 1S*/S information about the current user 1S*/ @I*GS #ie$s defined by the user

( A,, % /o$s in the A,, #ie$s include ro$s of the 1S*/ #ie$s and all information about objects that are accessible to the current user. The structure of these #ie$s is analo ous to the structure of the 1S*/ #ie$s. <C A,, 2ATA,OD o$ner, name and type of all accessible tables, #ie$s, and synonyms A,, TAB,*S o$ner and name of all accessible tables A,, OBF*2TS o$ner, type, and name of accessible database objects A,, T/IDD*/S . . . A,, 1S*/S . . . A,, @I*GS . . . ( DBA % The DBA #ie$s encompass information about all database objects, re ardless of the o$ner. Only users $ith DBA pri#ile es can access these #ie$s. DBA TAB,*S tables of all users in the database DBA 2ATA,OD tables, #ie$s, and synonyms defined in the database DBA OBF*2TS object of all users DBA DATA .I,*S information about data files DBA 1S*/S information about all users 5no$n in the database <B

Das könnte Ihnen auch gefallen