The error is most likely on this side of the keyboard, but the
dummy-fks didn't work for me going from mysql to postgres.  Even with
it ticked, postgres got mad about referential integrity.  I didn't dig
into it any further, that's going to be one of the things I do look
into when i set aside some time.

I'm just thinking abstractly, wouldn't something like the following
work for writing to the correct order

Start with a HashSet

Get Record
If has parent 
  get parent
  Is parent in Hashset?
  yes->write record
  no-> does parent have parent?
  ..etc
If does not have parent
  write record


--- "David E. Jones" <[EMAIL PROTECTED]> wrote:

> 
> On Mar 1, 2007, at 1:57 PM, Chris Howe wrote:
> 
> > 2. Data write/load order for hierarchy fk integrity (parent*Id ->
> *Id)
> 
> > I think 2 can be addressed pretty well (of course not 100% fool
> proof)
> > if the output file is written in the right order.
> 
> This is actually not possible to do, ie sorting a graph with loops is
>  
> NP-hard.
> 
> That is why we have the dummy-fks thing, which of course should ONLY 
> 
> be used for a case like this where you are sure that there are no bad
>  
> fk records.
> 
> -David
> 
> 

Reply via email to