The following is a basic overview of the suggested approach for building relational model applications on the CEDA platform
It's appropriate to use the following layers
The challenge is for a DBMS to make this easy and efficient. Parameterised relation types and tuple types eliminate the need for an O/R mapping.
Each base schema defines a representation that is the target of update transactions.
A base schema should be relatively unconstrained (i.e. have weak integrity constraints), promoting
A derived schema module can be any function of one or more base schema module(s). It is code that defines what can be read from the database, and represents the read access part of a business logic layer.
This typically involves procedural/functional code, and of course the relational algebra. OO state machines aren't all that useful here.
Derived schema modules naturally compose, because both base and derived relational schemas are treated similarly as far as read-access is concerned.
Since a derived schema module is read-only it can be a non-injective function of the base schema modules(s) and therefore:
A derived schema involving an injective function [] preserves all the information in the base schema. Allowing non-injective functions means allowing some of the information to be dropped.
A derived schema module allows control over policies for the caching of calculated values, and requires infrastructure for ensuring derived variables are updated efficiently and automatically when the base variables are updated.
This is code that defines what updates can be applied to the database, more specifically to base schema modules, and represents the part of the business logic layer that is concerned with updates.
Derived schema modules are irrelevant because they are not updatable.
This typically involves procedural/functional code, and of course the relational algebra. OO state machines aren't all that useful here.
A derived schema module is apropriate for defining what relational information needs to be presented.
However the presentation layer (user interface) itself falls outside the scope of the RM. This is because the UI is a state machine.
OO is typically useful here.
The UI code should be relatively thin, i.e. avoid containing any business logic.