lundi 28 mars 2016

Database design for barcode ranges

I’m working on a shipping system for our warehouse. Basically what I’m trying to accomplish is, taking a number from a barcode range, and assigning it to a shipping order.

The ranges are given by our partner couriers periodically and they are usually not consecutive, e.g. 9000000-9009999, 9020000-9029999. Each number in a range should be used only once.

Currently the range is hardcoded in the script and the current index is stored in a file. (legacy implementation)

But I feel it's proper to have an interface where even non-programmers can manage ranges, monitor the status of each range (e.g. which one is currently “active”, what’s the current index, etc). And when the current range runs out, it should automatically switch to the next range available. Below is the UI design I came up with. barcode ranges management interface

Do you think it's a good idea to store the range data in the database? If so, how should I design the database table?

Some other things to be taken into considerations are:

  • Some ranges are recycled by the courier, so there is a chance we receive the same range twice.
  • Most of the time a range can last 4 months to 6 months, so there won’t be so many ranges.
  • When a range is finished, it’s basically useless?



Aucun commentaire:

Enregistrer un commentaire