Edgewall Software

Changes between Version 26 and Version 27 of GenericTrac


Ignore:
Timestamp:
Aug 2, 2010, 4:10:02 PM (14 years ago)
Author:
Christian Boos
Comment:

a few more notes (versioning backends, #31, …)

Legend:

Unmodified
Added
Removed
Modified
  • GenericTrac

    v26 v27  
    33This page defines a new data model for Trac that should be suitable
    44for storing most of the data from resources, along with their change history.
     5
     6In the longer term, it would be more appropriate to keep the change history in a dedicated system (a version control backend, even a [DistributedTrac distributed] one).
     7In that picture, we could even provide a simple "dbvcs" backend, which would use the database for storing the change history much like we do now.
    58
    69The main benefits expected from the new model are:
     
    3033This could allow the (re-)implementation of the TracCrossReferences idea
    3134as a plugin, for example.
    32 See #6543 and TracDev/Proposals/TracRelations.
     35See #31, #886, #6543 and TracDev/Proposals/TracRelations.
    3336
    3437
     
    4346 5. all the existing constraints about maintaining resource history and associated metadata should be taken into account
    4447
    45 Note that the persistence constraints imposed by the Trac data model are not necessarily only (or even best) approached using the RelationalModel, one could imagine that a future version could use more document-oriented persistence layers (e.g. [http://www.mongodb.org/ MongoDB]), or object-oriented databases (e.g. [http://www.zodb.org/ ZODB]). Alternatively, the versioning of resources could be delegated to a version control backend, and even a [DistributedTrac distributed] one.
     48Note that the persistence constraints imposed by the Trac data model are not necessarily only (or even best) approached using the RelationalModel, one could imagine that a future version could use more document-oriented persistence layers (e.g. [http://www.mongodb.org/ MongoDB]), or object-oriented databases (e.g. [http://www.zodb.org/ ZODB]). Also, as said above, the versioning of resources could be delegated to a version control backend.
    4649
    4750=== Resource Content ===
     
    4952The ticket model is by far richer data model we would have to support,
    5053so we could take this as a basis to lay out the foundations of the new model.
     54
    5155For ticket, we currently have a fixed set of properties
    5256(as columns in the `ticket` table)
     
    5458(as prop/value columns in a `ticket_custom` table).
    5559
    56 Both styles have advantages and disadvantages:
    57  1. properties as columns:
     60Note that we might soon get ''relations'' (or ''links'') as well, see #31.
     61
     62Let's examine the advantages and disadvantages of each different kind of storage, for the properties:
     63 1. properties stored in columns of a main table:
    5864   - (-) only flexibility is to not use some fields (e.g. 'severity', 'url')
    5965   - (-) no multiple values per field possible 
    60    - (+) faster (?)
     66   - (+) faster especially for multicriteria queries (?)
    6167   - (+) straightforward code (`for field1,field2, ... in cursor: ...`) (?)
    62  2. properties in prop/value columns
     68 2. properties stored in prop/value columns of a generic table
    6369   - (+) highest flexibility, add or remove fields at will
    6470   - (+) allow for multiple values per property, provided we don't use a primary key
     
    6672     - (+) a slight extension would allow ordered multiple values (sequences), otherwise we have no control over the order in which those multiple values are retrieved, which might introduce confusion as this order will vary when new values are added;
    6773       while primarily useful for `int` fields, this could also be useful to implement `text` fields for Oracle (working around the limits on varchars and not having to use CLOBs)
    68    - (-) slower, less memory efficient (?)
     74   - (-) slower, less memory efficient, especially for multicriteria queries(?)
    6975   - (-) more complex code (?)
    7076(?) means ''yet to be verified''