In V7 of Pyrrho I plan to have a more systematic approach to modifiable rowsets, which are useful in view-mediated data integration. Comments on the following proposals are welcome. Update: (12 April 2021) Working implementations of these ideas (alpha code) have now been posted to GitHub.
V7 uses immutable, shareable rowsets (all typed values are also immutable and shareable). Compiled objects including table-valued functions and views have precompiled rowsets that are instantiated when accessed. Such instantiations are merged into the surrounding context, so that Pyrrho uses rowset review where other DBMS (and previous versions of Pyrrho) use query optimisation.
Some
rowsets can be used to make changes to their base tables, and this feature is
useful for views. As a rule of thumb this requires rowsets whose results expose
simple rows and columns, possibly with a monotonic invertible adapter function, and thus
all Yes entries in this table depend on this kind of additional requirement and the
need to satisfy constraints and authorisation requirements. Such an operation
adds to the transaction results a set of modifications for each of the individual
tables involved. There are no entries below for rowsets with 0 or 1 base tables:
SubClass |
Insert |
Update |
Delete |
DistinctRowSet |
No |
No |
No |
DocArrayRowSet |
Yes |
Yes |
Yes |
EmptyRowSet |
|
|
|
EvalRowSet |
No |
No |
No |
ExplicitRowSet |
|
|
|
GroupingRowSet |
No |
No |
Yes |
IndexRowSet |
(Yes) | (Yes) | (Yes) |
JoinRowSet |
Yes |
Yes |
Yes |
MergeRowSet |
Intersection only |
Yes |
Yes |
OldTableRowSet |
|
|
|
OrderedRowSet |
Yes |
Yes |
Yes |
RestRowSet |
Yes |
Yes |
Yes |
RoutineCallRowSet |
|
|
|
RowSetSection |
No |
Yes |
Yes |
SelectRowSet |
See below |
See below |
Yes |
SelectedRowSet |
Yes |
Yes |
Yes |
SqlRowSet |
|
|
|
SystemRowSet |
|
|
|
TableRowSet |
(Yes) | (Yes) | (Yes) |
TransitionRowSet |
|
|
|
TrivialRowSet |
|
|
|
ValueRowSet |
|
|
|
WindowRowSet |
No |
No |
No |
It will be obvious in most cases what these RowSet classes are for. TransitionRowSet and OldTableRowSet are used in trigger implementation and are not directly accessible. A SelectRowSet has columns that are expressions, and only certain expressions are invertible to retrieve the underlying column values, while a SelectedRowSet picks and re-arranges columns from its source. RestRowSets are used in the implementation of RESTViews.
No comments:
Post a Comment