Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Diff.. Btn Table and View

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
vamseepotti

New User


Joined: 21 Oct 2003
Posts: 45

PostPosted: Tue Feb 17, 2004 6:58 pm    Post subject: Diff.. Btn Table and View
Reply with quote

What is the exact difference between Table and View?
Back to top
View user's profile Send private message

mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1202
Location: India

PostPosted: Tue Feb 17, 2004 8:18 pm    Post subject: Re
Reply with quote

Table is a physical collection of your records.

View is just a select statement that uses the records in on or more physical table. It's an logical entity.

The main application of view is, it's exactly same as a table (with some restriction), but you can have records of more than one table in a single view.

The main usage of view is, you can hide some sensitive columns from your table to an end user, by allowing him to use only the view instead of your table.
Back to top
View user's profile Send private message
Johore

Specialist


Joined: 12 Sep 2003
Posts: 19

PostPosted: Wed Feb 18, 2004 9:06 am    Post subject: Tablevs View
Reply with quote

Table :

Is a physical entity containing data.It occupies a part of storage.

Views :

A virtual table consisting of an SQL select statement that accesses data
from one or more tables. A view never stores data. Its used when data
acceses needs to be restricted/regulated within groups. Also, a join
between different tables can be accessed using a view

Hth
johore icon_smile.gif
Back to top
View user's profile Send private message
anuradha

Active User


Joined: 06 Jan 2004
Posts: 247
Location: Hyderabad

PostPosted: Thu Mar 04, 2004 10:02 pm    Post subject: views
Reply with quote

hello vamsi,

just to add,here is some more info about views.This Article I read some time back.I thought it is useful.So I am posting it over here.

A view is a specific defined subset of the table in question.
we use a view for one of two reasons:

1) Ease of use. You can represent a complex statement in simpler
terms in case you want to make that information available in an
easier fashion. A good example is that a DBA can write a join of
the catalog tables as a view for the application programmers to
be able to provide their relevant information fast without much
knowledge of what the catalog tables are.

2) Selective security. You might want to limit full access to a
table, yet allow access to certain parts of it. A very good example
here is an employee table. The employee table would definitely not
be a good candidate for granting general access to update, or even
select because it would have confidential information that we would
not want just anyone to update or even see. But at the same time,
we would want to have the general public be able to see the relevant
parts of the employee table for things like employee listings and
office phone directories. Therefore, you would create a view
containing that relevant information the public should see and then
allow access to the view, while limiting access to the whole table.



THANKS AND REGARDS
ANU
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts REXX to view the PGM or PROC jackzhang75 CLIST & REXX 11 Tue Jun 20, 2017 1:20 am
No new posts How to see VIEW definition from BMC c... rohanthengal DB2 1 Thu May 04, 2017 1:50 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us