Changes between Version 34 and Version 35 of GenericTrac
- Timestamp:
- Aug 3, 2010, 7:24:11 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GenericTrac
v34 v35 17 17 == Related Proposals == 18 18 19 The idea is not new, it has its root in the TracObjectModelProposal, and was refined several times (TracDev/Proposals/DataModel, TracDev/Proposals/Journaling, see also [googlegroups:trac-dev:8cf3f5fe0e476ce5 this mail).19 The idea is not new, it has its root in the TracObjectModelProposal, and was refined several times (TracDev/Proposals/DataModel, TracDev/Proposals/Journaling, and [googlegroups:trac-dev:8cf3f5fe0e476ce5 this mail]). 20 20 21 21 As this will be a major redesign of the data model, … … 83 83 The second style (prop/value) can be implemented in several ways: 84 84 - a single `properties` table with `prop` and `value` string columns (this is what our current `ticket_custom`, `system` and `repository` tables do) 85 - a single `properties` table with `prop` and several typed columns (`int_value`, `string_value`, `date_value`, etc.), only the appropriate column being used - see discussion ([[./Brainstorm#JBPM-approach|JBPM's approach]])85 - a single `properties` table with `prop` and several typed columns (`int_value`, `string_value`, `date_value`, etc.), only the appropriate column being used (see in the discussion, the [[./Brainstorm#JBPM-approach|JBPM's approach]]) 86 86 - several `properties` tables with each `prop` and `value` columns, each table dedicated to a given type (`int_properties`, `string_properties`, etc.) 87 87 - ... more ... … … 113 113 Actually, for achieving requirement 3. & 4., we need specialized tables, 114 114 one for each different value column type we want to support: 115 - '''{resource}_prop''' for text values 116 - '''{resource}_prop_int''' for integer values, identifiers and dates (using "bigint") 115 - '''{resource}_prop''' for integer values, identifiers and dates (which are already stored using "bigint") 117 116 - ('''{resource}_prop_float''' for float values, if really needed) 118 117 And we could even differentiate between short and long text values (requirement 4): 119 - '''{resource}_prop ''' for short text values118 - '''{resource}_prop_string''' for short text values 120 119 - '''{resource}_prop_text''' for long text values 121 (see #6986).120 See #6986, it will make a difference for MySQL, and I suppose it will matter for Oracle support also. 122 121 123 122 This set of tables is a "generic scheme" that can be easily created for any kind of "resource". There's also a trade-off here, between using one very generic set of "resource_..." table versus special instances like "ticket_...": having one set of tables presents the risk of introducing too much contention for backends using table locking, and leads to writing queries that will contain lots of difficult to joins. We will already have enough issues with this when writing multicriteria search queries... … … 187 186 188 187 The main resource and the derived resources would be related together: 189 - the main resource would point to the last change (shortcut, this could be deduced by inspecting the ''date'' stored in the _rev_proptable - so in a "normalized" schema we wouldn't need it)190 - a revision resource would point to the corresponding version which was created at the same time (again, matching with the ''date'' would be possible?)188 - the main resource would point to the last ''revision'' (shortcut, this could be deduced by inspecting the ''date'' stored in the corresponding `_rev_prop` table - so in a "normalized" schema we wouldn't need it) 189 - a ''version'' resource would point to the corresponding ''revision'' which was created at the same time (again, matching with the ''date'' would be possible? better use an explicit ''revision'' property, though) 191 190 192 191 Typical example: … … 260 259 - Resource related: [[TicketQuery(status=!closed&keywords=~tracobject)]] 261 260 262 261 See also: [./Brainstorm] for examples and "test" of the ideas, and discussion. 262