I am looking for a clear explanation on where to use RDB methods instead of Obj methods. I have already considered the following points.
To access tables outside pega database. However, we can use external class to map to outside db table and use Obj methods. One point to note here, Pega recommends to use Obj methods for external tables in rare occasions and use of Rdb methods are preferred. Not sure why. Would be great if anybody can explain this as well.
Complex query. However, we can use Report definition etc. which can achieve similar output
rdb methods does instant commit while you can have deferred commit in obj methods. However obj methods also have Write Now option which will commit instantly.
Given the above points please let me know if there are any particular reasons / situations where I should use RDB methods over Obj.
Generally all queries should be through the use of Obj methods. If you use RDB methods, you will not be able to access BLOBs. However, RDB methods are necessary if you want to execute stored procedures.
As you highlighted, it's in rare occasions. I won't sweat it and stick with Obj methods even with external tables, unless the Obj method is unable to perform what is required, then I'll go with a RDB method as it permits more complex statements to be performed.