Click here to Skip to main content
16,004,974 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is difference between virtual table and view?
Posted

A virtual table is "an interface to an external storage or computation engine that appears to be a table but does not actually store information in the database file."

A view is a virtual table that is reconstructed each time the view is requested: http://www.w3schools.com/sql/sql_view.asp[^]
 
Share this answer
 
View is a virtual table
- It can be created on a table or another view.
- It is just like a window through which we can access or change base table data.
- It does contain data of its own. It always takes data from its base table.
- It is stored as a query in data dictionary.Whenever you query a view it gets data from its based table using this query.

View is a logical table that contains data collated from a database after you executes a query to retrieve data from the database.

The arrangement of a column in a view is different from arrangement of columns in database

A view contains rows and columns, just like a real table. The fields in a view are fields from one or more real tables in the database.

You can add SQL functions, WHERE, and JOIN statements to a view and present the data as if the data were coming from one single table.

Advantage of using views
- You can restrict access to predetermined set of rows and columns of a table
- You can hide complexity of query
- You can hide complexity of calculation
 
Share this answer
 
Comments
Prasad_Kulkarni 19-Jul-12 4:49am    
Good answer! +5
VIRTUAL is an important word to be used that matches for defining a VIEW.

View just holds a pre-compiled query which pulls records from a table or combination of joined tables.

A view can also be used to query which can then be used in a view.
So to define, A VIEW is a virtual representation of data from real tables/views which is pre-compiled and secured.

The retrieval of records would be quicker in a view than a table based query.

The main usage of view is to hide few columns from the table which you may not want to share with the users who wants only the required and relevant data.

TABLE is a normal real time table which really hold data in the database.

Functionality wise, we may not pass variables in a view and order by clause cannot be used in a view.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900