On Saturday 10 November 2001 01:00 pm, you wrote: > Kodrik wrote: > > Understand also that the check for a uniq index has to be made by a call > > to the DB so it makes sense the DB does it, but a check on the content of > > a variable can be made by one line of code without any call to the db. > > Anything that the database does, one can also do in code. I could make > sure a column is unique by checking it in code before inserting or > updating values, but I prefer that it is done in the database with a > unique index because this centralizes it. For the same reason, I prefer > having NO DEFAULT in the database, because this centralizes the check > and avoids errors.
I said "one line of code without any call to the db". You cannot make sure a column is uniq without a call to the db. And for lack of a feature that you can and should do anyway from code, you state "The lack of this feature is by far the worst thing about MySQL." Can you do these with one line of code without a call to the DB: * Transaction * Subselects * Foreign keys * Stored Procedures If you can, you are my God. Do you actually believe that the lack of NO DEFAULT is much worst than those features above, which cannot be as easily worked around? Why did you make that extreme statement? What was the purpose for it? --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php