DBA > Job Interview Questions > DB2 INTERVIEW QUESTIONS

What is a synonym? How is it used?

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

What is a synonym? How is it used?

A synonym is used to reference a table or view by another name. The other name can then be written in the application code pointing to test tables in the development stage and to production entities when the code is migrated. The synonym is linked to the AUTHID that created it.
Also, a Synonym is specific to the DB2 subsystem. Synonym can only access the table or view in the subsystem in which it is defined. A synonym is dropped when the table is dropped.
An Alias is yet another name for a table or view. But it can refer to DB2 tables in other DB2 subsytems which are connected to each other.

(Continued on next question...)

Other Job Interview Questions