[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Views are currently being implemented, and will appear in the 5.0 or 5.1
version of MySQL Server.
Unnamed views (derived tables, a subquery in the FROM
clause of a SELECT
) are already implemented in version 4.1.
Historically, MySQL Server has been most used in applications and on web systems where the application writer has full control over database usage. Usage has shifted over time, and so we find that an increasing number of users now regard views as an important feature.
Views are useful for allowing users to access a set of relations (tables) as if it were a single table, and limiting their access to just that. Views can also be used to restrict access to rows (a subset of a particular table). One does not require views to restrict access to columns, as MySQL Server has a sophisticated privilege system. See section 5.4 The MySQL Access Privilege System.
Many DBMS don't allow updates to a view. Instead, you have to perform the updates on the individual tables. In designing an implementation of views, our goal, as much as is possible within the confines of SQL, is full compliance with "Codd's Rule #6" for relational database systems: All views that are theoretically updatable, should in practice also be updatable.