Hi All,

I have an existing schema which I cannot change which looks similar to
one below.
What this schema does is to map the "receiver" and "sender" to an
EVENT.
"receiver" and "sender" are actually a "Contact" which can consist out
of an INDIVIDUAL and/or ENTITY

EVENT table:
KEY, data1, data2, ...

INDIVIDUAL:
KEY, FK_EVENT_SENDER, FK_EVENT_RECEIVER, data1, data2,....

ENTITY:
KEY, FK_EVENT_SENDER, FK_EVENT_RECEIVER, data1, data2,....

Of the foreign keys exactly one is not null for a given row.
So for a given structure the result should be

event.Sender = contact1 (a "Contact")
event.Receiver = contact2 (a "Contact")

contact1.Entity = entity1 (using ENTITY.FK_EVENT_SENDER)
contact1.Individual = indiviual1 (using INDIVIDUAL.FK_EVENT_SENDER)

contact2.Entity = entity2 (using ENTITY.FK_EVENT_RECEIVER)
contact2.Individual = indiviual2 (using INDIVIDUAL.FK_EVENT_RECEIVER)

If the schema was open to discussion I would have used a CONTACT table
but this is not an option here.
My fallback idea is to use something like "Receiver : Contact" and
"Sender : Contact" just as marker classes (which I don't like but
could work)

Any help how I can do this will be greatly appreciated.

Kindest regards,
Victor

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to