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). 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. Also, you can *always* change your schema before blindly issuing a "tg-admin create" and add those. It wasn't possible when the identity schema wasn't present on your model and you had to "hack" TG's code, but today it is really simple. -- Jorge Godoy <[EMAIL PROTECTED]> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

