Changes between Version 4 and Version 5 of Backtracking


Ignore:
Timestamp:
Oct 16, 2009, 3:12:31 PM (15 years ago)
Author:
jurzua
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Backtracking

    v4 v5  
    2626
    2727  ''select * from entity, attribute,  entity_attribute where entity.id = X && attribute.id= Y &&  entity_attribute.entityId = X && entity_attribute.attributeId= Y && entity. modifier = Z && attribute. modifier = Z'', where X and Y are numbers and Z is a time stamp.
     28
     29'''Analysis of Behavior'''
     30
     31Let be an Entity, which has an Attribute like this:
     32
     33Entity[id:1, systemStatus:original, modifier:x]
     34Attribute[id:2, systemStatus:original, modifier:x] 
     35
     36* Modification of an Entity
     37A modification on an Entity will create a copy of the edited entity and its corresponding attributes (and relations). The new copy will have the value “original” in systemStatus and the current time in modifier. In the old version will be change only the attribute systemStatus from “original to copy”.
     38
     39Entity[id:1, systemStatus:copy, modifier:x]
     40Attribute[id:2, systemStatus:copy, modifier:x]
     41
     42Entity[id:1, systemStatus:original, modifier:currentTime]
     43Attribute[id:2, systemStatus:original, modifier:currentTime]
     44
     45Both the table entity_attribute and the table_relation should not be changed.
     46
     47* Elimination of an Attribute
     48An elimination of an attribute will mean the following changes:
     49
     50Entity[id:1, systemStatus:copy, modifier:x]
     51Attribute[id:2, systemStatus:copy, modifier:x]
     52
     53Entity[id:1, systemStatus:original, modifier:currentTime]
     54
     55For this case both the table entity_attribute and the table_relation should not be changed, because the reference between the attribute and the entity is used by the previous versions.
     56
     57* Insertion of an Attribute
     58An insertion of an attribute will mean the following changes:
     59
     60Entity[id:1, systemStatus:copy, modifier:x]
     61
     62Entity[id:1, systemStatus:original, modifier:currentTime]
     63Attribute[id:2, systemStatus:original, modifier:currentTime]
     64
     65For this case is needing the insertion of a row in the table entity_attribute, which represents the relation between the entity and the new attribute. If the mentioned row exists already, do nothing.