SQL - View

Data System Architecture

About

A view is a stored query

A view is stored as an algebraic closure so it can be optimized when used with queries.

View are slow

That is just not true. A view is nothing more than a stored query. If the stored query text is slow, sure the view (or query against the view) will be slow. A view cannot be any slower than the query itself. When you use the specific query as defined by the view in straight SQL, you'll see the same performance.

Inconvenient / Advantage

Inconvenient

No referential integrity

If you get an employee table for instance in a view format, you cannot make a foreign key constraint because the view doesn't have any primary key.

No grain management

You cannot enforce an unique key and then you can get duplicate problem. If not now, in the future.

Advantage

Easy to implement

Management

List

See SQL - Schema (Metadata)





Discover More
Relational Data Model
(Relation|Table) - Tabular data

A Relation is a logical data structure composed of tuple (row) attribute (column, field) The following data structure are a relation: a table, a materialized view (query) (store data) a query,...
Data System Architecture
A [[https://combostrap.com/frontmatter|frontmatter]] title shown on the Search Engine Result Pages

A [[https://combostrap.com/frontmatter|frontmatter]] description shown on the Search Engine Result Pages
Bigqueyr First Table
BigQuery

is a scanning database, and you’re charged for the amount of data scanned. charges based on the amount of data scanned by your queries. With , you’re not constrained by the storage capacity or...
Card Puncher Data Processing
OWB - View

The inline operator properties in the 11gR2 version of a view enable you to create your own SQL. OWB 11gR2...
Card Puncher Data Processing
Oracle Database - View

View in Oracle. Which columns are updatable through a view The primary key index on the location_id column of the locations table is not unique in the locations_view view. Therefore, locations is...
Relational Algebra Between Sql And Query Plan
Relational Algebra - Expression and Operators

Relational algebra is based upon the fact that you can pass tabular data through a set of data operators (select, filter, join, sort, union, etc.) in a algebraic structure. It means that: the output...
Data System Architecture
Relational Data Modeling

This section is data Modeling applied to a relational structure (mostly table). Relational databases normalize data, removing as much duplication as possible. A relational database’s approach to...
Data System Architecture
SQL - Objects

SQL Objects are the objects that may created in a database via the CREATE statement Then most known objects are: See
Data System Architecture
SQL - Query (SELECT)

A query is a SQL statement that begins with the SELECT word. A stored query is called a view. The result of a query is stored in a result table, called the result-set. A query is itself a Relations...
Data System Architecture
SQL - Update

The update statement works on relation, therefore on table but also on view. with primary key or



Share this page:
Follow us:
Task Runner