• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))


  • Subject: Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 14 Jan 2015 00:12:37 +0000
  • Thread-topic: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))

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 <email@hidden> 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))
      • From: OC <email@hidden>
References: 
 >ERXSQLHelper (From: OC <email@hidden>)
 >Re: ERXSQLHelper (From: Theodore Petrosky <email@hidden>)
 >Re: ERXSQLHelper (From: OC <email@hidden>)
 >Re: ERXSQLHelper (From: OC <email@hidden>)
 >Re: ERXSQLHelper (From: Timothy Worman <email@hidden>)
 >Re: ERXSQLHelper (From: OC <email@hidden>)
 >Re: ERXSQLHelper (From: Chuck Hill <email@hidden>)
 >Migrations (was: ERXSQLHelper) (From: OC <email@hidden>)
 >Re: Migrations (was: ERXSQLHelper) (From: Paul Hoadley <email@hidden>)
 >Model/DB synchronization (was: Migrations (was: ERXSQLHelper)) (From: OC <email@hidden>)
 >Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper)) (From: Paul Hoadley <email@hidden>)
 >Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper)) (From: OC <email@hidden>)
 >Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper)) (From: Ramsey Gurley <email@hidden>)

  • Prev by Date: Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))
  • Next by Date: Aggregating ValidationExceptions in validateForSave()
  • Previous by thread: Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))
  • Next by thread: Re: Model/DB synchronization (was: Migrations (was: ERXSQLHelper))
  • Index(es):
    • Date
    • Thread