Re: chooses not to generate code at all



Responding to JXStern...

I belong to the camp that thinks nothing should be in stored procedures except rules related to data integrity that have the stability of Keplar's or Maxwell's Laws.


Do they have canoeing and archery at that camp?

I don't know how to turn that kind of statement into a decision
process, since any rule that is true, is as true as Maxwell's Laws.

The issue is stability. Max's Laws haven't changed in quite awhile. However, most business rules and policies are not so stable. I don't think any rules or policies that are at risk for needing maintenance (or whose scope of application may change) should be implemented as stored procedures.


[At least in the conventional sense where the procedure is triggered by specific database updates. In theory one could store code, parametric data, and whatnot in the DBMS that is selectively invoked by external applications. In that case those applications define the scope and context of execution rather than the DBMS' data. So in that case the DBMS is just a storage medium for the procedures and doesn't decide when they should be executed.]

FWIW, I think SQL is an implementation of MDA principles because it enables a generic transformation from one model representation (application data) to another (RDB storage). In the end MDA is simply:

[Input Model]       [Transformation Model]
    |                      |
    |                      |
    V                      |
{Transformation} <----------+
    |
    |
    V
[Output Model]

If we have an Input Model of objects, C structs, FORTRAN arrays, or whatever for a specific application and we need to turn it into an RDB representation (schemas, tables, tuples), then SQL is one Transformation Model that formalizes that conversion. The actual Transformation can be done manually by the developer in the 3GL de jour or it can be automated by a full code generator.


Well, to start with, SQL is not the model, but relational algebra is,
SQL is just one language that operates in that domain.  And neither
relational nor SQL prescribe any transformation from outside
representations, though reduction to cannonical form is a common
practice in and around relational, but its strength comes from the
existence of the cannonical form, not from being a process.

In this context relational algebra provides a meta-meta-model. SQL is an instance of that model representing the meta-model for those computing environments where one chooses to employ SQLServer for application implementations. If one is generating code for a particular application, then the Transformation Model is an instance of the SQL meta-model that provides the specific mappings necessary for the application context (e.g., FORTRAN array name to enterprise RDB table name). If development is manual, the developer supplies that mapping directly in the 3GL code (i.e., the Transformation Model is in the developer's head).



But if we want to explore the idea that relational database is a sort of MDA, then we return to the previous question - is the part of relational technology that is formalized, which is just the tables and relations and not code in triggers or stored procedures, enough to even constitute a "model" in MDA terms? And I'm in the camp that thinks not. In this camp we also learn how to tie knots and find edible foods in the forest.

An RDB is not "an MDA". It is simply a model instance that can be either an Input Model or an Output model under MDA, depending upon context. It happens to instantiate a meta-model, which is reflected in schemas, etc.. That meta-model instantiates a general data model especially tailored to persistence (Table, Tuple, Field). That meta-model is, in turn, an instance of the more general relational set theory meta-meta-model.


I think the issue around the content of stored procedures has nothing to do with the various models or whether those models can be accommodated within the MDA transformation paradigm. The issue of content is more about maintainability and separation of concerns with respect to good software development practice. IOW: render unto Caesar the things that are Caesar's and render unto the DBMS the things that are data storage.


************* There is nothing wrong with me that could not be cured by a capful of Drano.

H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions  -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH



.



Relevant Pages

  • Re: Confusion with MDA / DSL
    ... MDA is basically about enabling unambiguous transformations from one representation to another. ... Each meta-model abstractly defines the semantics of the particular representation. ... The vertical arrows represent instantiations of a particular meta-model as a concrete model. ... Transformation provides mappings between the meta-models so that one can map the basic semantics from one meta-model to another. ...
    (comp.object)
  • Re: Lets put this to rest
    ... MDA is simply platform independant (I assume you are ... An OOA model is a solution model for functional requirements that is expressed solely in customer terms. ... As such it maps directly into an MDA Platform Independent Model because it does not depend on computing space mechanisms. ... The second is the conceptual framework for transformation where a Transformation Model provides tailoring via rules for a specific transformation. ...
    (comp.object)
  • Re: chooses not to generate code at all
    ... The MDA round-trip tools, currently the most common MDA tools, that support traditional elaboration usually only generate static structure declarations. ... I think SQL is an implementation of MDA principles because it enables a generic transformation from one model representation ... It seems to me that scripts are code in exactly the same sense as C or COBOL source code. ... is really 'template processor' rather than 'code generator'. ...
    (comp.object)
  • Re: Generic DTS package
    ... You not only need to change the connection properties but you will need to ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... > The data pump is however not working. ... > the transformation is still looking at the first table columns. ...
    (microsoft.public.sqlserver.dts)
  • RE: SSIS datetime conversion Error
    ... type to date time stamp in advance page of Flat file source task, ... runs fine in SQL 2000. ... The sql 2000 transformation automatically convert the data ... I notice there are three choice of datetime in the source file. ...
    (microsoft.public.sqlserver.dts)