9/23/2013

3 questions about transactions every Firebird developer should answer correctly

Hi All,

As you probably know, Firebird Project will have a seminar, devoted to transactions topic, in Siegburg (Germany), November 22, 2013. More details: http://firebirdsql.org/en/firebird-conference-tour-2013/
Many developers think that transactions are straightforward and easy thing to understand and use, so probably there is no reason to devote 1 day seminar to discover transactions mechanism in Firebird in great details. Is it so?
Here I offer 3 simple questions about transactions which every Firebird developer should answer. Please take a look and choose the correct answer:


1.       In some transaction there were 3 inserts made. The third INSERT raises exception. Is it possible to commit this transaction?              
                [ ] yes, [ ] no
2.       In some table there were 10 records. 3 simultaneous transactions were started and then in each transaction 1 record was inserted. In transaction 3 query SELECT COUNT(*) FROM Table was executed. The result will be:      

[ ] 10, [ ] 11, [ ] 12, [ ] 13

3.  Initially we have generator with name id, its value is 10. We have simultaneous transactions A and B. In A executed gen_id(id,1), in B gen_id(id,1). Then A was commited and B was rollbacked. What value is in id?      
                [ ] 10, [ ] 11, [ ]12


So, take your time and choose correct answers. Tomorrow we'll consider the questions and their answers.

No comments:

Post a Comment