Changes between Version 26 and Version 27 of GenericTrac
- Timestamp:
- Aug 2, 2010, 4:10:02 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenericTrac
v26 v27 3 3 This page defines a new data model for Trac that should be suitable 4 4 for storing most of the data from resources, along with their change history. 5 6 In 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). 7 In 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. 5 8 6 9 The main benefits expected from the new model are: … … 30 33 This could allow the (re-)implementation of the TracCrossReferences idea 31 34 as a plugin, for example. 32 See # 6543 and TracDev/Proposals/TracRelations.35 See #31, #886, #6543 and TracDev/Proposals/TracRelations. 33 36 34 37 … … 43 46 5. all the existing constraints about maintaining resource history and associated metadata should be taken into account 44 47 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]). Al ternatively, the versioning of resources could be delegated to a version control backend, and even a [DistributedTrac distributed] one.48 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]). Also, as said above, the versioning of resources could be delegated to a version control backend. 46 49 47 50 === Resource Content === … … 49 52 The ticket model is by far richer data model we would have to support, 50 53 so we could take this as a basis to lay out the foundations of the new model. 54 51 55 For ticket, we currently have a fixed set of properties 52 56 (as columns in the `ticket` table) … … 54 58 (as prop/value columns in a `ticket_custom` table). 55 59 56 Both styles have advantages and disadvantages: 57 1. properties as columns: 60 Note that we might soon get ''relations'' (or ''links'') as well, see #31. 61 62 Let'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: 58 64 - (-) only flexibility is to not use some fields (e.g. 'severity', 'url') 59 65 - (-) no multiple values per field possible 60 - (+) faster (?)66 - (+) faster especially for multicriteria queries (?) 61 67 - (+) straightforward code (`for field1,field2, ... in cursor: ...`) (?) 62 2. properties in prop/value columns68 2. properties stored in prop/value columns of a generic table 63 69 - (+) highest flexibility, add or remove fields at will 64 70 - (+) allow for multiple values per property, provided we don't use a primary key … … 66 72 - (+) 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; 67 73 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(?) 69 75 - (-) more complex code (?) 70 76 (?) means ''yet to be verified''