I have to manage RFID tags in java storing them into Postgresql and I'm wondering what could be the best way to handle big numeric data.
My tags are 8bytes wide and I have no maths to do with them, just indexing and confronting.
Those IDs are used in a JavaFX app as authentication method and pushed into a remote PostgreSQL via JSON. The RFID itself is used as a key in some tables (mostly logs and tags management).
I'm using json-simple-1.1 and as far as I know (and correct me if I'm wrong) the only numeric type available is long so - again - there would be a lot of bignumeric to string (and viceversa) conversions.
I found these possibilities:
- numeric(20,0) with 20 length and 0 precision coupled with BigInteger
- character(16) [hex representation of 8byte integer] maybe vachar is better?
- bytea
The latter is probably the worst. Since I need to display the code in many interfaces maybe string format is better (it saves me the effort of conversion) but I'm worried about the perfomance drop having to use a textual primary key in a large table...
Any suggestion?