Hi,
Sorry if I'm asking this question in the wrong forum, its either SQL or programming and probably a bit of both. I've been trying to work out the best way to do this and would appreciate any advice. Basically I need to have a flag/indicator attribute and am not clear of :-
a) the best place/table to put it in.
b) how this gets updated to show correct value
say I have two tables:-
[tt]CONTACT
contactId
....etc
PLACEMENT
placementId
contactId (FK)
startDate
endDate[/tt]
I need an idicator to show if a contact has an active placement which could be derived from the placement.startDate
The thing is the indicator is to be used for the contact detail, so which table should it go in?
Also how will it get updated. If it goes in the Placement table it will have an initial value of N as no endDate will initially be supplied, when the endDate is updated with a value then the indicator can be updated to Y as well but if no further update is done how will it be updated to show that the placement has expired (X)?
But if it goes in the contact table how will changes to the Placemnt records be reflected? Will this require two seperate updates?
I hope this makes sense.
Sorry if I'm asking this question in the wrong forum, its either SQL or programming and probably a bit of both. I've been trying to work out the best way to do this and would appreciate any advice. Basically I need to have a flag/indicator attribute and am not clear of :-
a) the best place/table to put it in.
b) how this gets updated to show correct value
say I have two tables:-
[tt]CONTACT
contactId
....etc
PLACEMENT
placementId
contactId (FK)
startDate
endDate[/tt]
I need an idicator to show if a contact has an active placement which could be derived from the placement.startDate
The thing is the indicator is to be used for the contact detail, so which table should it go in?
Also how will it get updated. If it goes in the Placement table it will have an initial value of N as no endDate will initially be supplied, when the endDate is updated with a value then the indicator can be updated to Y as well but if no further update is done how will it be updated to show that the placement has expired (X)?
But if it goes in the contact table how will changes to the Placemnt records be reflected? Will this require two seperate updates?
I hope this makes sense.