What I need:
I am developing a backend for a product library that must meet the following requirements:
Several editors will simultaneously edit different elements - there must be some kind of lock at the element level.
Wildly changing properties of an element - there are about 100 subcategories, each of which can have 10+ properties of an object specific to itself.
The entire repository of elements must be a version - several changes can be made (insert, change and delete) before publishing the entire set of changes on the site; non-publication should be possible.
I should be able to search for all properties and filter some of them - that is, find a keyword anywhere in the library or find all products that meet a set of criteria - within a data set of at least 10 MB (i.e. 5000 items , 2 KB each) and possibly twice as much.
The solution should be either MySQL-specific or, even better, a sales agent.
What I thought:
I am considering using one large XML object with all the elements (to satisfy 2 ) stored in the database (to satisfy 3 ), but this makes 1 impossible and 4 difficult. I used to use something like this, but with smaller XML objects and no element-level locking.
Another solution that I am considering is a classic database solution using a separate table for each subcategory, which makes 1 and 2 trivial, but 3 and 4 are quite complicated. This is also a bit cumbersome given the number of different subcategories and therefore the number of different tables in the database, but I think it can be automated.
Another possibility is a hybrid between two, with one large database table of all elements. Each row will contain an XML object with all the properties of the element and additionally all filtered properties in the form of table fields. This solves 1 , 2 and partially solves 4 , but does not perform a full-text search and still makes 3 quite difficult to achieve.
If you have done this so far:
I will probably have several weeks to resolve this, which should leave enough time for discussion. I will be very grateful for any thoughts and ideas that the SO community can provide. Thanks in advance.
source share