1. A method of enabling queries to continuously operate on different states of data while allowing the data to be manipulated, said method comprising: receiving queries and transactions on data simultaneously in the database, wherein the queries operate on a data stored in a first memory coupled to a hardware accelerator and the transactions operate on another data stored in a second memory coupled to a host; taking snapshots of data in the second memory at an interval; determining a set of changes that takes the data in the first memory from one snapshot to another snapshot; generating a mask comprising the set of changes that is applied by a machine code database instruction for changing the data in the first memory from one snapshot to the other snapshot; determining, for each query, a snapshot that is associated with that query; and determining data in the first memory on which the queries will operate based on the snapshot and selectively applying the mask.