MAQ Interview Question
Applications DevelopersCountry: India
Interview Type: In-Person
i did talk about transactions commit and rollback and even about check points and those stuff but the lady was not convinced either she wanted me to talk about those log based methods or shadow copy and those stuff dont kno xactly
I don't know what to tell you. In situations like this, my advice would be to ask the interviewer what requirements they have that aren't being met by the current solution. What's the business problem, and in what way is it not being solved by the current solution?
She wanted to know about versioned writes, where each process makes its own copy of the shared data known as shadow copy, adds a version [timestamp etc] to it and makes changes to the copy only. In case of multiple process writes, it's not the database's / admin's responsibility to maintain consistency but the updating library's. Read Amazon's Dynamo File system. And this for basic concept : edndoc.esri.com/arcsde/9.1/general_topics/what_versioned_dbase.htm
I think the question is more in terms of how do you make your DB thread safe. There are various methods and their respective trade offs. For e.g. In mysql, MyISAM storage engine does a table level locking, advantage, fetching the lock information is very trivial but it comes at a very big performance penalty. Only one thread at a time can use the table.
Compared to that, InnoDB provides row level locking but if there are million rows in your table what do you do. Preallocate millions of locks? The advantage is improved performance.
In general this question will drift towards the readers writers problem.
In SQL Server,
- Anonymous August 29, 2012