Pergunta de entrevista da empresa Barclays

Describe and tell the difference amongst table, view and materialized view.

Respostas da entrevista

Sigiloso

5 de fev. de 2012

Table is a basic unit of data storage in an oracle database. It holds all user accessible data. View is a virtual table - It can be created on a table or another view. - It is just like a window through which we can access or change base table data. - It does contain data of its own. It always takes data from its base table. - It is stored as a query in data dictionary.Whenever you query a view it gets data from its based table using this query. Materialized view (in Oracle) - Materialized views are disk based and update periodically based upon the query definition. - Views are virtual only and run the query definition each time they are accessed. Materialized views can be set to refresh manually, on a set schedule, or based on the database detecting a change in data from one of the underlying tables. Materialized views can be incrementally updated by combining them with materialized view logs, which act as change data capture sources on the underlying tables. Materialized views are most often used in data warehousing / business intelligence applications where querying large fact tables with thousands of millions of rows would result in query response times that resulted in an unusable application. Main advantage of using views - You can ristrict access to predetermined set of rows and columns of a table - You can hide complexity of query - You can hide complexity of calculation

Sigiloso

25 de jan. de 2011

Table holds physical data, we can alter them. View is kind of abstract table, can have data from many tables, we can't alter them. I didn't know what materialized view is.