1,025 pts.
 DB2/400
what is the difference between logical file and View in DB2/400

Software/Hardware used:
ASKED: September 4, 2008  8:03 AM
UPDATED: May 20, 2011  10:18 AM

Answer Wiki:
a Logical file can be updated, but a view once it is created can not be updated, unless you update the file that the view was created and then re-create the view. Hope this helps.
Last Wiki Answer Submitted:  September 4, 2008  2:35 pm  by  LDLDLD69   35 pts.
All Answer Wiki Contributors:  LDLDLD69   35 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Logical files with the default setting for MAINT(*IMMEDIATE) provide an up-to-date map of the data by updating the map with every add/delete or key change in the file(s).

Logical file with maint(*REBUILD) is very much like a view, it contains the rules and when used will build the required index on the fly. No overhead when it’s not in use, significant when it is. The logical file can be keyed which is useful in native languages, the view can be sorted.

An SQL Index resembles the logical file MAINT(*IMMEDIATE) in that it maintains a map of the data, however, an index does not provide alternate formats or joins.

I’m sure there is more.

Phil

 44,070 pts.

 

Just to add to the discussion.
Logical Files are just a set of indixes providing an ordered access as per the key(s) defined. The data still resides in the physical that the logical is built over.
Howerever, any updates/deletes done via the logical updates teh physical.
Logical files are very useful to reorder the data, but bead in mind the response implications when too many logicals are built ove the same physical. Any update to the physical will trigger updates to all the logicals (especially if *IMMED is specified) and can have an impact on response times.
Cheers!

 980 pts.