Barclays Interview Question

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

Interview Answers

Anonymous

Apr 8, 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.

Anonymous

Dec 17, 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.