SQL - VIEWS & MATERIALIAZED VIEWS

VIEWS:

 

A View is a Virtual Table that uses a query to pull data from the underlying tables.

The following are the characteristics of VIEW:

  • A View is a virtual relation that acts as an actual relation.

  • View is a virtual table, created using Create View command. This virtual table contains the data retrieved from a query expression, in Create View command.

  • View can be created from one or more than one base tables or views.

  • View is never stored it is only displayed.

  • View is never stored it is only displayed.

  • View is updated each time the virtual table (View) is used.

  • View has slow processing.

  • View do not require memory space.

SYNTAX

MATERIALIZED VIEWS:​

When the results of a view expression are stored in a database system, they are defined as materialized views.

The following are the characteristics of Materialized Views:

  • Materialized View is the copy of the original base tables in the database.

  • The following are the characteristics of Materialized Views:

  • The Materialized View are stored on a disk like an object, and they do not get updated every time they are used.

  • The materialized view must be updated manually or with the help of triggers. The process of updating the Materialized View is called Materialized View Maintenance.

  • Materialized Views has fast processing.

  • Materialized View requires memory space.

SYNTAX

 

©2020 by Pavan Lalwani. 

  • Udemy
  • Facebook
  • Twitter
  • YouTube
  • Linkedin