1. A database management system for managing a database, the database management system comprising: a query receiving unit being configured to receive a query to the database; a query execution plan creating unit being configured to generate a query execution plan including information indicating one or more database operations necessary to execute the received query; and a query execution unit being configured to execute the received query based on the generated query execution plan, dynamically generate a task for executing a database operation in execution of the received query, and execute the dynamically generated task, the query execution unit being configured to perform a determination processing of task-generation number when newly creating the task in execution of the received query, the determination processing of task-generation number being to calculate the number of task generation which is the number of generatable tasks, based on a first memory resource amount which is the amount of memory resource necessary to be allocated per a task newly generated, and a second memory resource amount which is the amount of memory resources that can be newly allocated, the number of dynamically generated tasks being equal to or smaller than the number of task generation.