there API's available for barcode reader
there is java.comm framework which work with solaris/linux
and for windows platforms there is api called RXTX
though they dont process things for you , but they'll give basic utilities or I/O methods for you external I/O (barcode reader in this case)
for your data base architecture , i suggest you to be ready with all the Class Diagrams and Interaction Diagrams.. you automatically realize the DB Scemas you might be requiring.