Want To Search Something Else? Just Google It !

Sunday, October 2, 2011

Database View

Database view:-

A Database View is a subset of the database sorted and displayed in a particular way. For each view, you can control which columns are displayed, what order they are displayed in, how wide each column is, how the data is sorted, and what types of records to display.
Unlike base tables in a relational database, a view does not form part of the physical schema: it is a dynamic, virtual table computed or collated from data in the database. Changing the data in a table alters the data shown 

Views can provide advantages over tables:
1)Views can represent a subset of the data contained in a table.
2)Views can join and simplify multiple tables into a single virtual table.
3)Views can act as aggregated tables, where the database engine aggregates data (sum, average etc.) and presents the calculated results as part of the data.
4)Views can hide the complexity of data; for example a view could appear as Sales2000 or Sales2001, transparently partitioning the actual underlying table.
5)Views take very little space to store; the database contains only the definition of a view, not a copy of all the data it presents.
6)Depending on the SQL engine used, views can provide extra security.
7)Views can limit the degree of exposure of a table or tables to the outer world in subsequent invocations of the view.
  
Read-only vs. updatable views:-
View can be defined as read-only or updatable. If the database system can determine the reverse mapping from the view schema to the schema of the underlying base tables, then the view is updatable. INSERT, UPDATE, and DELETE operations can be performed on updatable views. Read-only views do not support such operations because the DBMS cannot map the changes to the underlying base tables. A view update is done by key preservation.

Materialized view :-
The Oracle database introduced the concept of materialized views: pre-executed, non-virtual views commonly used in data warehousing."It is a database object that contains the results of a query. They are local copies of data located remotely, or are used to create summary tables based on aggregations of a table's data." Materialized views, which store data based on remote tables, are also known as snapshots. A snapshot can be redefined as a materialized view.

3 comments:

  1. Wonderful & nice blog post about database trigar,helpful site- thanks. plz sir give answer on tutorialsolution dot com - thanks again sir

    ReplyDelete
  2. OlĂ ,

    Grazie! Grazie! Grazie! Your blog is indeed quite interesting around sql and pl/sql! I agree with you on lot of points!

    how to get the first non space character from a string in Oracle. Could you help me on this?
    Anyways great write up, your efforts are much appreciated.

    Many Thanks,

    ReplyDelete