1. A method for scheduling database tasks for a relational query, said method comprising: receiving at least a portion of a query execution plan comprising a set of fragments with respective tasks having corresponding database virtual address ranges; mapping the database virtual address ranges to a set of memory pages; requesting respective locks for the set of memory pages; locking memory pages for the selected tasks; marking one or more of the tasks as being ready for execution based on whether locks have been granted for all of the memory page requests; and scheduling one or more tasks for execution in a dataflow architecture hardware accelerator coupled to the memory pages when locks have been obtained for all of its memory pages, wherein execution of the one or more tasks is based on execution of machine code instructions formatted for the dataflow architecture hardware accelerator and specifying a dataflow of data through the dataflow architecture hardware accelerator.