Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Difference between View, Alias and Synonym

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
Author Message
vidhu_lovable

New User


Joined: 29 Nov 2004
Posts: 1

PostPosted: Sat Dec 04, 2004 3:27 pm    Post subject: Difference between View, Alias and Synonym
Reply with quote

wat's the difference b/w view,alias and synonym?
Back to top
View user's profile Send private message
References
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 200
Location: Keane India Ltd., Hyderabad

PostPosted: Thu Dec 09, 2004 1:56 pm    Post subject: Here is the simple answer...
Reply with quote

Hi,

1.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.

CREATE [PUBLIC] SYNONYM tabspaces FOR sys.dba_tablespaces

2. Views are virtual tables ? that is, they are collections of columns from related tables that are defined in a way such that they make it easier for a user to access needed information from a database.

For example, a salesperson may be accustomed to viewing sales orders according to the traditional sales order form that the firm uses. In most firms, the sales order requires data from the CUSTOMERS, ORDERS, ORDERLINE, and PRODUCTS tables.

3. An alias is an alternative to a synonym, designed for a distributed environment to avoid having to use the location qualifier of a table or view. The alias is not dropped when the table is dropped.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1