I have done scanning of firstly 1d barcode in java.Now as I am trying to do scanning of 2d barcode. After scanning the 2d barcode I will compare that scanned value with the one in database. I want to know Is their any performance issue if I am storing different length data of 1d and 2d barcode UPC's in different column data types or same column data types?
You can definitely store the values of different barcodes in the same column of a database. If you store them as simple strings/text you'll have an easy time storing and retrieving them for comparison. If you need the barcode as an image again, you should recreate it from the string - you may need an additional column to identify the type of barcode you want though.