I was searching for an application to manage (electrical) components that complies with the following criteria:
- open source
- has a purchase-history
- allows filtering for type-specific attributes (abstract example: two categories A, B exist; following attributes belong to them: A.a, B.b, A.c, B.c; when choosing one category it should be possible to filter for those category specific attributes a or b)
- must: linux, optional platform-independant
Here is an extraordinary example: http://uk.farnell.com/
And with a sample-search: filters applied
I didn't find a program that meets the criteria and so tried to build a webapplication myself.The problems arose when trying to find a database-layout.
Here some thoughts:
-> use a table for each category, subcategory, sub-subcategory, ...
-> the most specific subcategory for a part has a reference to this part (that is in a part table)
I could not figure out if/how it is possible then to dynamically add new categories without changing all the SQL queries. My idea was then to have a name-schema that allows me to write some code that analyzes those names and creates the query on the fly but that feels quite hacky.
Maybe someone has a reference to a database example or some tips? (further information can be found in the edit-history, i deleted it because it blows up the post too much)