Hello, my name is George Bouris.
So, you want to construct unique codes, consisting from fields that completely describe a product.
Although this is doable in C#, using a separate database, a better approach may be writing it in Java, which provides a fast, lightweight, native database (HSQlight), that seamlessly integrates with your application. An additional benefit of using this approach is that it will be cross-platform.
Anyway, I can build it either using C#, in which case I'd suggest using SQLight database, or in Java using HSQlight database.