Document Store based on SQL statements