[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Vaccine table questions
From: |
Jim Busser |
Subject: |
Re: [Gnumed-devel] Vaccine table questions |
Date: |
Mon, 12 Sep 2011 10:03:54 -0700 |
On 2011-09-12, at 9:09 AM, Karsten Hilbert wrote:
>> Questions:
>>
>> 1) Is it ok for two different clin.vaccine records to be
>> keyed to the same unique branded_drug?
>
> Technically it currently is, yes, but I'll remove that by
> UNIQUEing the fk_brand in clin.vaccine. Thanks for finding
> that hole.
That isn't reasonable because you can have a single product whose substrate
(substance in the vial) is deliverable by more than one route.
If you want to unique the fk_brand in clin.vaccine then remove the id_route as
integer, either
- allow id_route to somehow (varchar?) hold more than one route which gets a
little tricky because the relation to the route table would need to split the
contents of id_route to then cast the substring digists as integers and
concatenate the lookups. or
- normalize it out
Or just allow fk_brand to not be unique, the way you originally had it.
It feels to me ironic that (by the time the schema comes under discussion) you
have so often already gotten it right that it can be hard to persuade you to
change it, where here you are inclined to change it, but I am thinking it is
better that you don't ;-)
-- Jim