Yes, modifying the database seems a little dangerous here.  Take a look at our 
Virtual Tables framework:
http://www.global-village.net/chill/gvc_frameworks

Chuck


On 2015-01-13, 3:55 PM, "Ramsey Gurley" wrote:


On Jan 13, 2015, at 8:26 AM, OC <o...@ocs.cz<mailto:o...@ocs.cz>> wrote:
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

http://www.pgcon.org/2014/schedule/attachments/328_9.4json.pdf

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.
Webobjects-dev mailing list      
(Webobjects-dev@lists.apple.com<mailto:Webobjects-dev@lists.apple.com>)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/chill%40gevityinc.com

This email sent to ch...@gevityinc.com<mailto:ch...@gevityinc.com>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to