Re: Changing from horizontal to single table inheritance
Re: Changing from horizontal to single table inheritance
- Subject: Re: Changing from horizontal to single table inheritance
- From: Chuck Hill <email@hidden>
- Date: Fri, 04 Oct 2013 17:01:57 +0000
- Thread-topic: Changing from horizontal to single table inheritance
On 2013-10-04 9:09 AM, "Mark Wardle" wrote:
Hi all,
When I originally planned the schema used for our clinical application, I used horizontal inheritance. As use has increased, I perceive that horizontal inheritance will not scale for more and more entities. Perhaps I should spend time measuring the performance
impact, but I am planning on ever increasing the number of child entities (they act as data collection forms) and so I think single-table inheritance is a better fit.
Yes, it is.
I have two questions.
1. Is there an easy way of migrating? I can see that I could set-up a wholly new type of entity / sub entities and then manually migrate old entity data into the new ones. This sounds like a considerable piece of work.
You should be able to migrate the model fairly painlessly. For the data, I think you will end up with a script of INSERT INTO … VALUE SELECT FROM statements.
2. What happens in single-table inheritance if you have a clash of property names but the column name is different (or for that matter the same).
I think that should be OK. EOs can't change entity type so EOF should do the right thing for each sub-entity in terms of moving data to and from the columns.
Chuck
--
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!
|
_______________________________________________
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