in reply to Re^2: Relational table with perl DBI
in thread Relational table with perl DBI
It would be much simpler to forget using numerical keys and just use the $event itself as the primary key. Use a hash to eliminate duplicates like this ;if ($_ =~ /=E-(.*)=event/){ $event = $1; push @event_prepare, $event; }
With regard to the article table, I would use the n value from the filename outputcondord.n.txt as the primary key thus avoiding sorting and synchronising problems as well as making the data in the table more human readable. Your article_event_index would then just need to contain the n value from the filename and the text from the events in that file.if ($_ =~ /=E-(.*)=event/){ $event_prepare{$1} = 1; }
|
|---|