View | data | database
View technology is now supported by almost all relational databases and is widely used.
Advantages of using views
1, let the database structure to achieve the logical extensibility: when the physical information of the database system (mainly refers to the table structure, table data) has been completed, if due to new business requirements resulting in insufficient table data, then you can use the view technology to expand, through the view of the powerful SQL to complete the function.
2, software development and data query processing convenience: The view can simplify the internal structure of the database system and its diagram, because the physical table is often based on the database paradigm principle analysis, especially in the data redundancy processing and the actual business will have a big disagreement, using the view can be combined with multiple tables through SQL, Produces the data result which adapts with the actual business, this greatly facilitates the software development and the data query, uses the view the SQL to write is also relatively simple.
Classification and analysis of views by function
1. Business View
The business view is more in the database application, often the implementation returns a specific business result function, the complexity of which increases with the complexity of the business, this view is often used only in a fixed module in the software, so in the establishment of such a view should consider the resulting business data information is useful and complete, The unused data is not returned as much as possible, and data generated from other tables should be considered for production in the view, rather than being generated by a table link in SQL that implements software development.
2. Basic view
A basic view refers to a view that is commonly used by multiple modules in software development. This view is generally simpler, not more than four table links, processing the basic view should be done in detail analysis, so that its reusability to the maximum, can not because of the current SQL processing is free to build a basic view. Tables that have been applied to a basic view should not be repeated in the outside SQL, or they may cause Oracle to duplicate processing.
View Building notes:
If the union operation appears in the view, the data should be changed to union all to increase speed.
A view with roughly the same functionality should analyze whether it can be merged into a single view without affecting performance and data, which is helpful for software modularization development and debugging.
Non-software and infrequently used views should be used to save SQL files and then delete, so as not to affect other people.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service