On 2013/11/19 08:37, Nico Williams wrote:
More generally however, it's clear that a unique constraint is not necessary to make rowid-less tables work (see the MySQL example), SQL doesn't require unique constraints, and it's not clear that just because you (or I) lack imagination that unique constraints ought to be required. On the contrary, SQLite3 has never required a unique constraint -- the rowid is an implementation detail, one that turns out to not be necessary. Nico --

I think you misunderstand me - I am definitely sure that unique-key-less datasets can be useful and minimising the cpu cycles to deal with them is a good idea. I do think these are fringe-cases though. You however argued that SQLite should drop the unique constraint requirement - which led me to lament the virtues of unique constraints - as opposed to declaring them essential for all datasets.

I also do not think (or imagine) that unique constraints "ought" to be required - I am saying that in the case of SQLite or any mainstream RDBMS it becomes necessary to have some unique reference to single out a row should you wish to adjust it somehow (often, adjustment are not required, such as for logs), and that (because of that) it is good that SQLite decided to have rowids, if a little archaic. It's even better with the new optimisation being possible, and certainly to keep all admin things working as it should, I do not think it should drop the requirement.

This is very different to your suggestion that you (or I) may lack the imagination to fathom a unique-constraint-less arena - I'm sure anyone can name a couple use cases off-hand - but I would like SQLite to not drop the requirement altogether.

This is a statement of considered outcomes though, not a lecture of dogma. If the efficiency gains can be shown to be significant, then I will change my mind very quickly.

(Let me add: ... and very much appreciate the efforts of whomever took the time 
to study and show such.)

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to