Re: Declarative constraints in practical terms

From: x <x_at_not-exists.org>
Date: Thu, 23 Feb 2006 17:58:36 +0200
Message-ID: <dtkm3d$6cc$1_at_emma.aioe.org>


"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.

> > 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 :-)

> > > 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.

> > 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.cs.bris.ac.uk/~bowers/goedel.html

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

> > > This relates to the fact that the RM is not sufficient for writing
> > > software

> > Of course. One cannot write software without writing code.
>
> agreed
>
Received on Thu Feb 23 2006 - 16:58:36 CET

Original text of this message