Sunday, March 28, 2010

SOQL: Improvements

How many of you have faced problems understanding the basic difference between Object relationships (as provided by and Table/entity Relationships (as provided in conventional RDBMS)?
I am sure many of you must have faced the same problem, at least I did. But lately there are some new enhancements in SOQL which narrows down these differences. For e.g now in SOQL you can have INNER JOINS and you can group data using the famous GROUP BY clause.

So, what is the big deal?

Well, yeah it’s not a big deal that you can
- do more in SOQL and remove your earlier code using which you used to retrieve data in case of INNER JOINS
- group your data using GROUP BY clause and have conditions on it using HAVING clause
- use some new Date functions in your SOQL query to filter your data (which you used to do using Apex code).

So, in all it means richer SOQL and lesser use of Apex for these purposes.

Interested, then checkout a very good article written by Dr. Umit Yalcinalp

Popular Posts