A method is provided for consistent reading of a number of objects (1O, 2O, 3O) within a
database. The method is adapted for use with a
database in which transactions are managed by two-
phase locking. A first phase (A) includes a request for access to objects (1O, 2O, 3O) affected by the transaction and locking of these objects as soon as access thereto has been granted. A second phase (B) includes committing the transaction and releasing all locks that were set in the first phase. The actual work performed in a transaction may be summarized as object changing actions and / or object non-changing actions. A change, or an update, of the content of an object is performed by writing the new content into a new version of the object, where the current version of the object prior to the transaction is retained until no further transactions make use of this version. The transaction performs all changing actions within the first phase (A). The transaction is adapted to retain access to the objects (1O, 2O, 3O) after the second phase (B). The transaction is also adapted to perform the largest possible number of non-changing actions in a
third phase (C), after the second phase (B), whereafter the transaction closes access to the objects. Thus, the transaction is provided with a consistent snapshot of effected objects (1O, 2O, 3O) in the
database after the locks have been released, with regard to non-changing actions.