Simon Slavin wrote: > But what is the purpose of collating a column ? Why, to allow it to be > indexed, of course. And for it to be indexed every value in the column must > be comparable to every other value. So it might be sufficient to simply > declare the column as having a language: > > ALTER TABLE ADD COLUMN familyname UNICODE LANG Deutsche > > Actually, we'd probably use ISO 639-3: > > ALTER TABLE ADD COLUMN familyname UNICODE LANG deu > > That would be sufficient to allow the standard SQL functions like indexing > and comparison to be implemented. The column 'language' could perhaps be > absolute, or perhaps be used as a default if the individual values did not > declare a language. On the other hand, it might perhaps not be necessary to > declare the language for each column: it's likely that all columns for any > database would want to use the same language for collation. >
Note that some countries have different collations depending on the objective of the output. For example, dictionary order may be different from phone-book order and different from other general listing order. But your idea can still be useful as an optimization for the general case (specially for locales where there is no difference). For me, collation is at the same level as the presentation level. At the same time we decide how we format the numbers (number of decimal places), dates (yyyy-mm-dd, mm-dd-yyy, dd-mm-yyyy), etc, is when we decide the order of the items to show (the order the user viewing the data expects). Regards, ~Nuno Lucas _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users