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
■ 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
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.
3. 简化数据库用户的 SQL 语句
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/10599713/viewspace-982103/，如需转载，请注明出处，否则将追究法律责任。