[ic] Normalized database for the Foundation demo.

Mike Heins interchange-users@icdevgroup.org
Mon Jul 22 14:45:02 2002


Quoting Dominique Kongolo (dominique_kongolo@hotmail.com):
> Hi Mike,
> 
> >This is all fine when the database *is* the application. When it is
> >not, and is only a repository for it, then things are different.
> 
> I was precisely thinking of a n-tier application (No business logic on 
> database). Normalized DB , audit trail and 3-tier apps are not imcompatible.
> 
> >Designing a rigid and inflexible system that requires all sorts
> >of effort to maintain data integrity is not what we are after.
> 
> We agree that the RDBMS should take care of data integrity. Again it
> doesn't go against normalisation. Also relational databases have
> proven to be more FLEXIBLE than spreadsheets style databases hence
> their MASS ADOPTION.

Flexible for programmers in touch with the specifics of their code,
absolutely. Not so flexible for everyone else who is at the mercy
of that code and its constraints on what they can do.

>
> >Interchange's object is to generate sales orders, which are the
> >same things people still write on an order form. It is not an
> >accounting application, where 3NF is definitely appropriate.
> 
> Shouldn't technology no just emulate but improve business process and
> worker's life. (I know it's a philosophical question ... :°) )

Always one worth asking. We have improved that quite a bit with
the ability to use transactions with commit/rollback on order
failure. At this point, millions of orders have been taken with
Interchange and its predecessors, so the current model seems to
work well. That isn't to say we aren't trying to improve.

> 
> >A lot of people will tell you that you have to have type-checking
> >to have a reliable software application, ala Java or C++.
> 
> You mean software development language?
> 
> >It is simply not true.
> 
> Well ...

Aha. Reliability in theory is nice. Reliability in practice is nicer. 8-)

> 
> >Interchange has none of it, yet is pretty robust
> >as these things go. It is not perfect nor error-free, but then again
> >I have not seen a large application in a fast-moving environment like
> >e-commerce which is. 8-)
> >
> 
> Aim at perfection my father once told me :-))

We aim to be as perfect as we can be. Too many programmers aim at perfection
so long their code never gets out the door. 8-)

We try to provide the results of near-misses as often as possible. With
luck, they get nearer all the time.

> 
> >This is all fine. But once you delve into the difficulties of making
> >all that portable between at least Pg, Oracle, and MySQL let me know
> >what you think. There is a reason that most applications that try and
> >achieve 3NF are not very portable between SQL implementations.
> 
> Like I said earlier, you DO NOT need to explicitly declare a foreign key as 
> a foreign key to be able to have a normalized schema and join tables.
> If you do need to explicitly declare foreign keys (for i.e cascade delete) 
> make sure that the DB you support is ANSI SQL92 compatible in its DDL.

As we cannot. There are at least 16 DB types in use for Interchange,
and probably more. Some of them are not SQL. We try to encourage people
to use SQL at least for the transactions/orderline/userdb stuff, but
the current application doesn't require it. You can even keep your
UserDB in LDAP if you want.

    Types I know about: DB2, DB_File, GDBM, Informix, Ingres, Interbase,
    LDAP, Msql, Mysql, ODBC/Access, (by, proxy), Oracle, Postgres, SDBM,
    SQL, Server, Sybase, Xbase

> > > >That being said, it wouldn't be too difficult to produce a 
> >"foundation-3NF"
> > > >template which implemented a normal-form database structure if you 
> >wanted
> > > >to do that.
> > >
> > > Yes, I would like to do that. Any idea of where I should start from ?
> > >
> >
> >No, because I can't help. I won't be using it except where it is
> >appropriate in interfacing to other applications. 8-)
> 
> Interfacing ????
> OK I take that as your final answer. Thanks for your time Mike.
> 
> Cheers,
> Dominique.
> 
> p.s.
> Anybody else who could help on exactly where to look or should I do that all 
> by myself like a big boy :-}
> 

If you do get something going, please be sure to share it here (or at
interchange-core) because I am certainly not the final word on IC any
more. Even if I was, I have always listened if not always nodded. 8-)

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

Prove you aren't stupid.  Say NO to Passport.