Imp Que

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Materialized view

A materialized view 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 view and the Query rewrite feature is
added from ORACLE 8i.

Views
A view is like a window through which data on a table can be viewed or changed. It is a virtual table that is – it does not have
any data of its own but derives the data from the table it is associated with. It manipulates data in the underlying base table.
Advantages of Views
1. Views restrict access to the database. Selecting from a view can display a restricted portion of the data base
2. Views allows users to make simple queries to retrieve the results from complicated queries
3. As a view does not store any data, the redundancy problem does not arise
4. One view can be used to transparently retrieve data from several tables.
5. Views also allow the same data to be seen by different users in different ways
Simple View
When a view is created on a single table then it is called a simple view.
Composite View
A view created by retrieving data from 2 or more tables. A composite view cannot be updated, or we cannot apply any DML
operations except select statement. Because it contains different columns from different tables.

In general, a transformation is considered an "active" transformation if it changes the flow of data (not individual "fields" =
ports but the flow of records). This is the case if a transformation fulfils one or more of the following conditions:

1.It can change the number of records (e.g. a Filter or a Normalizer or an Aggregator, Rank ).
2.It can change the order of records (e.g. a Sorter).
3.It can change the Insert/Update/Delete status of records (e.g. the Update Strategy)
4.It can change the status of the current transaction (e.g. the Transaction Control)
5.It has more than one input group and/or more than one output group (e.g. Union or Router transformations).
CONSTRAINT-KEYS
----
NOT NULL - IT WILL NOT ACCEPT NULLS , BUT IT WILL ACCEPT DUPLICATES
UNIQUE -- IT WILL NOT ACCEPT DULICATES, BUT IT WILL ACCEPT NULLS
PRIMARY KEY - IT WILL NOT ACCEPTS NULLS AND IT WILL NOT ACCEPT DUPLICATES
FOREIGN KEY - WE CAN GIVE RELATIONSIP BETWEEN TWO TABLES BY USING FK
CHECK CONSTRAINT

TWO OR MORE COULMS AS PRIMARY KEY - CANDIDATE , NATURAL KEY , COMPOSIT KEY

You might also like