Connections database table - TaskDepender

Connections database table

From TaskDepender
Jump to: navigation, search
(Connect)
(Connect)
Line 32: Line 32:
 
=== Connect ===
 
=== Connect ===
  
Connections can only be made between the selected tasks and deliverables. This means that new connections must be inserted<ref name="SQL_insert">[http://www.sqlite.org/lang_insert.html Insert command - SQLite reference]</ref> via a select-statement that results in a join between the [[Selected tasks database table|selected tasks]] and the [[Selected deliverables database table|selected deliverables]].
+
Connections can only be made between the selected tasks and deliverables. This means that new connections must be inserted<ref name="SQL_insert">[http://www.sqlite.org/lang_insert.html Insert command - SQLite reference]</ref> via a SQL-statement that results in a join between the [[Selected tasks database table|selected tasks]] and the [[Selected deliverables database table|selected deliverables]].
  
Since the connections are made between the selected task(s) and the selected deliverable(s), multiple connections can be made. For each new connection a clone of the deliverable must be created ''inside'' the corresponding task. To do this after the connections have been inserted, is not trivial. The following considerations apply:
+
Since the connections are made between the selected task(s) and the selected deliverable(s), multiple connections can be made. For each new connection a clone of the deliverable must be created ''inside'' the corresponding task. Using a SQL-statement to do this after the connections have been inserted, is not trivial. There are the following considerations:
 
* A certain deliverable could be connected to a number of tasks. This means that for a single ''selected'' deliverable, several clones could be required to be created.
 
* A certain deliverable could be connected to a number of tasks. This means that for a single ''selected'' deliverable, several clones could be required to be created.
 
* A selected deliverable could already have other connections (e.g. it can be a deliverable of not selected task).
 
* A selected deliverable could already have other connections (e.g. it can be a deliverable of not selected task).
 
* Only one clone relates to a certain connection.
 
* Only one clone relates to a certain connection.
  
Taking these considerations into account means that the easiest way to add the clones will probably be to check the adjusted <tt>Connections</tt> table and to see for which connections the are no clones. This is done as described in the following.
+
Taking these considerations into account means that the easiest way to add the clones will probably be to check the adjusted <tt>Connections</tt> table and to see for which connections no clones are present and then create a clone for each one of these. This is done as described in the following.
  
The first thing the SQL statement would use is a list of all the connections for which the <<tt>ConnectionId</tt> of each deliverable. It then needs to check whether there are  
+
So, the first thing the SQL statement would use is a list of all the connections for which the <tt>Id</tt> is not present in the selection of the of the <tt>ConnectionId</tt> from the [[Deliverables database table|deliverables table]]. It then needs to check whether there are  
  
 
the SQL statement could just look for all those connections for which no deliverable can be found with the <tt>ConnectionId</tt> equal to the connection.
 
the SQL statement could just look for all those connections for which no deliverable can be found with the <tt>ConnectionId</tt> equal to the connection.

Revision as of 06:21, 22 November 2011