13.3. SQL: Views

In addition to defining base tables, SQL also allows us to define views, or “virtual tables”, which are basically named, derived tables.Their definition is stored, but their contents are not. By means of the view definitions, queries and updates on views are automatically translated into equivalent queries/updates on base tables. Hence, unlike working tables that you might create to temporarily store results, views are always up to date.

Views have many uses. They may be used for security reasons by allowing a particular group of users access to views but not to their underlying base tables. They can also be used to hide unwanted details, simplify queries or updates, implement derivation rules, and allow base table reconstruction ...

Get Information Modeling and Relational Databases, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.