Content deleted Content added
m referenced same cite |
m added a reference for benefits of Views |
||
Line 4:
Views can provide advantages over tables:
* Views can represent a subset of the data contained in a table. Consequently, a view can limit the degree of exposure of the underlying tables to the outer world: a given user may have permission to query the view, while denied access to the rest of the base table.<ref name="SQL-reference-groff-weinberg">{{cite book
| last1 = Groff
* Views can [[Join (SQL)|join]] and simplify multiple tables into a single virtual table.▼
| first1 = James R.
| last2 = Weinberg | first2 = Paul N.
| date = 1999
| title = SQL: The Complete Reference
| url = http://englishonlineclub.com/pdf/SQL%20-%20The%20Complete%20Reference%20[EnglishOnlineClub.com].pdf
| ___location = <!-- not stated -->
| publisher = Osborne/McGraw-Hill
| pages = 291-292
| isbn = 0072118458
}}</ref>
▲* Views can [[Join (SQL)|join]] and simplify multiple tables into a single virtual table.<ref name="SQL-reference-groff-weinberg" />
* Views can act as aggregated tables, where the [[database engine]] aggregates data ([[summation|sum]], [[average]], etc.) and presents the calculated results as part of the data.
* Views can hide the complexity of data. For example, a view could appear as Sales2000 or Sales2001, transparently [[Partition (database)|partitioning]] the actual underlying table.
* Views take very little space to store; the database contains only the definition of a view, not a copy of all the data that it presents.
* Structures data in a way that classes of users find natural and intuitive.<ref name="SQL-reference-groff-weinberg"/>
Just as a [[function (computing)|function]] (in programming) can provide [[Abstraction (computer science)|abstraction]], so can a database view. In another parallel with functions, database users can manipulate nested views, thus one view can aggregate data from other views. Without the use of views, the [[Database normalization|normalization]] of databases above [[second normal form]] would become much more difficult. Views can make it easier to create lossless join decomposition.
|