Do you mean the location configuration that is configured for the group OR the location that is currently set on the clients?
Anyway, neither of them can be read from the database.
The group policy is stored in the database as files. Not text.
The current location of the SEP client is not available in the database. The client only sends the system logs to the SEPM. The system log contains the information about when the location switching happened and to what location the client switched to. It not necessarily has the current location's information.