What is the difference between RDB-List and Obj-Browse method
Performance wise, it’s not recommended to use RDB method unless we are using external Database to connect and/or we are writing complex data base queries which are not possible with Obj methods.
Obj- operations generate their own SQL while RDB- operations rely on the query written in Rule-Connect-SQL instances.
Obj methods are meant for transactional ease as they have the option of deferred save, rollback etc whereas RDB methods are performed immediately with auto-commit
Hi @TanyaS58,
Please go through the below pega discussion written by Kencho. It very Great Article.
When we should use RDB methods over Obj methods
I hope this will help you.
Thanks,
Ashok
RDB List - Use this method to retrieve rows from an external relational database and place the results as embedded pages in a specified step page of class Code-Pega-List.This method references a Connect SQL rule instance, and executes SQL statements stored in the Browse tab of that rule instance. The search can do anything you can specify in a SQL statement, such as a SELECT WHERE statement. Any constraints on the returned data are in the SQL.
- Use those method when connecting through External system.
- The RDB-List method returns data to the page you specify in the Step Page field on the activity form. This can be a previously created page ,which is cleared and reused, or a new page created with this method.When the system receives information from the external database, it updates properties on the step page, which has the class Code-Pega-List.If the search is successful,
- this method also creates a page list page named
pxResults, which contains pages pxResults(1), pxResults(2), and so on. These embedded pages contain the row results as properties. Depending on the ApplyDeclaratives box, the declarative processing may be activated for the properties.
Obj-Browse -
Use the Obj-Browse method to search instances of one class and copy the entire instances, or specified properties, to the clipboard as an array of embedded pages.Only properties exposed as columns can be used as selection criteria. However, values of properties that are not exposed as columns, including embedded properties, can be returned.
- At run time, the system converts the parameters to an SQL query statement, creating a SELECT WHERE and ORDER BY query based on the parameters, and sends the query to the PegaRULES database.
- This method operates on the database response to create a results page containing one embedded page for each instance retrieved.
- If the Field parameters identify only
Single Valueproperties exposed as columns, each embedded page in the results contains only those properties. However, if one or more of the Field parameters identifies a property that is not an exposed column, the entire pzPVStream column, also known as the Storage Stream or Blob column, is also returned.
