DATABASE VIEW

          What is database view?

Ø  View is the logical table  will be creating on the top of the  base table.

Ø  View is also know as stored select statement.

Ø  For limited access we will create view.

Ø  View will not hold the data of its own,when we call a view it actually calls a underline query & fetches the information from the base query.

Ø  The same data can be represented in a multiple ways. That’s y we are calling as a view.

Ø  View is just a data for a window table.

Ø  Views are just ametadata object (or you can say named Queries).

If we update any data will it be updated On tables

If we create EO in table it will not update,when we will commit it will update in table.

For the EO we have the cache,that will store in that cache what changes we have done in the EO

When we will commit the whole data will reflect .

Advantages :

1) view is that you can create any number of view because it will not consume any space

It will not store the data a searching the base table.

2)you can display the same data using multiple representation.

3)you can select what ever information you want to display & you can give grant to the other user.

4)you can hide the unwanted records from the other users.

Difference between Simple View & complex View?

Ø  simple view are based on single table.

The records are not grouped.no group functions allowed.

Simple view does not contain “DISTINCT” keywords OR EXPRESSSION based column

DMLs are allowed.

Ø  Complex views are can have any no.of tables joined.

Records can be grouped.Group functions like MAX,MIN,COUNT,SUM,AVG can be used.

Can contain “DISTINCT”and columns bases on expression.

No DMLs are allowed.

Ex:

We can create as many as views you can .one accept of view is that its just display the data in multiple ways.

As you can see the information is from Employees table ,its just a simple information of Emp.

We need to create a new View:



If we want particular fields we can write the statement for that .





In the application we have to give  EO,VO & from the View -EMP

 

 


 

 

 



Save & Run



 

                                                                                                                              ASIYA AFREEN

Comments

Popular posts from this blog

Programmatically invoke a Popup to create a new row.

POJO(Plain Old Java Object) - Editable Data - DataControl.dcx

Dynamic Tabs in ADF