1th:
using views, you can customize user data to focus on specific data.
Explanation:
in the actual process, the company has a different role of staff, we take the sales company, for example,
The purchaser may need some data related to him , and the data unrelated to him is not
have any meaning, we can, based on this fact, specifically create a view for the purchaser
figure, when he is querying the data, just select * from View_caigou is OK.
2nd: Using views, you can simplify data manipulation.
Explanation: When we use queries, we often use aggregate functions and
displays information for other fields and may also need to be associated with other tables, where the written statement may
will be very long, if this action happens frequently, we can create the view, and after that, I
We just need select * from View1 can ~, is not very convenient AH ~
3rd: Using views, the data in the base table has a certain degree of security
because the view is virtual and physically nonexistent, just a collection of data is stored and we can
The base table will have important field information that can not be passed to the user by view, the view is a set of dynamic Data
data is updated as the base table is updated. At the same time, the user view, can not be arbitrarily changed
and delete, can guarantee the security of the data.
4th: You can merge detached data to create a partitioned view
with the development of the society, the company's business volume continues to expand, a large company, subordinates have a very
many branches, in order to manage the convenience, we need a unified table structure, regular view of the company's business
situation, and it is inconvenient to look at the data of each company separately, and there is no good comparability if these
data Merge into a table, it's much easier, then we can use the Union keyword,
merge data from each branch into one view.
The above, is what I think of the role of views, in fact, many companies use views to query data.