Re: Units of Measurement in the Database Model
Date: Tue, 16 Apr 2002 21:41:05 GMT
Message-ID: <3CBC99A9.E63DAA2D_at_att.net>
Daniel Dudley wrote:
>
> "David J. Aronson" <dja2001_at_att.net> wrote in message
> news:3CBC3F91.1AF68152_at_att.net...
> > Daniel Dudley wrote:
> > >
> > > "David J. Aronson" wrote in message
> > > news:3CBB21D5.DD95CDAD_at_att.net...
> > > > "John R. Lewis" wrote:
> > > [snipped]
> > > > > 3) UOM Lookup Table in the Data Model
> > > > ...
> > > > > PRO
> > > > ...
> > > > > * Smaller Database size
> > > >
> > > > I don't see how. The overhead of recording each record's
> > > > UOM along with a reference to that record, must be larger
> > > > than not recording it.
> > >
> > > Note that he stated Lookup Table, which implies that only
> > > units registered in that table may be entered in other
> > > UOM columns in othert tables.
> >
> > I think you're thinking of the "foreign key into UoM registry"
> > solution; that was #4. #3 was "separate table stating what
> > the UoM is for each field of each measurement table".
>
> No, David, in your message (see above) #3 is the Lookup
> Table case.
> 3) UOM Lookup Table in the Data Model
>
> This solution would have a table named "UnitsOfMeasurement" that would
> consist of the fields: "TableName", "FieldName", "UnitsOfMeasure".
> When the application is configured for a particular customer, UOM
> choices would be recorded in this table.
> 4) UOM Foreign Key per measurement
>
> This solution would add one additional field per measurement recorded.
> This field would be a foreign key to a lookup table containing all
> possible UOM.
If, as I thought, you were thinking of the "foreign key into UoM registry" case, then I agree with all that you said. It's a wonderfully flexible, simple, and efficient way to go. I "voted" for it originally.
If you really meant the "UoMs are *only* recorded in a separate table, where the measurement record is referenced by table and field" case, then I think we've got some debating to do. Not only don't I see how this way is likely to lead to a smaller database (whether the UoMs vary by record or not), but it seems overly complicated and inefficient, to the point where I really don't see any advantage to it.
-- David J. Aronson, Software Engineer FOR HIRE IN PHILADELPHIA AREA Resume, and other details, online at: http://dja2001.home.att.netReceived on Tue Apr 16 2002 - 23:41:05 CEST
