If you’re using WorflowGen 7.x, the fastest and easiest way to query/update the database is by using the GraphQL API. Querying the database directly would be more difficult since there are a lot of tables that are interconnected.
You can test the queries by going to http://[YOURSITE]/wfgen/graphql