IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Whats the difference between alias and synonyms


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jose.jeyan

New User


Joined: 28 Jul 2006
Posts: 60
Location: Mumbai

PostPosted: Wed Sep 06, 2006 5:11 pm
Reply with quote

wats the difference between alias and synonym

can anyone compare the functions pls

jose.jeyan
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Sep 06, 2006 5:30 pm
Reply with quote

They are same except that synonyms can only be used by creator
& stored in SYSIBM.SYSSYNONYMS. While alias is an alternate name that can be used by everyone to refer the table or view in the same or remote db2 subsystem
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Thu Sep 07, 2006 11:30 am
Reply with quote

Hi Ekta, can you please let me know what is the necessary of coding synonums and aliases when we have tables and views?

Thanks!
Rathna.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Thu Sep 07, 2006 2:59 pm
Reply with quote

Hi Rathna,


CREATE ALIAS WORKERS FOR EMPLOYEE

this will creates an alias WORKERS for the EMPLOYEE table:


CREATE SYNONYM WEMP
FOR DSN8810.EMPLOYEE;
This example does not work if the current SQL authorization ID is DSN8810.
this will creates an synonym WEMP for the EMPLOYEE table:
Back to top
View user's profile Send private message
crrindia

Active User


Joined: 02 Jul 2005
Posts: 124
Location: Gurgaon

PostPosted: Fri Sep 08, 2006 1:16 pm
Reply with quote

Hi Ekta, I got your point, my intention is though we are defining aliases and synonyms, finally these changes willreflect in the base tables only. In that case what is the necessary of declaring these two? B'cos I faced this question in several interviews. I have no exact answer for this. Even I have tried to find the documents on these two. But the thing is I am getting only how to create and use it. But I couldn't get What are all the necessary areas we MUST use only Synonym/Aliases.
If you have any doc link on this it would be very much helpful to me.

Thanks!
Rathna.
Back to top
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Fri Sep 08, 2006 6:40 pm
Reply with quote

Hi,

Alias and sysnoyms are not for the programer. It is for the end user,

Suppose, I am using table a which has very secured infomation then I need to disable the important information, So I need to provide the Synonym
Alias are for end user who doesnot know any complicated query
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts What is the difference between Taskty... Compuware & Other Tools 2
No new posts Difference between VALIDPROC and CHEC... DB2 3
Search our Forums:

Back to Top