The following is stated on the documentation page:
The data grid supports the following types of data sources: Database Source, XPath Source, Association Source, Microflow Source. The database and XPath sources retrieve objects from the database and supports searching and sorting. The database source can also be used in offline applications. The association source follows an association from the enclosing data view to get to the objects. Finally, the microflow source calculates the list of objects by executing a microflow.
While the primary difference lies in support for (or lack of) offline pages/apps, there are also some known limits such as the Export to Excel functionality not being available when you select Database as source.
See also https://docs.mendix.com/refguide/data-grid for more details.
As far as I know, using the DB will/can also work in Offline mode while XPath will not.
Another difference is that when you used the constrained by on reference selectors it will be updated in realtime, while using Xpath constraint will not.
Those are the differences I know about,