Jorge Godoy wrote:
Em Thursday 14 February 2008 01:03:53 Toshio Kuratomi escreveu:Barry Hart wrote:Visit tracking and identity are two separate features, i.e. you can use visit tracking without identity. Visit tracking depends on the first table and identity tracking (a separate Python module which is separate from but logically depends on visit tracking) uses the second.That doesn't answer the question of why no foreign key exists to link visit_identity(visit_key) to visit(visit_key), though. Is there a reason that that link isn't made?Probably optimization for most of the RDBMS servers out there that have a poor performance with a FK of the type VARCHAR(40).
Makes sense.
Also, if for any reason referential integrity is broken and a record is deleted it will simply ask for the user to login again. At least on my schema -- from the beginnings of TG -- user_id isn't mandatory on the tg_identity_visit table, so we wouldn't have any benefit for this relationship besides demanding that both -- user tracking and user authentication -- parts of identity be used, and that isn't always wanted.I'm not sure I follow this though. If the identity_visit table has a foreign key constraint on the visit table then identity cannot be used without visit but visit would still be able to be used without identity. This is just like what is currently enforced via code.
Thanks for the answer! -Toshio
signature.asc
Description: OpenPGP digital signature

