• 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: Changing from horizontal to single table inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing from horizontal to single table inheritance


  • Subject: Re: Changing from horizontal to single table inheritance
  • From: Ramsey Gurley <email@hidden>
  • Date: Sun, 06 Oct 2013 11:08:40 -0700

You need a schema-less approach if you need to create these things at runtime. Relational databases really aren't such a good fit in these cases. You can shoe horn something into a RDBMS with EAV or datablobs, but it won't scale well.

If you're using Postgres 9.2.x or better, there is built in JSON data storage you could use. You can write stored procedures using PLV8, an embedded V8 _javascript_ engine. It's also <flamebait>faster than MongoDB</flamebait> based on what I've read.



On Sat, Oct 5, 2013 at 2:25 PM, Mark Wardle <email@hidden> wrote:
Thanks both,

This advice is all very helpful. I might do some performance measurement to see whether keeping horizontal inheritance is actually causing problems. I think I'm batch fetching which should mean joining on multiple tables and not a SELECT on each and every entity. 

The problem is that with single table inheritance, combining all data forms, I will end up with a database table with 449 columns - which might have its own set of problems!

Out of curiosity, am I going to hit any problems combining approaches? Using single table inheritance when there are many common properties and using horizontal inheritance when the majority of properties are not shared.

What I should do instead is write a generic entity which itself stores a runtime-defined, stored in the database (and modelling in EOF) bunch of properties in an NSDictionary and has logic provided a runtime chosen delegate. Then I could create new data collection forms using a dedicated UI and little overhead. Then we'd just set-up a bunch of D2W rules to ask the generic entity for displayPropertyKeys etc. for the appropriate fake entity. Anyone created fake entities like this either?

Best wishes,

Mark


On 4 Oct 2013, at 19:23, Chuck Hill <email@hidden> wrote:

On 2013-10-04 11:06 AM, "Ramsey Gurley" wrote:

Not to contradict Chuck (he is always right), 

Will someone PLEASE tell my wife?


-- 
Chuck Hill             
Executive Managing Partner, VP Development and Technical Services

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.    
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing Companies in B.C! 

Global Village Consulting ranks 44th in 25th annual PROFIT 500 ranking of Canada’s Fastest-Growing Companies by PROFIT Magazine!

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Email: email@hidden or email@hidden  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166






 _______________________________________________
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: Changing from horizontal to single table inheritance
      • From: Kieran Kelleher <email@hidden>
References: 
 >Re: Changing from horizontal to single table inheritance (From: Chuck Hill <email@hidden>)
 >Re: Changing from horizontal to single table inheritance (From: Mark Wardle <email@hidden>)

  • Prev by Date: Re: WOInstaller.jar throws Exception in thread "main" java.io.IOException: Cannot run program "/bin/ln"
  • Next by Date: Re: error Trying to install mod_WebObject.so into xampp on ubuntu linux
  • Previous by thread: Re: Changing from horizontal to single table inheritance
  • Next by thread: Re: Changing from horizontal to single table inheritance
  • Index(es):
    • Date
    • Thread