Overview of Synonyms (193)

tsinglee發表於2007-11-13

A synonym is an alias for any table, view, materialized view, sequence, procedure,
function, package, type, Java class schema object, user-defined object type, or another
synonym. Because a synonym is simply an alias, it requires no storage other than its
definition in the data dictionary.
Synonyms are often used for security and convenience. For example, they can do the
following:
■ Mask the name and owner of an object
■ Provide location transparency for remote objects of a distributed database
■ Simplify SQL statements for database users
■ Enable restricted access similar to specialized views when exercising fine-grained
access control

You can create both public and private synonyms. A public synonym is owned by the
special user group named PUBLIC and every user in a database can access it. A
private synonym is in the schema of a specific user who has control over its
availability to others.

Synonyms are very useful in both distributed and nondistributed database
environments because they hide the identity of the underlying object, including its
location in a distributed system. This is advantageous because if the underlying object
must be renamed or moved, then only the synonym needs to be redefined.

Applications based on the synonym continue to function without modification.
Synonyms can also simplify SQL statements for users in a distributed database system.
The following example shows how and why public synonyms are often created by a
database administrator to hide the identity of a base table and reduce the complexity
of SQL statements.

同義詞
1. 隱藏一個資料庫物件的名字和擁有者
2. 隱藏分散式環境中遠端物件的位置
3. 簡化資料庫使用者的 SQL 語句
4. 用於實現更精細的訪問控制

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-982103/,如需轉載,請註明出處,否則將追究法律責任。

相關文章