I know that
A non-repeatable read occurs, when during the course of a transaction, a row is
retrieved twice and the values within the row differ between reads.
and
A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first.
and I guess that this happens because in both causes we are in transaction A and transaction B just commit some changes.
So my question is... Is there another use case from both or 1 that the cause could be another than transaction B just commit some changes while we are in transaction A ? So basically these are 2 different consequences of the same problem, right ?