mysql - Are Foreign Keys Dynamically Populated On Insert to Child Table? -
i have incoming traps various clients sent syslog server , automatically inserted below detailed incoming_trap
table. traps processed our software, , before sent out client owners, written below detailed out_trap_queue
table.
one incoming trap might sent multiple destinations, i'm trying tie these such can view if incoming trap processed , sent correctly destinations.
my questions thus: appropriate have inc_trap_id
foreign key in out_trap_queue table
? foreign keys dynamically inserted via code against conditions match child column parent column?
for example, table modifications, insert out_trap_queue
, populating
inc_trap_id = (select it.id incoming_trap inner join out_trap_queue ot (some condition matching 2 traps determined))
the way structured, have code checks records within given timeframe of incoming_trap table
, , verify against out_trap_queue
ensure traps processed , sent out.
do have right idea outline of solution problem? if i've described sounds confusing, please let me know may clarify.
here uml diagram:
)
Comments
Post a Comment