[ic] Replacing SQL Databases

Stefan Hornburg Racke interchange-users@interchange.redhat.com
Wed Apr 10 10:49:01 2002


"Jerry Brady" <jrb@bluecircletech.com> writes:

> Racke,
> 
> If your customer is uploading a complete set of data, then you can
> simply reload the entire database.  A customer of mine uploads current
> product data nightly and I wrote a script that creates a new
> "products.txt" file automatically.  
> 
> I have a cron job setup that checks for new data.  If new data is
> present, the script deletes the products.sql file from the products
> directory, installs the new products.txt file and restarts IC.  IC takes
> care of dropping the existing table, creating the new one and adding all
> the rows defined in products.txt automagically.

Yes, that is a good alternative to Mike's suggestion. Thanks !

> 
> You may run into a problem if products that are linked to current orders
> are dropped after the update and I'm not sure how much of a problem this
> would be.

Most of the product data is stored in the orderline table, so that should
be O.K. You have to remove products eventually anyway :-;

> 
> This only works if you customer is sending all of the data with each
> update.  If they are sending deltas or smaller updates (adds/drops) then
> you'll have to build something yourself to let them administer their
> products database remotely. 

Well, my dbs_update script from DBIx::Easy does most of these things, 
but it is a commandline tool.

Ciao
        Racke

-- 
Think of it !

For projects and other business stuff please refer to COBOLT NetServices
(URL: http://www.cobolt.net; Email: info@cobolt.net; Phone: 0041-1-3884400)