Subject | Re: [firebird-support] Error : "There is at least one record with same fields values " |
---|---|
Author | Nando Dessena |
Post date | 2006-09-25T21:04:43Z |
Dany,
D> IMHO a tool like IBExpert or any DB admin tool should not have the same
D> goal as a UI client for users. If my application (that my clients use)
D> finds I missed a PK it will collect the RBD$DB_KEY. If IBExpert did that
D> too, I would run the risk as a developer to miss these kind of things.
D> Of course there are ways for a tool to notify, but I prefer my tool
D> shows more of what is going on under the hood on the server than doing
D> smart things.
one could say that trying to use all fields to compose the update
statement (as the reported error message seems to imply) is as
tentatively smart as trying to use the db_key. Only less effective,
given the outcome.
There are so many design mistakes you can make designing a database -
a tool that checks the database structure and hints at possible
problems would be a good idea. Counting, for the same purpose, on an
update error while trying to update a row that is identical to another
one is just silly. Not to mention that, if you issue a delete command
instead, it'll happily delete the whole bunch. I'm sure that in this
particular case you'll want your preferred tool to play smarter and
check the count of affected rows.
Finally, once your preferred tool has notified you that you're fried
because you forgot to define a PK, how are you going to solve it since
it doesn't allow you to remove the duplicates easily? I think that
tools are meant to help me, not just constantly remind me what a fool
I am. My woman is quite adequate for that. :-)
Ciao
--
Nando Dessena
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================
D> IMHO a tool like IBExpert or any DB admin tool should not have the same
D> goal as a UI client for users. If my application (that my clients use)
D> finds I missed a PK it will collect the RBD$DB_KEY. If IBExpert did that
D> too, I would run the risk as a developer to miss these kind of things.
D> Of course there are ways for a tool to notify, but I prefer my tool
D> shows more of what is going on under the hood on the server than doing
D> smart things.
one could say that trying to use all fields to compose the update
statement (as the reported error message seems to imply) is as
tentatively smart as trying to use the db_key. Only less effective,
given the outcome.
There are so many design mistakes you can make designing a database -
a tool that checks the database structure and hints at possible
problems would be a good idea. Counting, for the same purpose, on an
update error while trying to update a row that is identical to another
one is just silly. Not to mention that, if you issue a delete command
instead, it'll happily delete the whole bunch. I'm sure that in this
particular case you'll want your preferred tool to play smarter and
check the count of affected rows.
Finally, once your preferred tool has notified you that you're fried
because you forgot to define a PK, how are you going to solve it since
it doesn't allow you to remove the duplicates easily? I think that
tools are meant to help me, not just constantly remind me what a fool
I am. My woman is quite adequate for that. :-)
Ciao
--
Nando Dessena
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================