[baseten-users] Plans for PITA Integration
Ben Einstein
beinstein at me.com
Tue Jun 9 23:05:17 EEST 2009
Hi There,
I have a strong demand for using a database system with Point In Time
Architecture built it and have started to investigate BaseTen. In a
standard application, this would be accomplished by a layer of
abstraction between the database API and the application data layer.
Because BaseTen hides so much of the "nitty gritty" of the database
API, this is (as far as I understand it) impossible with BX. So, I've
started to modify the source to have a robust PITA system built in. As
requested, here are some basic requirements that I'm working with:
1. PITA can be disabled or enabled for each table independently using
the assistant
2. All PITA-required fields are automatically managed by the
assistant, so the imported model would be the same for PITA and non-
PITA designs
3. PITA will track every change using a "start date" and "end
date" (all versions of all records will remain in the same table; this
is standard practice for PITA)
4. Each PITA-enabled table has 6 extra fields: startedOn, startedBy,
startedReason, endedOn, endedBy, endedReason.
5. The "by" columns can be configured to be either UserIDs (and int8
type) or user names (text type), again, configureable from the assistant
6. By default, the context uses the current view, meaning only records
that NULL for endedOn
7. The PITA context can be set, using a method like [BXContext
setPointInTime: someNSDateObject]. This will allow the database to be
manipulated just as it was back at the specified date. One can
obviously reset to current with something like [BXContext
presentCurrentPointInTime] or [BXContext setPointInTime: nil]. Any
records added while in a non-current time, would appear after the
current records, preserving the snapshots.
8. Support for rolling back the database, like [BXContext
rollbackDatabaseToDate: anotherNSDateObejct]. This will copy the
snapshot from the specified date to the current date.
9. Support for purging the database, like [BXContext
purgeRecordsBeforeDate: someNSDateObject]. This will remove PITA
"bloat" that occurs from never removing any records and will actually
DELETE records from the database, optionally creating a SQL dump of
the deleted records.
10. We could have a field day with making audit trails very simple to
view, but I'm going to worry about data mining later.
I believe that's everything. I have a fairly immediate need for some
of these features, so I'm starting to burn the midnight oil, but if
there are any other requirements, I'd love to hear them ASAP!
Thanks,
Ben
More information about the baseten-users
mailing list