m x n relation, how to do efficiently designtime.
Posted: 01.07.2010, 08:49
I've a m x n relation decoupled using a 3rd table.
So Person and Contact have a m x n relation, decoupled by having a table "PCconnect" that has a reference to the IDs (PK) of each of the other two.
I looked in the examples of both 6 and 7, and could not find an example or something that has such relation.
I've only done serverside access, so while I'm not very familiar with designtime components, SQL is no problem.
I tried working from a dbgrid that joins these three tables together for a certain person.ID, with wired tdbedit etc controls, but don't know how to handle update/insert. Should I work from a tzupdate component and not tzquery?
Compiler D2009 (*)
Zeos 7, but this is more about general approach, I do not expect a ready made code.
db postgres 8.x
(*) yes, eat own dogfood etc, but this is for work
So Person and Contact have a m x n relation, decoupled by having a table "PCconnect" that has a reference to the IDs (PK) of each of the other two.
I looked in the examples of both 6 and 7, and could not find an example or something that has such relation.
I've only done serverside access, so while I'm not very familiar with designtime components, SQL is no problem.
I tried working from a dbgrid that joins these three tables together for a certain person.ID, with wired tdbedit etc controls, but don't know how to handle update/insert. Should I work from a tzupdate component and not tzquery?
Compiler D2009 (*)
Zeos 7, but this is more about general approach, I do not expect a ready made code.
db postgres 8.x
(*) yes, eat own dogfood etc, but this is for work