Re: Recording an ISO-639-1 language code



On Sun, 24 Jun 2007 20:32:27 GMT, Haggis McMutton
<haggis@xxxxxxxxxxxxx> wrote, quoted or indirectly quoted someone who
said :


There would obviously be need for a function that converts between the
two, is it better to do this or just record it as a string?

You can store it in one byte as an int, or 32 bits as a fixed length
character pair, even longer for a string since you need a length.

It really depends on how many of these you have. If you have a
database of millions of records it might be worth sweating over. Most
likely there are tens of thousands of things more deserving of such
detailed attention.

Consider that you can't do much interesting with ad-hoc SQL queries in
int form.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.



Relevant Pages

  • Re: java.util.Properties extending from HashMap instead of HashMap
    ... It's sort of useless to speculate why Sun did that, since everyone over there admits it was a mistake for Properties to inherit from Hashtable. ... Given the simplicity of the code fix, plus the ability to compile using "-source 1.4" until the source can be corrected, I would bet that Sun would consider the benefit of additional error checking to outweigh the inconvenience of source changes during the developer's transition to Java 5. ... You cannot make conclusions about how to use Provider based on Properties' documentation, and you cannot make conclusions about Properties based on Hashtable's documentation. ... either an or a <String, String> version, and the parameters are never cast - the raw type accepts Objects only. ...
    (comp.lang.java.programmer)
  • Re: JTextArea
    ... set to a bull string, ... TextArea is '' ... Sun has decided that even if the String ... No exception needs to be thrown, ...
    (comp.lang.java.programmer)
  • Sun C++ : Unexpected type Badly formed expression using String
    ... I'm using a string in the following form in my CORBA IDL declaration ... Solaris, with Sun C++, I'm getting the following error: ... line 389 Error: Badly formed expression. ...
    (comp.lang.cpp)
  • Re: Air filter and mpg.
    ... On Sun, ... > I haven't read all the posts in this string ... sharing it with us. ...
    (rec.autos.makers.chrysler)
  • Re: Recording an ISO-639-1 language code
    ... even longer for a string since you need a length. ... detailed attention. ... Consider that you can't do much interesting with ad-hoc SQL queries in ... int form. ...
    (comp.lang.java.help)