The QR Code is a type of two-dimensional barcode that is used to store small amounts of text or data (see Wikipedia). Different sizes and error correction levels of QR barcodes exist to store differing amounts of data with a selectable amount of redundancy.
The implementations in today's mobile phone platforms such as Android can use the contents of a QR code as a URL to open in the phone's Web browser. (Apple iPhones are supposed to be able to read QR codes using the free Semacode software.) Therefore, you can track usage of these barcodes using such tools as web site log analyzers.
Other data formats usable by mobile phones include vCard, which is used to store a person's contact information (see Wikipedia). Unlike URLs, usage of these cannot easily be tracked (i.e. if the user dials the phone number rather than opening a URL embedded inside). Although bare URLs are commonly used with QR code, vCard does have a URL field.
If you want to generate QR codes from your web site, you can use Google Charts (as Adam Straughan says), or you can use one of the many libraries that exist for popular programming languages (for example, http://phpqrcode.sourceforge.net/ for PHP, or http://code.google.com/p/zxing/ for Java) if you wish to do so on your own server. You would have to supply a valid URL or vCard as the text to encode in order for the QR code to be scannable by a mobile phone. Industrial applications differ in what is encoded.
Most likely, you would not store the QR code images themselves in the database. Instead, you would store the URL or other text contained within the barcode so that you can look up necessary information when the barcode is scanned or regenerate the barcode if needed.