On Sunday 17 November 2002 19:10, Michael Wang wrote: > The following DDLs on slide "JDBC HOW TO" page for MySQL: > > " > create table objects(uri blob not null, primary key uriIndex (uri(255)), > classname blob); > create table revisions(uri blob not null, primary key uriIndex > (uri(255)), isversioned int, initialrevision varchar(10) ); > " > > are logically incorrect, I think. It enforces the uniqueness > on the first 255 bytes of "uri" of the type BLOB, while the uniqueness > is only required on the entire "uri" column. The primary key > would reject valid "uri" rows.
This would be really bad. [..] > For this reason, and the reason I mentioned above, the "primary key" > should be replaced by "key" in the DDL statements. What is the difference between 'key' and 'primary key' except, that a 'key' might be null? Both must be unique. So I would expect the same problems. Martin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
