Pergunta de entrevista da empresa Barclays

I was asked about how to avoid data corruption in relational databases. (very broadly, not specifics)

Respostas da entrevista

Sigiloso

17 de dez. de 2009

I basically described transaction management and redundancy. He had to give me a little hint about it. It was a bit difficult because I had not taken databases in a year.

Sigiloso

8 de abr. de 2010

First that comes to mind is data corruption can be greatly minimized if a relational database enforces Referential Integrity for primary/foreign key relationships. RI helps prevent duplicate records or orphaned records (relationship table contains keys for records that do not exist). Second, is transaction processing: set autoCommit to false, run DDL(s), and commit the changes, or rollback the transaction, if any error occurs.