Hi, quick question. For inventories with very heterogeneous items, what's the best approach? Say a company is keeping different kind of pieces, like memory, hard drives, monitors, but also they could have cables, LEDs, scrap items, etc. So that brings in different specifications. How do you store those? Do you grow your details table by inserting every possible spec? Do you refer it with another table with meta data? Do you store everything as a JSON (horrible, I know, but a temporary solution)?


Thanks in advance.

You can create a spec-description table, which contains an id and a description/title of that spec. In a second table you can match a product with this spec-id and the value of it. The value could be in more columns to represent different datatypes (int, varchar, blob for images, etc.).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.