Em Saturday 03 May 2008 09:42:35 Cecil Westerhof escreveu: > > There are two possibilities. > The default of the select on my form is something like 'select dog'. When > the user does not select a dog, the value will not be in the other table.
And a NOT NULL constraint would raise an error and prevent that from happening. > Secondly: you should never trust data send to you. When using the form only > the first possibility can happen. But you are never sure that the received > data comes from your form and maybe they put an illegal value. And the database would then raise an error and take care of that for you. I don't see any benefit in doubling the check the database makes, incurring on extra selects, disk access, RAM usage, CPU usage, etc. if the database will do all that again. And if the data comes from an external source, not from your form, then it probably won't have proper error handling, making any message you supply back irrelevant to the application. Data integrity is something that is to be handled and granted by the database. -- 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 -~----------~----~----~----~------~----~------~--~---

