Atitit Database view view using recommended specifications and best practices and methodologies
1. Advantages of the view:1
1.1. * * improve readability and customize user data to focus on specific data 1
1.2. Using views, you can simplify data manipulation. 1
1.3. * * increase The refactoring change of the underlying table of the extensibility shield, free from compilation free from deployment hot update 2
1.4. B. query Simplification. 2
1.5. C. logical data Independence. 2
1.6. Improve data security , You can not let users see a field in the table . 2
1.7. Merging detached data, creating partitioned views 2
1.8. analog Indexed columns 3
2. Disadvantage 3
2.1. in a small number of scenarios, complex views may have performance problems that can be resolved using an SP with parameters : 3
2.2. cannot pass parameters compared to SP , Some databases may be possible, this scenario uses sp stored procedure 3
2.3. Modify restrictions, complex views may not be modified, you need to modify them directly on the table 3
3. naming conventions for views 3
3.1. recommended usage data / module - Levi degree 3
4. Application Scenario 3
1.
Advantages of the view:1.1.
* * improve readability Customize user data to focus on specific data1.2. 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
1.3.
* * increase The refactoring change of the underlying table of the extensibility shield, free from compiling and deploying hot updates 1.4.
B. query Simplification.
To create a view of complex queries, users do not have to enter complex query statements, just make simple queries against this view. Those queries that are used frequently can be defined as views, so that users do not have to specify all the conditions for subsequent operations each time.
1.5.C. logical data Independence.
Views enable applications and database tables to be somewhat independent. If there is no view, the application must be built on the table. With a view, the program can be built on top of the view so that the program is separated from the database table by the view.
For views, for example, a query depends only on the definition of the view, and when the base table that makes up the view needs to be modified, only the subquery portion of the view definition needs to be modified, and the view-based query does not change.
1.6.
improves data security by not allowing users to see a field in a table .
For example , password, you only give them permission to perform the view, do not give the table permission, they can not view all the data.
There is also the ability to create a view that includes two tables, which is updated by specifying the ID only, regardless of which table it comes from, and the data in the corresponding table is updated automatically.
1.7. Merging detached data, creating partitioned views
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.
1.8.
simulating indexed columns2.
Disadvantages2.1.
In a small number of scenarios, complex views may have performance problems that can be resolved using an SP with parameters :
Pre-Exclude Junk data
2.2.
compared to SP, parameters cannot be passed, and some databases may be able to use sp stored procedures for this scenario2.3.
modify limits, complex views may not be modified, you need to modify them directly on the table3.
naming conventions for views3.1.
recommended usage data / module _ Levi degree
For example, the same consumer reconciliation view, which is Consumption Reconciliation _ Month _ consumption amount _ dot
then convenient groupby month, Dot for dimension, statistic consumption.
4.
Applicable Scenarios
Most scenarios take precedence over views, improve readability, develop efficiency, and security.
If you don't have a view, you don't have to deliberately add a view.
Typical use scenarios, in complex query and report statistics module, very practical ...
author :: Nickname: Old Wow's paw claw of Eagle idol iconoclast Image-smasher
Bird King "Bird Catcher Kok devout pious religious defender Defender of the Faith. Caracalla red cloak Caracalla red cloak king of beasts
abbreviation:: Emir Attilax Akbar Emile Atiraca
Full Name:: Emir Attilax Akbar bin Mahmud bin Attila bin Solomon bin Adam Al Rapanui
Emil Attilax Akbar ben Mahmud , Attila Solomon Ben Adam Arlapanui
Common name: Etila (Ayron), Email:[email protected]
author :: Nickname: Old Wow's paw claw of Eagle idol iconoclast Image-smasher
Bird King "Bird Catcher Kok devout pious religious defender Defender of the Faith. Caracalla red cloak Caracalla red cloak king of beasts
abbreviation:: Emir Attilax Akbar Emile Atiraca
Full Name:: Emir Attilax Akbar bin Mahmud bin Attila bin Solomon bin Adam Al Rapanui Emile Atilax Akbaben Maham Solomon Ben Adam Arrapanui
Common name: Etila (Ayron), Email:[email protected]
title:Head of Uke headquarters, founder of Global Grid project,
Uke Friendship Association president Uke Hunting Association president Emir Uke Tribe chief Grand Chief,
Uke, Minister of Religious and Cultural Integration Affairs, Vice-Chairman of the Uke Reformation Commission
Uke system and chairman of the major conference committee, Uke Security Department Chief Brigade, Uke System Inspection Committee vice President,
UKE Chief CTO Software Division Director of Technical department deputy Director of Research and Development department Director of Product department deputy Manager Project department deputy Manager Uke Science and Technology research Institute Dean Uke Software Training Master
Uke Polynesia District chain Head of the area responsible for the Kingdom of Tonga Uke Kerr Glen, chain head, Line Is. district chain head, Uke Bouvet and South Georgia and South Sandwich Is. region chain Head
Uke, chairman of the Association of Software Standardization, vice president of Uke Database and storage Standardization Association
Uke, founder of Uke Hospital and Medical school, vice president of lifelong Education School
UEC, president of UECIP, director of UKE document Retrieval department, head of Department of image processing machine vision
Uke, chief Dean of the School of image processing and machine vision
Uke Outdoor Sports Association chairman of the resort chief Mayor Uke Press editor
reprint Please indicate source:Attilax's column? http://www.cnblogs.com/attilax/
--atiend V8
Atitit database view view using recommended specifications and best practices and methodologies