Deliverables database table

From TaskDepender
Jump to: navigation, search
(Paste deliverables)
(Description)
 
Line 4: Line 4:
  
 
The deliverable component is described in [[Task_Management_Method#Deliverable|"Task Management Method"]]. The deliverables in the project are stored in a table in the project database. Since the name does not have to be unique, a deliverable has to have a unique id which can be generated as a integer primary key [http://www.sqlite.org/lang_createtable.html#rowid] by the database [http://www.sqlite.org/lang_createtable.html#rowid]. Since a deliverable represents a graphical element, it has a position, a width and a height. When using a true-type font, the width and height will be determined when the task is displayed.
 
The deliverable component is described in [[Task_Management_Method#Deliverable|"Task Management Method"]]. The deliverables in the project are stored in a table in the project database. Since the name does not have to be unique, a deliverable has to have a unique id which can be generated as a integer primary key [http://www.sqlite.org/lang_createtable.html#rowid] by the database [http://www.sqlite.org/lang_createtable.html#rowid]. Since a deliverable represents a graphical element, it has a position, a width and a height. When using a true-type font, the width and height will be determined when the task is displayed.
 +
 +
== Constraints ==
  
 
The following constraints apply for the deliverables table:
 
The following constraints apply for the deliverables table:
 
* When a container task is deleted, the contained tasks need to be deleted as well.  
 
* When a container task is deleted, the contained tasks need to be deleted as well.  
* When the connection between the parent and the connected task is deleted, the [[Clone|clone]] must be deleted as well.
+
* When the connection between the parent and the connected task is deleted, a [[Clone|cloned deliverable]] must be deleted as well.
 
* When a deliverable is deleted, all its connections are deleted as well.
 
* When a deliverable is deleted, all its connections are deleted as well.
  
 
== Design ==
 
== Design ==
  
=== Definition ===
+
The <tt>Deliverables</tt> table has the following fields:
 
+
The <b><tt>Deliverables</tt></b> table has the following fields:
+
  
 
{| valign="top" border="1" cellpadding="3" cellspacing="0"
 
{| valign="top" border="1" cellpadding="3" cellspacing="0"
Line 43: Line 43:
 
|}
 
|}
  
The C-interface structure is given by <tt>tdd_deliverable</tt>.
 
  
=== Actions ===
+
The following actions are defined:
* [[Deliverables database table - Create|Create]]: When a new project is created, the deliverables table is created. Because of the reference to the task (see [[#Constraints|"Constraints"]], the deliverables table must be created ''after'' the [[Tasks database table|tasks table]].
+
* [[Deliverables database table - Create|Create]]
 
* [[Deliverables database table - Insert|Insert]]
 
* [[Deliverables database table - Insert|Insert]]
A deliverable can only be inserted in the current diagram, so in the current container. Therefore, when inserting a deliverable, the <tt>ContainerId</tt> os filled in by using the id of the current container as stored in the [[State variables database table|state-variables table]].
 
 
 
* [[Deliverables database table - Update|Update]]
 
* [[Deliverables database table - Update|Update]]
 
+
* [[Deliverables database table - Delete|Delete]]
* [[Deliverables database table - Delete|Delete]]: Only selected deliverable can be deleted. This means that the user does not have to supply an id, but simply all selected deliverables are deleted.
+
 
+
 
* [[Deliverables database table - Cut|Cut]]
 
* [[Deliverables database table - Cut|Cut]]
 
 
* [[Deliverables database table - Paste|Paste]]
 
* [[Deliverables database table - Paste|Paste]]
 
As described in [[Paste elements|"Paste elements"]], elements can be pasted into the current diagram by setting the <tt>ContainerId</tt> column to the current container. As follows from the previous section, this is done by finding all the deliverables that have this <tt>ContainerId</tt> set to the maximum integer value of 4294967295.
 
 
== Implementation ==
 
 
=== Interface structure ===
 
 
<syntaxhighlight lang="cpp">
 
typedef struct
 
{
 
  uint32 id,
 
  char*  name,
 
  char*  description,
 
  uint  resourceId,
 
  uint  x,
 
  uint  y,
 
  uint  width,
 
  uint  height,
 
  uint32 container_id
 
} tdd_deliverable;
 
</syntaxhighlight>
 
  
  
 
----
 
----
 
* [[Database]]
 
* [[Database]]

Latest revision as of 06:53, 30 November 2011