use qr codes to store information in a database use qr codes to store information in a database database database

use qr codes to store information in a database


In general that certainly is possible. Actually every QRCode / barcode stores information. But usually the size of that information is pretty small. Typically only references like URLs or numbers (IDs) are stored and the 'real' data is retrieved from a database using those references. But strictly speaking that is a form of storing information in a QRCode / barcode.

Looking closely we see that the data is stored in the code itself, not inside a database if we are talking about that small amount of data. Certainly that data can be stored inside a database when the code is read, all you need is a trivial piece of software. But that makes little sense in most cases, since the data already is stored. If you want to use a database to combine data from different sources, so if you only want to use codes as a means of transport, then reading the codes is just a replacement for typing the information in with a keyboard. So no magic here, nothing code specific you have to consider.

If you are talking about bigger amounts of data, then you have to use other types of codes. The one I like most are dataglyphs. They even provide a pretty big fault tolerance.


QR-codes can only store information. Common use of QR-codes is to store an URL to a specific page within the QR-code matrix. The QR-code may then be read with a smartphone app. It is the app itself that will identify the contents of the QR-code as an URL.

In your case it would be possible to encode receipt information into the QR-code and then, via a specialized reader app, read and interpret the contents of the QR-code and make the app store it into a database.


In essence, a QR code is just a certain way to represent information. In itself, the QR code will never interact with a database.

However, it would be fairly trivial to put the information you mention into an http request which you encode in a QR code. Whenever someone would then scan the QR code it could send this information to a web service which would store the data in a database.

Alternatively you could create your own scanning app which simply reads the data from the code and connects to a database, it all depends on how much control you have over the environment and how accessible you want everything to be.