Possible Duplicate:
What are views good for?
hi,
i have a doubt what is a view. where should we use and what is the use of view.
is there any good reference for views. thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Please, have an eye out this View (database) Wikipedia article.
In short, a
Viewcan be used with more than SQL Server, it is a SQL Standard.A
VIEWis generally used:VIEW.Here’s an example when the database schema stores hierarchical data in multiple database tables.
This relational model is not very comprehensive by itself. We could have used one only table to insert them all with all of their specifications, and let NULL the fields with no data. However, because of some hierarchy reasons, we have created tables for specifications about different type of Vehicules. Thus, when you want to have the information about vehicule in particular, it is not very practical, as you have to join the tables every now and then you have to retrieve the information. Here, it could become practical to have a View like so:
Then, instead of having to write the select contained within each of both above-created views each time you need to access some information data about a given vehicule, you simply query against the appropriate view itself:
Or whatever information you need.
Disclaimer: This code has not been tested and was written directly for example purposes only. It might not work as-is.
I hope this helps you better understand views, somehow.