Well the gist is that some of my EOs have (along with normal ones) a set of user-defined attributes: the user can open an appripriate editor and set up something like "my auction will, along with the attributes which the application itself defines, also
three VARCHAR attributes named 'foo', 'bar', and 'bax'; they will have four DECIMAL attributes named so-and-so, etc etc.". These things are stored in the database, and the application then allows to use the dynamic attributes the very same way one can use
static ones (i.e., display them in forms/tables, edit their contents, filter by them, etc.)
Originally, I have solved this through a BLOB, which contains a serialized NSDictionary, which contains all the dynamic attributes by-name.
That works reasonably well, but we bumped into grave efficiency problem filtering such tables: to fetch only items whose attribute 'foo' matches 'John*', we can't do SQL SELECT; instead we have to fetch the whole table, decode all the BLOBs, and filter
by the results. That proved a show-stopper.
Thus, now I have to implement all those dynamic attributes as table columns, so that I can (e.g.) use fetch qualifiers for them.
Thanks and all the best,
OC
So the plan is to have users executing SQL DDLs on the live production database?
You may want to consider something like Postgresql with JSON datatypes
Or if you just love (are stuck with) Frontbase, running an instance of CouchDB and passing data and queries to it via http. Either option seems much safer to me than having end users running alter table statements on the production database.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Help/Unsubscribe/Update your Subscription: