[BioSQL-l] columns in compound keys
Aaron J Mackey
ajm6q at virginia.edu
Sat Mar 15 13:14:02 EST 2003
I'm happy for rank to have NOT NULL DEFAULT 0
Along the same lines, it'd be great to have a composite key UNIQUE
constraint on rank and the appropriate foreign key(s).
-Aaron
> Fri, 14 Mar 2003, Hilmar Lapp wrote:
> I changed the version columns in dbxref and bioentry to be NOT NULL and
> added a comment stating what to put there if you don't have a version
> and how to interpret a version of 0 (zero).
>
> Related to this, what are peoples' feelings about adding NOT NULL to
> the various 'rank' columns that participate in a compound unique key
> (with the same default convention if there is no sensible rank)?
>
> I don't have a strong opinion about that since in all those cases I
> made sure I do assign a rank in the adaptor code before insert, because
> I ran into trouble without doing so, which means I got different
> behaviour between different RDBMSs (something that was fine on one
> threw a UK violation on another). So, for the same reasons I'd strongly
> recommend that adaptor developers define a version anyway, regardless
> of whether the schema leaves it optional. So, one might just as well
> demand it in the schema.
>
> -hilmar
>
--
Aaron J Mackey
Pearson Laboratory
University of Virginia
(434) 924-2821
amackey at virginia.edu
More information about the BioSQL-l
mailing list