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

Difference between View, Alias and Synonym


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vidhu_lovable

New User


Joined: 29 Nov 2004
Posts: 1

PostPosted: Sat Dec 04, 2004 3:27 pm
Reply with quote

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

Active User


Joined: 06 Dec 2004
Posts: 211
Location: Keane Inc., Minneapolis USA.

PostPosted: Thu Dec 09, 2004 1:56 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SET PATH in View DDL DB2 2
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts Issues with VIEW DATASET Command CLIST & REXX 2
No new posts Timestamp difference and its average ... DB2 11
Search our Forums:

Back to Top