[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ulysse::rdb_vms_competition

Title:DEC Rdb against the World
Moderator:HERON::GODFRIND
Created:Fri Jun 12 1987
Last Modified:Thu Feb 23 1995
Last Successful Update:Fri Jun 06 1997
Number of topics:1348
Total number of notes:5438

849.0. "Help against DB2" by ROM01::PASSAQUINDIC () Wed Jan 23 1991 10:42

A customer of ours states that DB2 offers the possibility of pointing exactly
to a row in a table to fetch the previous and next row in a easy way . They say
also that DB2 has a better locking mechanism than Rdb's  for it has the
possibility of switching from consistency level 2 to consistency level 3.
As far as I know consistency level 2 does not guarantee data consistency in
database . Am I right ?
And whath about the possibility of returning a unique row number ( not a
database key like DBkey ) with a DB2 query ?
Thank you in advance
Susanna

T.RTitleUserPersonal
Name
DateLines
849.1AnswersBROKE::THOMASWed Jan 23 1991 22:4125
    Two items here:
    
    1)  Fetching next/prior and unique row numbers:
    
       --- WARNING!  WARNING!  VERY NON-ANSI STANDARD ACTIVITY! ---
    
    DB2 does not provide a FETCH PRIOR capability, but they can 
    simulate it with temporary tables.  If your application would 
    like to be able to browse through a set of rows, IBM recommends
    that you select the set of rows and put them in a temporary table.
    Rows within a temporary table are assigned a unique row number, so
    therefore you can easily browse through the set.
    
    2)  Locking granularity
    
    DB2 does offer higher levels of granularity for locking.  They support 
    consistency level 2 or "cursor stability" concurrency transactions, or
    consistency level 3 or "repeatable read" consistency transactions.
    Consistency level 2 (also known as "dirty reads") does not guarantee
    that the record you are looking at will be the same the next time you 
    fetch it.  Some applications (such as telephone directory assistance)
    can manage using level 2.  Other applications (such as order-entry or
    inventory control) require level 3.  A single transaction must operate
    at the same consistency level for the duration of the transaction.