Subj : Nodediffs & db:s
To   : Jan Vermeulen
From : Jesper S�rensen
Date : Mon Jan 06 2003 10:34 pm

js>> The problem is how do you know what data to add, update or delete?

JV>     Diff-files tell you which records to add, which to replace, which
JV> to delete and which to leave alone.

Well, yes, but the "records" are lines (nodes, hosts, regions, comments, errors
etc.) in the text file nodelist, and the diff is useless if you don't have the
original file. You don't know if the record to delete is a node (and its full
node number if so).

js>> The diffs don't say "add 2:204/255..."; they say "copy (ignore) 17
js>> lines", "delete 3 lines", "add the following 4 lines" and so on, so
js>> you still need to have the original nodelist to be able to resolve
js>> the diff into something useful. :-(

JV>     You are expected to work on complete records that have been
JV> arranged in a given order -- what are you planning to do to the data
JV> that you can't locate your records anymore?

I'm importing the data into a db table and use the Fidonet address as the
primary key (but it's also indexed on e.g. sysop name & location for faster
searches). I'm perfectly able to locate the data, just not via the line number
the node had in the original nodelist (which would be a pita to work with since
it's likely to change every week).

I'm sure it would be possible to make the table an exact copy of the nodelist
file (with line numbers and everything) but it would be a very complex thing to
work with and most db designers would probably start crying if they saw it.
It's simpler to truncate the table and reload the entire nodelist from the
updated file.

JV>     Do you want to scatter your data all over the place without
JV> creating an index file or what?

Of course not.

If you know of a magic way to convert the nodediffs into SQL
insert/update/delete commands please tell me how, but if you would try this
yourself I'm sure you'd see the problem.

 Jesper,
 [email protected]
---
* Origin: Singularity/2 - Swedish Internet Backbone (2:204/255)