No, it is NOT necessary to ALWAYS access your database in another thread. It depends on how long it takes. Usually reading / writing is fast, do not slow down the user interface and do not require another thread. However, when performing lengthy operations, such as cleaning, etc., Then yes, it is a good idea to do them in another thread.
source share