+ 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?

12th Mar 2017, 4:32 PM
Mahendra Aanjna
Mahendra Aanjna - avatar
4 odpowiedzi
+ 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.
16th Mar 2017, 7:16 PM
Dzung Le
Dzung Le - avatar
+ 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
12th Mar 2017, 5:09 PM
Ihor
+ 1
does it last forever?
13th Mar 2017, 1:55 PM
Mahendra Aanjna
Mahendra Aanjna - avatar
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
19th Apr 2017, 11:50 AM
鐘翊修
鐘翊修 - avatar