RE: Re: Table and Query Classes good or unnecessary?
> Jean Marc Azerad wrote:
>I did ask myself, long ago, why the table classes were not built into schema classes. My understanding is that it alows us
>to use superclasses of table classes, which I use a lot. If the data definition was linked, it would be weird.
Back in the Prometheus days, it was explained to me that Studio’s then-new approach to data classes followed the Model-View-Controller approach. With this in mind, schema and query classes are “models”, representing the database structures to be “controlled” through the table class, and then “viewed” via window/report classes.
In my experience, the degree to which a developer invests in use of SQL classes depends largely on the complexity of the data model that their app must work with. If the application doesn’t need to do a lot of multi-table joins, then it’s very advantageous to use schemas & inherited SQL methods. Personally, I love to use schemas/queries & tables when retrieving data when the join conditions & where clause isn’t too crazy.
The app I support has core data tables that were designed 30 years ago with multiple-field primary keys and many complex relationships across many tables (rarely do we have the simplicity in having records uniquely identified by a single integer value). I’ve found it’s usually simpler to handle write operations using carefully hand-crafted SQL (borrowing a favorite phrase from Mark Phillips!) in Statement blocks. But even when I write-out the full SQL statement in a Statement-block, I’ll often create a query-class for simplicity in defining the list/row variables and ensuring I use consistent & compatible data types.
This communication is for use by the intended recipient and contains information that may be Privileged, confidential or copyrighted under applicable law. If you are not the intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. Unless explicitly and conspicuously designated as “E-Contract Intended”, this e-mail does not constitute a contract offer, a contract amendment, or an acceptance of a contract offer. This e-mail does not constitute a consent to the use of sender’s contact information for direct marketing purposes or for transfers of data to third parties.
Manage your list subscriptions at lists.omnis-dev.com
Start a new message -> mailto:email@example.com