Hi, all.
I'm in the process of
unit testing my data access classes prior to moving on to networking and UI design. One thing I'm thinking hard about is which methods in the data access class require locking.
Obviously, update and delete require it. Create too, to prevent the possible double-use of a record ID. However, I'm not convinced that read and search require it, mainly since
a) these operations will be performed more frequently than the prior three and thus locking all pertinent records might have a debilitating effect on concurrent access to the system
b) read and find do not directly modify the data.
From my experience with 'real' db servers (and I may be horribly wrong here) select does not wait while background updates and inserts occur; if it did the database would be functionally unusable.
Does anyone disagree with this?
Thanks for taking the time to read.
Jeremy