Task list database table - TaskDepender

Task list database table

From TaskDepender
Jump to: navigation, search
Line 3: Line 3:
 
== Description ==
 
== Description ==
  
In TaskDepender™ only actions can be performed on the elements visible in the current container. Therefore it would be convenient to be able to create a table containing these elements.
+
In TaskDepender™ only actions can be performed on the elements visible in the current diagram. Therefore it would be convenient to be able to create a table containing these elements. This table can then be used to perform all the searches so the complete [[Tasks database table|tasks table]] does not have to be queried which is important from a performance aspect as well.
  
As was described in the [[Task management method]]
+
As was described in the [[Task management method|"Task management method"]], tasks that contain elements (the [[Task_management_method#Container tasks|containers]]) are to be displayed differently from the other tasks in the diagram. Therefore, the table could also indicate whether a certain task is a container without the database having to be queried every time for elements that have the id of the task as the <tt>ContainerId</tt>.
 +
 
 +
The design and the implementation of this 'convenience' table is given in the following sections.
  
 
== Design ==
 
== Design ==
  
The [[Tasks administration class|tasks administration]] must be filled with all the [[Task class|tasks]] in the current diagram so that it can be used by the [[GUI]].
+
The [[Tasks administration class|tasks administration]] must be filled with all the [[Task class|tasks]] in the current diagram. This is done by creating a temporary table that holds all the tasks in the current container.
 
+
This is done by creating a temporary table that holds all the tasks in the current container. The following constraints apply for this table:
+
* When the original task is deleted, the corresponding task in this table needs to be deleted as well.
+
  
 
This can be using [http://www.sqlite.org/lang_createtable.html <tt>CREATE AS</tt>] functionality:
 
This can be using [http://www.sqlite.org/lang_createtable.html <tt>CREATE AS</tt>] functionality:
Line 19: Line 18:
  
 
Additionally, this class also contains the <tt>IsContainer</tt> field that needs to be specified. This can be done by going through the [[Tasks database table|tasks table]] and the [[Deliverables database table|deliverables table]] and counting the elements that have the <tt>ContainerId</tt> equal to the task that is being added to the table. If this is greater than 0 then the task is a container. The query statement must take [[Clone|clones]] into account; those are contained in a task but are not to be counted as being a contained element.
 
Additionally, this class also contains the <tt>IsContainer</tt> field that needs to be specified. This can be done by going through the [[Tasks database table|tasks table]] and the [[Deliverables database table|deliverables table]] and counting the elements that have the <tt>ContainerId</tt> equal to the task that is being added to the table. If this is greater than 0 then the task is a container. The query statement must take [[Clone|clones]] into account; those are contained in a task but are not to be counted as being a contained element.
 +
 +
constraints apply for this table:
 +
* When the original task is deleted, the corresponding task in this table needs to be deleted as well.
 +
  
 
The resulting query is given in the following section.
 
The resulting query is given in the following section.

Revision as of 17:16, 16 October 2011