Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What datasize is suitable for storing an RFID column in SQL server?

I'm new to the whole RFID arena.

I need to store an RFID pr asset in the database. No decision has yet been made on what system will feed that particular field (or fields?) so I just want to set aside some space right now.

Oracle has this whole "Identity" package that handles, amongst other things, the different versions and types of RFID, but I havn't seen anything for SQL server.

Perhaps I'm overcomplicating things, but I've searched wide but found no reference to how big such a tag is, or even if it is suitable for being stored in one field, or if you need multiple.

So, what columns should I have, and what should their sizes be? Would nvarchar(10) suffice? nvarchar(20)?

like image 467
Soraz Avatar asked Dec 23 '22 11:12

Soraz


2 Answers

There is no fixed data size for RFID tags. In fact they can store from a few bytes to a few kilobytes. They can even be used to hack into an unprotected system by storing code within them. Thus you should treat any data that you receive from them with the same suspicion that you would do from elsewhere.

As for an identifier that is uniques then if you allocate on the basis of it being no larger than a UUID then you should be OK.

like image 79
ChrisBD Avatar answered Dec 28 '22 11:12

ChrisBD


AFAIK the generation 1 RFID tags are generally 128 bits, where 96 bits are the unique ID and the rest is checksum. But I strongly suspect that newer generations are at least 256 bits and it will continue to grow. I'm by no means an expert, so you may want to wait for another answer:)

So I'd go with a char or varchar of sufficient size, which should be easy to scale later.

like image 25
Jan Avatar answered Dec 28 '22 10:12

Jan