简体   繁体   English

如何在Postgres数据库中存储RFID标签数据之类的长数据?

[英]How to store a long data like RFID tag data in a postgres database?

How to store a long data like RFID tag data in a postgres database? 如何在Postgres数据库中存储RFID标签数据之类的长数据? The RFID reader gives the BCD data converted into hexadecimal data of 24 bytes. RFID阅读器将BCD数据转换为24字节的十六进制数据。

Example:cd00320000a4002a00001042 is the converted data given by the reader. 示例:cd00320000a4002a00001042是阅读器给出的转换数据。

There are many possibilities to do that. 这样做有很多可能性。

It somewhat depends on what you want to do with the data. 这在某种程度上取决于您要对数据进行什么处理。

But there seems also to be some confusion on your side: As the hex dump above has 24 digits, it is only 12 bytes worth of data, not 24. Which could be stored as 3 ints, or as string "cd00320000a4002a00001042", or ... 但是您这边似乎也有些困惑:由于上面的十六进制转储有24位数字,因此它只有12个字节的数据值,而不是24个字节。可以将其存储为3个整数或字符串“ cd00320000a4002a00001042”或。 ..

Question: How is the data stored in your java program, ie of what type is a variable where RFID data is stored? 问题:数据如何存储在Java程序中,即RFID数据存储在什么类型的变量中?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM