Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: /!\ What's the best Database Design for such a problem ?

Re: /!\ What's the best Database Design for such a problem ?

From: Kieran <kieran_at_dunelm.org.uk>
Date: Thu, 19 Sep 2002 21:51:05 +0100
Message-ID: <3D8A38B9.6020005@dunelm.org.uk>


Francois Verbeeck wrote:
> Dear all,
>
> I'm facing a common problem but can't find the right solution.
>
> I'm working in a bio-medical center and everyday we receive sample to
> analyse.
>
> Samples can come from
> - human
> - animals
> - others (food, water, gaz, grass, and all you can think that isn't
> human or animal)
>
> and can be of type : blood, plasma, pee, ...
>
> Since each source is totally different and correspond to a specialized
> class, i create something like this
>
> HUMAN (id_human, firstname, lastname, ... )
> ANIMALS (tatoo_number, category, ... )
> OTHERS (id_others, category, description, notes, ... )
>
> SAMPLES (id_sample, volume, id_type, ID_HUMAN_SOURCE,
> ID_ANIMAL_SOURCE, ID_OTHER_SOURCE)
>

Inheritance / sub-typing can be somewhat tricky to model effectively in a relational database.

Alan's suggestion is one good way of doing this, but one other suggestion is:

You can then create views from this - e.g.

Your RDMS may or may not allow you to update and insert into such views, however.

Presumably, you're also going to need to use a similar technique to model different sample types.

Regards,
Kieran Elby Received on Thu Sep 19 2002 - 15:51:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US