Synonyms
Synonyms is nothing but another name for a table in the current database or in other database. Its easier
Per example If user DAVID created a table called ACT_MASTER. If user
JON wants to select the values from ACT_MASTER which was created by DAVID then
DAVID should grant the permissions to JON. Even after DAVID gives a SELECT
permission on the ACT_MASTER to JON, JON cal write the SELECT like
SELECT * FROM DAVID.ACT_MASTER
Imaging once this application is used by 500 users then DAVID cannot give all the permissions to each and every one so ORACLE has an object called Synonyms. The use of synonym being we can use just table name instead of username.tablename like DAVID.ACT_MASTER.
Syntax
CREATE synonym <name> FOR <dblink.user.tablename>
CREATE PUBLIC synonym <name> FOR <dblink.user.tablename>
Synonym Example
CREATE SYNONYM ACT_MASTER FOR DAVID.ACT_MASTER
GRANT SELECT ON ACT_MASTER TO JON
Public Synonym
CREATE PUBLIC SYNONYM ACT_MASTER FOR DAVID.ACT_MASTER
GRANT SELECT ON ACT_MASTER TO PUBLIC
Once you create a Public Synonym we use that in the application programs. In the Application its better to use the synonyms instead of user_name.table_name.