Oracle client/server architecture's benefits (275)
Oracle client/server architecture in a distributed processing environment provides thefollowing benefits:■ Client applications are not responsible for performing any data processing. Rather,they request input from users, request data from the server, and then analyze andpresent this data using the display capabilities of the client workstation or theterminal (for example, using graphics or spreadsheets).■ Client applications are not dependent on the physical location of the data. Even ifthe da
client/server architecture : Distributed processing (274)
Distributed processing is the use of more than one processor, located in differentsystems, to perform the processing for an individual task. Examples of distributedprocessing in Oracle database systems appear in Figure10–1.■ In Part A of the figure, the client and server are located on different computers,and these computers are connected through a network. The server and clients ofan Oracle database system communicate through Oracle Net Services, Oracle’snetwork interface.■ In Part B of the
Introduction to Client/Server Architecture (273)
In the Oracle database system environment, the database application and the databaseare separated into two parts: a front-end or client portion, and a back-end or serverportion—hence the term client/server architecture. The client runs the databaseapplication that accesses database information and interacts with a user through thekeyboard, screen, and pointing device, such as a mouse. The server runs the Oraclesoftware and handles the functions required for concurrent, shared data access to anO
Database Object Metadata (272)
The DBMS_METADATA package provides interfaces for extracting complete definitionsof database objects. The definitions can be expressed either as XML or as SQL DDL.Two styles of interface are provided:■ A flexible, sophisticated interface for programmatic control■ A simplified interface for ad hoc querying数据库对象元数据DBMS_METADATA 包为用户提供了获取数据库对象完整定义的接口。此包可以通过 XML 或 SQL DDL的形式提供定义信息[@more@]
Hint : NO_EXPAND
The NO_EXPAND hint prevents the cost-based optimizer from considering OR-expansion forqueries having OR conditions or INLISTS in the WHERE clause. Normally, the optimizer wouldconsider using OR expansion and use this method if it decides the cost is lower than notusing it.SELECT /*+ NO_EXPAND */ name, salary FROM emp WHERE cost_center=9 OR cost_center=10;[@more@]
The DUAL Table (270)
The table named DUAL is a small table in the data dictionary that Oracle anduser-written programs can reference to guarantee a known result. This table has onecolumn called DUMMY and one row containing the value X.DUAL表1. Oracle 及用户程序可以使用此表来获得一个确定的值2. 此表只有一列名为 DUMMY;只有一行数据,值为 X[@more@]
Dynamic Performance Tables (271)
Throughout its operation, Oracle maintains a set of virtual tables that record currentdatabase activity. These tables are called dynamic performance tables.Dynamic performance tables are not true tables, and they should not be accessed bymost users. However, database administrators can query and create views on thetables and grant access to those views to other users. These views are sometimes calledfixed views because they cannot be altered or removed by the database administrator.SYS owns the
Views with the Prefix DBA (269)
Views with the prefix DBA show a global view of the entire database. Synonyms arenot created for these views, because DBA views should be queried only byadministrators. Therefore, to query the DBA views, administrators must prefix the viewname with its owner, SYS, as in the following:SELECT owner, object_name, object_type FROM SYS.DBA_OBJECTS;Oracle recommends that you implement data dictionary protection to prevent usershaving the ANY system privileges from using such privileges on the data dic
Views with the Prefix ALL (268)
Views with the prefix ALL refer to the user’s overall perspective of the database. Theseviews return information about schema objects to which the user has access throughpublic or explicit grants of privileges and roles, in addition to schema objects that theuser owns. For example, the following query returns information about all the objectsto which you have access:SELECT owner, object_name, object_type FROM ALL_OBJECTS;ALL前缀视图以 ALL为前缀的视图反映了某个用户所能看到的全部数据库内容。其中除
Views with the Prefix USER (267)
The views most likely to be of interest to typical database users are those with theprefix USER. These views:■ Refer to the user’s own private environment in the database, includinginformation about schema objects created by the user, grants made by the user,and so on■ Display only rows pertinent to the user■ Have columns identical to the other views, except that the column OWNER isimplied■ Return a subset of the information in the ALL views■ Can have abbreviated PUBLIC synonyms for conven
How to Use the Data Dictionary (266)
The views of the data dictionary serve as a reference for all database users. Access thedata dictionary views with SQL statements. Some views are accessible to all Oracleusers, and others are intended for database administrators only.The data dictionary is always available when the database is open. It resides in theSYSTEM tablespace, which is always online.The data dictionary consists of sets of views. In many cases, a set consists of threeviews containing similar information and distinguished
Other Programs and the Data Dictionary (265)
Other Oracle products can reference existing views and create additional datadictionary tables or views of their own. Application developers who write programsthat refer to the data dictionary should refer to the public synonyms rather than theunderlying tables: the synonyms are less likely to change between software releases.其他程序与数据字典[@more@]
Cache the Data Dictionary for Fast Access (264)
Much of the data dictionary information is kept in the SGA in the dictionary cache,because Oracle constantly accesses the data dictionary during database operation tovalidate user access and to verify the state of schema objects. All information is storedin memory using the least recently used (LRU) algorithm.Parsing information is typically kept in the caches. The COMMENTS columns describingthe tables and their columns are not cached unless they are accessed frequently.缓存数据字典1. 大多数的
Public Synonyms for Data Dictionary Views (263)
Oracle creates public synonyms for many data dictionary views so users can accessthem conveniently. The security administrator can also create additional publicsynonyms for schema objects that are used systemwide. Users should avoid namingtheir own schema objects with the same names as those used for public synonyms.数据字典视图的公共同义词1. 用户通过公共同义词能方便的访问数据字典2. 用户应防止自身的方案对象名与公共同义词名重复[@more@]
How the Data Dictionary Is Used (261)
The data dictionary has three primary uses:■ Oracle accesses the data dictionary to find information about users, schemaobjects, and storage structures.■ Oracle modifies the data dictionary every time that a data definition language(DDL) statement is issued.■ Any Oracle user can use the data dictionary as a read-only reference forinformation about the database.数据字典如何使用数据字典有三个主要用途: * Oracle 利用数据字典来获取关于用户,方案对象,及存储结构的信息。 * 每当数据库中执行了
How Oracle Uses the Data Dictionary (262)
Data in the base tables of the data dictionary is necessary for Oracle to function.Therefore, only Oracle should write or change data dictionary information. Oracleprovides scripts to modify the data dictionary tables when a database is upgraded ordowngraded.During database operation, Oracle reads the data dictionary to ascertain that schemaobjects exist and that users have proper access to them. Oracle also updates the datadictionary continuously to reflect changes in database structures, audit
SYS, Owner of the Data Dictionary (260)
The Oracle user SYS owns all base tables and user-accessible views of the datadictionary. No Oracle user should ever alter (UPDATE, DELETE, or INSERT) any rowsor schema objects contained in the SYS schema, because such activity can compromisedata integrity. The security administrator must keep strict control of this centralaccount.SYS用户:数据字典的拥有者1. 没有Oracle用户能更改sys方案下的对象 ,这样的操作将危及数据完整性[@more@]
Structure of the Data Dictionary : User-Accessible Views (259)
The views that summarize and display the information stored in the base tables of thedata dictionary. These views decode the base table data into useful information, suchas user or table names, using joins and WHERE clauses to simplify the information.Most users are given access to the views rather than the base tables.数据字典结构之用户可访问视图1. 将基表的数据通过连接,where条件将基表中有用的信息转换展现给用户[@more@]
Structure of the Data Dictionary : Base Tables (258)
The underlying tables that store information about the associated database. OnlyOracle should write to and read these tables. Users rarely access them directly becausethey are normalized, and most of the data is stored in a cryptic format.数据字典结构之基表1. Oracle能读写这些数据字典的基本 , 基表大多数被加密[@more@]
Introduction to the Data Dictionary (257)
One of the most important parts of an Oracle database is its data dictionary, which is aread-only set of tables that provides information about the database. A data dictionarycontains:■ The definitions of all schema objects in the database (tables, views, indexes,clusters, synonyms, sequences, procedures, functions, packages, triggers, and soon)■ How much space has been allocated for, and is currently used by, theschema objects■ Default values for columns■ Integrity constraint information■