Deliverables database table
From TaskDepender
(→Definition) |
(→Constraints) |
||
Line 46: | Line 46: | ||
=== Constraints === | === Constraints === | ||
− | + | ||
+ | The two constraints for the table can be implemented by by [http://www.sqlite.org/foreignkeys.html#fk_actions referencing] these columns to the appropriate columns. This is done as follows: | ||
+ | * Delete contained deliverable when container is deleted: reference the <tt>ContainerId</tt> column to the <tt>Id</tt> of the [[Tasks database table|tasks table]]. | ||
+ | * Set <tt>RecourceId</tt> to <tt>NULL</tt> when recource deleted: reference <tt>RecourceId</tt> to the <tt>Id</tt> in the [[Resources database table|resources table]]. | ||
+ | |||
+ | |||
+ | |||
+ | |||
The last two constraints are implemented via [[Creating a cross reference|cross-referencing]] with the [[Connections database table|<tt>Connections</tt> table]]. Consequently, the <tt>ConnectionId</tt> field is added when this table is created. | The last two constraints are implemented via [[Creating a cross reference|cross-referencing]] with the [[Connections database table|<tt>Connections</tt> table]]. Consequently, the <tt>ConnectionId</tt> field is added when this table is created. | ||