Re: Declarative constraints in practical terms
Date: 23 Feb 2006 12:01:29 -0800
Message-ID: <1140722996.236105.166040_at_o13g2000cwo.googlegroups.com>
x wrote:
> "dawn" <dawnwolthuis_at_gmail.com> wrote in message
> news:1140624704.366977.60730_at_g44g2000cwa.googlegroups.com...
> > x wrote:
>
>
> > > > 3) The functions for validation of data can be used anywhere within an
> > > > application if packaged outside of the dbms, otherwise most of them
> > > > need to be coded at least twice -- once for the dbms and once for use
> > > > in a UI or web service.
>
> > > They can be written once and packaged anywhere.
>
> > How and how often is this done? I have seen this in cases where no
> > (few) constraints are enforced within the DBMS and reside in
> > proprietary database services and where the UI or is character or very
> > thin client-based. The same validation routines can be used across the
> > board that way.
>
> I don't know how often is done.
> Think about compilers, interpreters, virtual machines.
Yes, it is more likely that they are specified with metadata once and then written in multiple languages for multiple run-time environments.
> > > They can be written once and called anywhere.
>
> > I'm very interested in this approach. I would like more details. How
> > can I use the validation logic from within JavaScript, for example, for
> > a browser-UI and then again within database update services? (and be
> > database independent, hopefully)
>
> To use a validation logic independent of databases and UI you need an
> abstraction layer :-)
Yup.
> > > > 4) The declarative constraints use the RM, so they work with the
> > > > restrictions of the RM, including 1NF. Because they are written in
> > > > SQL, they use a 3VL whereas using metadata + code, 2VL and non-1NF are
> > > > the norm.
>
> > > The declarative constraints use any declarative language.
>
> > Can we have it work so they use any language?
> What do you mean by that ?
> The constraints can be written in any sufficient language.
I know, but the previous poster suggested declarative constraints in any declarative language. I would suggest specified constraints written in any sufficient language.
>
> > > Have you ever used any declarative language (except SQL) ?
> > Only proprietary sublanguages, otherwise SQL is it.
>
> You are afraid to use what you don't know.
> http://www.erlang.org
> http://www.erlang.org/doc/doc-5.4.12/lib/mnesia-4.2.3/doc/html/part_frame.html
> http://www.erlang.se/doc/doc-5.4.3/lib/stdlib-1.13.3/doc/html/qlc.html
> http://www.erlang.org/faq/x606.html
The problem space of erlang does not appear to be where my interests lie
> > > > This relates to the fact that the RM is not sufficient for writing
> > > > software
>
> > > Of course. One cannot write software without writing code.
> >
> > agreed
Cheers! --dawn Received on Thu Feb 23 2006 - 21:01:29 CET