|Oracle® Database 2 Day DBA
10g Release 2 (10.2)
Part Number B14196-02
|PDF · Mobi · ePub|
You can manage other schema objects with Enterprise Manager including the following:
A synonym is an alias for any schema object such as a table or view. Synonyms provide an easy way to hide the underlying database structure from an application or a user. For example, you can create a synonym named
personnel as an alias for the
employees table in the
hr schema. For example, assume that you create the following query:
SELECT employee_id, salary FROM hr.employees ORDER BY salary
With the synonym in place, you can rewrite the query more simply as:
SELECT employee_id, salary FROM personnel ORDER BY salary
An additional benefit of synonyms is that you can use the same synonym in a development database as in the production database, even if the schema names are different. This technique allows the application code to run unmodified in both environments. For example, the second version of the preceding query would work in a development database where the
employees table was in the
dev1 schema if the
personnel synonym were defined.
Because a synonym is simply an alias, it requires no storage other than its definition in the data dictionary.
A sequence is a database object from which multiple users can generate unique integers. Using a sequence generator to provide the value for a primary key in a table is an easy way to guarantee that the key value is unique.
A database link is a schema object that instructs Oracle to connect to a remote database to access an object there. Database links are used in distributed database environments, which are described in the Oracle Database Administrator's Guide.