[Dev] Units of measurement
jb at integralive.org
jb at integralive.org
Wed Mar 19 11:17:31 GMT 2008
Dear Integra dev'ers,
First post in a long while! I hope you're all well.
I'm just getting back to working on the database/server side of things and
I have a quick question about units in Integra. The way things are at the
moment we can add arbitrary units (e.g. 'Hertz', 'Foobarz') and use these
to define the units for an attribute of a given class in the database e.g.
Oscillator.frequency: unit = 'Hertz', Person.height: unit = 'metres'. The
unit string is stored in a lookup table, and the respective 'id' is stored
in the 'unit' field of the class definition for the given class.
My question is, should we:
1. have a standard set of units (e.g. SI units), which is in the database
in the database's 'initial' state, and only allow people to use those
units?
- the disadvantage of this is that you have a massive list of
(probably irrelevant) units to choose from for every attribute.
However, we could make this nicer by having the most recently used
units at the top of the list.
2. have the units table blank when the database is in its 'initial' state,
and add units as they are needed?
- the disadvantage of this is that to start with we have to enter the
unit details for every attribute that uses a previously undefined
unit. It also means that we could end up with the units 'Hertz', 'Hz',
'Htz' etc. However, we could overcome this by having a set of 'core'
units that we (the Integra developers) agree on, and people have to
submit a request if they want a new (obscure) unit added, which we
then approve.
I favour 2, what do you folks think?
Jamie
More information about the Dev
mailing list