SóProvas


ID
5278
Banca
CESGRANRIO
Órgão
REFAP SA
Ano
2007
Provas
Disciplina
Banco de Dados
Assuntos

Considere os seguintes comportamentos em transações de banco de dados:

Dirty Read
Nonrepeatable Read
Phantom Read

O(s) comportamento(s) possível(eis) no nível de isolamento READ COMMITTED do padrão SQL-92 é(são):

Alternativas
Comentários
  • Para o conceito: acesse:http://www.linhadecodigo.com.br/Artigo.aspx?id=666, terá a descrição dos possíveis comportamentos READ COMMITTED.
  • Nível de isolamento Dirty Read Nonrepeatable Read Phantom Read
    Read uncommitted Possível Possível Possível
    Read committed Impossível Possível Possível
    Repeatable read Impossível Impossível Possível
    Serializable Impossível Impossível Impossível

    Fonte: http://pgdocptbr.sourceforge.net/pg80/transaction-iso.html
  • c-

    Dirty Reads A dirty read occurs when a transaction reads data that has not yet been committed. For example, suppose transaction 1 updates a row. Transaction 2 reads the updated row before transaction 1 commits the update. If transaction 1 rolls back the change, transaction 2 will have read data that is considered never to have existed.

    Nonrepeatable Reads A nonrepeatable read occurs when a transaction reads the same row twice but gets different data each time. For example, suppose transaction 1 reads a row. Transaction 2 updates or deletes that row and commits the update or delete. If transaction 1 rereads the row, it retrieves different row values or discovers that the row has been deleted.

    Phantoms A phantom is a row that matches the search criteria but is not initially seen. For example, suppose transaction 1 reads a set of rows that satisfy some search criteria. Transaction 2 generates a new row (through either an update or an insert) that matches the search criteria for transaction 1. If transaction 1 reexecutes the statement that reads the rows, it gets a different set of rows.

    https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/transaction-isolation-levels?view=sql-server-ver15