+ 3
View vs simple select querry
how is a view different from a simple select querry. after all it's the same as the result produced by a select querry with/without a join. also I think that a view requires more lines of queries. now can we use the join anytime or does it last only for a session? I guess that's the only use of it to select a view again and again once created. what is the lifetime of a view?
4 Answers
+ 2
Using view to avoid rewriting complex join queries and views last forever, however, you may have to refresh and update your view when the structure of a table used in a view has changed. But if it's just a simple select or you don't have to use it again then you won't need to create a view.
+ 1
view will not disappearing.When you need join data from 10 tables and save the result for the next processing(maybe some report) it will be very powerful tool
my friend attached 65+ tables in view
+ 1
does it last forever?
0
In RDBMS, we have to normalize tables which makes the tables do not fully representing a real object. So we use joins to make a view that represents a real world object