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

View - what is the Advantage?


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

New User


Joined: 10 May 2005
Posts: 3

PostPosted: Tue May 10, 2005 1:18 pm
Reply with quote

What is the difference while u are Inserting in to a table as well as
inserting into view to update the table. Ie., thru this view to update the
same table.

Eg. Emp is a table with eno,ename,esal
VEmp is the View , having the same structure and size of the Emp.
Table.

Now I am inserting first rec. to Emp table. And the another record is inserting in to the view. Okay what is the advantage while u are inserting this second record thru view to Table.

Pls. give me the advantages of View.
Back to top
View user's profile Send private message
i413678
Currently Banned

Active User


Joined: 19 Feb 2005
Posts: 112
Location: chennai

PostPosted: Tue May 10, 2005 1:41 pm
Reply with quote

Hi

Advantages of Views are:

1. it provides the data security.
2. the same table can be appeared as different for different users.
3. provides DOMAIN INTEGRITY with WITH CHECK OPTION.
4. provides to derive new attributes by using aggregate functions.



Cheers.................

pavankumar
Back to top
View user's profile Send private message
hisabari

New User


Joined: 10 May 2005
Posts: 3

PostPosted: Tue May 10, 2005 7:41 pm
Reply with quote

Hi Pavan,

Thankx for ur nice Answer. But if u have a table with , u create a View with same column .(Ref the above Eg.) Now u are updating view. It will be updated in the Table also right??? then What is the Security. I am till confusion abt view in this case.

Can u explain me. And Pls Ans. my Above example also.

Cheers

sabari
Back to top
View user's profile Send private message
vasanthanc

New User


Joined: 01 Apr 2005
Posts: 58

PostPosted: Wed May 11, 2005 11:44 am
Reply with quote

Pavan has clearly explained the advantages of views. There is no need to create a view with all the fields and rows of a table and with no additional (for ex: aggrate function) columns. And in case, if you have such a view, then there is no difference, if you update a table directly or through the view
Back to top
View user's profile Send private message
hisabari

New User


Joined: 10 May 2005
Posts: 3

PostPosted: Wed May 11, 2005 6:48 pm
Reply with quote

Thanx vasanth and Pavan,

I got some better idea about view in this case.


Cheers
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 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 Difference when accessing dataset in ... JCL & VSAM 7
No new posts How to filter PDS member using LMINIT... CLIST & REXX 4
Search our Forums:

Back to Top