A Transaction is a collection of queries that are treated as one unit.
All queries in a transaction must succeed. If one query fails, all prior successful queries in the transaction should rollback. If the database went down prior to a commit of a transaction, all the successful queries in the transactions should rollback
Description: Transactions can read uncommitted changes (writes) made by other transactions. Implication: This can lead to dirty reads, where a transaction sees data that might later be rolled back.
Description: A transaction can only read data that has been committed by other transactions. Implication: This prevents dirty reads, but non-repeatable reads (where the same query returns different results within the same transaction) can still occur.
Description: Ensures that if a transaction reads a record, it will see the same value for that record throughout the transaction, even if other transactions modify it. This is typically achieved by placing a shared lock on the read data until the transaction completes. Implication: Prevents dirty reads and non-repeatable reads, but phantom reads (new rows being added by other transactions) can still occur.
foo
A heap is a table that does not have a clustered index. It can be slower for read operations because there is no inherent order to the data. However, it is beneficial for scenarios with high-volume insert operations due to its simple structure, which avoids the overhead of maintaining a clustered index.