You are on page 1of 2

Define and discuss the advantages and disadvantages of materialized views in

databases.

 A materialized view is a database object that stores the results of a query or a snapshot of
the original database table. It can be created by the CREATE MATERIALIZED VIEW
statement and unlike ordinary views that are virtual, it is a physical table/replication of the
master data. It is used to save network traffic during transactions by replicating data to non-
master sites; cached Web pages are also forms of materialized views. Some of the
advantages of using materialized views are:

 Materialized views can greatly speed up cache-expensive (in terms of either time or
storage) queries such as aggregate queries (e.g. sum or average) that perform
calculations on large amounts of data. For example, when you frequently need the total
amount of loans at each department, you can greatly save time by creating a
materialized view that holds the total amount for each department.
 Unlike denormalized relations, materialized views do not require the programmer to
maintain the consistency of redundant data; it becomes the job of the database system.

However, it also has some advantages such as:

 A space overhead. Creating materialized views requires some extra storage for
storing them. 
 A time overhead for maintaining them. If a transaction updates the original data, the
materialized view must be updated, too, as part of that transaction immediately.
Therefore, the transaction may perform slower. In addition, it takes time for the system
administrator to manually select an appropriate set of materialized views to maintain by
examining the types of queries in the workload and finding out which queries or joins
are computed frequently and need to run faster than others.
 In the case of deferred view maintenance in which the materialized view is updated
later, it stays inconsistent with the master database relations until it is brought up-to-
date when a query uses the view or just periodically (Silberschatz, Korth & Sudarshan,
2001). 

Reference:
 Silberschatz, A., Korth, H.F., & Sudarshan, S. (2001). Database System
Concepts (4th ed.). New York, NY: McGraw-Hill. Retrieved from Database System
Concepts 4th Edition By Silberschatz-Korth-Sudarshan.pdf

You might also like