Changes between Version 11 and Version 12 of GenericTrac
- Timestamp:
- Sep 4, 2009, 2:54:31 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenericTrac
v11 v12 1 1 = GenericTrac Data Model = 2 2 3 This page attempts to define a new data model for Trac that could be suitable 4 for most of its resources. The main benefits expected from the new model are: 3 This page defines a new data model for Trac that should be suitable 4 for storing most of the data from resources, along with their change history. 5 6 The main benefits expected from the new model are: 5 7 - simplification of the internals of Trac, especially for the ticket model, 6 8 in which the storage of changes is quite cumbersome (see #454, #6466) 7 9 - solve a few design problems with the current data model (like #1890, #4582) 8 10 - allow better code reuse and share of the base features 9 among different kinds of resources ( numerous examples for that,10 see [#RelatedTickets] below)11 among different kinds of resources (like #695, #1113, etc. 12 see [#RelatedTickets] for more) 11 13 12 14 This stems from the following former proposals: … … 20 22 it could also be a good opportunity to take the 21 23 ''[TracMultipleProjects multiple project]'' considerations into account (#130). 22 Each resource related table could get a `project` identifier field. 23 24 Working on the generic aspect of Trac should also make it possible to implement various ''generic'' operations on Trac resources as plugins, mainly being able to (re-)implement TracCrossReferences as a plugin (see also #6543). 24 25 Somehow related to the generic data model, but not strictly depending on it, 26 Trac should also make it possible to implement new kinds of plugins that would 27 perform ''generic'' operations on Trac resources. 28 This could allow the (re-)implementation of the TracCrossReferences idea 29 as a plugin, for example. 30 See #6543 and TracDev/Proposals/TracRelations. 25 31 26 32 … … 60 66 while obviously the first style can't support the second. 61 67 62 It remains to be seen whether the second approach is really less efficient than the first, but this doesn't really matter as we anyway have already to pay the price for 63 that flexibility. 68 It remains to be seen whether the second approach is really less efficient than the first, but this doesn't really matter as we anyway have already to pay the 69 price for that flexibility. 70 Note also that by an appropriate use of indexes, we might eventually get 71 ''better'' performance compared to what we have today. 64 72 65 73 So the new model could be simply: … … 96 104 can't interpret fields as being special. Quite the opposite, as modules are what 97 105 provides the real "behavior" of resources. 106 Furthermore, properties not defined in the schema could simply be ignored, so this would allow a great deal of flexibility for plugins when they need to store "special" properties or revision properties. 98 107 99 108 As a possible refining, it could be possible to have specialized tables,