[ic] Normalized database for the Foundation demo.

Mike Heins interchange-users@icdevgroup.org
Mon Jul 22 08:49:02 2002


Quoting * * (dominique_kongolo@hotmail.com):
> Hi all,
> 
> I've been testing/evaluating IC the entire week-end for a personal project.
> 
> I'm pretty new to IC and love the product but there is a slight problem.
> 
> This is what I did: I ran a 'makecat mystore' and used MySQL as RDBMS.
> I than went on to test a few things. Filled in my cart, checked out, created 
> a user (with the wrong country information – not on purpose), placed the 
> order, went to the admin section to see the order, edited the user (with the 
> right country information), and then went on to check if the order was 
> updated accordingly… and it wasn't.
> (That's what led me to think that the DB was NOT normalized).

In this case there is a very good reason.

What if the customer changes their address after the order is shipped?
You will have no record as to where the order went -- maybe even where
it should go.

With product descriptions and prices this is even more important.

It is quite possible to build a multiple-address-record userdb
structure and obsoleted-item product database that is 3NF and avoids
this problem. We discussed it when Interchange arose out of Minivend
and judged that was more complicated than our user base wanted to be.
Many users interact with their products database by uploading a
spreadsheet or text file. To work with 3NF, we would have to have
processing filters for all sorts of things, and would probably have to
use foreign key constraints not available for MySQL (or design our own
importers that implemented those).

It would also be possible to build some pseudo-constraints which 
did some updating of transaction/orderline info when a customer
record changed.

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.

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

Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer