Re: EOF inheritance

2009-09-08 Thread Mike Schrag
- Depending on the DB you use, you have to have tables for abstract entities (e.g. in Frontbase you need a table for the root entity, as PK generation relies on it) That shouldn't be the case as that (== defining an external name for the parent entity==) is vertical inheritance. And that soun

Re: EOF inheritance

2009-09-08 Thread Lachlan Deck
On 08/09/2009, at 5:11 PM, Timo Hoepfner wrote: single table inheritance always worked fine for me. Random things to watch out for: - Be careful with NOT NULL constraints. Only make the columns in the DB NOT NULL, when it must be NOT NULL in the *whole* inheritance hierarchy (In Chuck and

Re: EOF inheritance

2009-09-08 Thread Jon Nolan
ad of inheritance, I try to apply the Strategy design pattern. This usually results in a database table that is similar, if not identical, in design to a single-table inheritance database table, ie., it has a "type" field, usually an integer, however the EOModel has no EOF inheritance

Re: EOF inheritance

2009-09-08 Thread Kieran Kelleher
an integer, however the EOModel has no EOF inheritance artifiacts. The versatility and simplicity of Strategy design pattern is more desirable and easier to maintain and extend IMHO ... very easy to add new behaviours. (or in American English "behavior") I will try to summariz

Re: EOF inheritance

2009-09-08 Thread Timo Hoepfner
Hi, single table inheritance always worked fine for me. Random things to watch out for: - Be careful with NOT NULL constraints. Only make the columns in the DB NOT NULL, when it must be NOT NULL in the *whole* inheritance hierarchy (In Chuck and Sacha's most excellent book, there is a s

Re: EOF inheritance

2009-09-07 Thread Ken Anderson
We use horizontal in a lot of places - I would avoid vertical. We're planning on converting horizontal inheritance to single table in places where the subclasses are very similar for performance reasons. On Sep 7, 2009, at 4:56 PM, Simon McLean wrote: Yeah, we use single table all over the

Re: EOF inheritance

2009-09-07 Thread Simon McLean
Yeah, we use single table all over the place. works perfectly. simon 2009/9/7 Travis Britt : > > On Sep 6, 2009, at 7:18 PM, Jon Nolan wrote: >> >> I now have a project which begs for it.  What say you?  Do you use >> inheritance or is my gut feeling correct in telling me to keep on staying >> aw

Re: EOF inheritance

2009-09-06 Thread Chuck Hill
On Sep 6, 2009, at 7:45 PM, Jon Nolan wrote: Travis Britt wrote: On Sep 6, 2009, at 7:18 PM, Jon Nolan wrote: I now have a project which begs for it. What say you? Do you use inheritance or is my gut feeling correct in telling me to keep on staying away? Which type? I use single table

Re: EOF inheritance

2009-09-06 Thread Jon Nolan
Thanks gents. I'm sold. Lachlan Deck wrote: On 07/09/2009, at 10:01 AM, Mike Schrag wrote: i also use single table all the time ... it's easy and predicable. vertical is just asking for complications. you can make vertical work, but it's just trickier. Yep - what he said. Lots of people us

Re: EOF inheritance

2009-09-06 Thread Lachlan Deck
On 07/09/2009, at 10:01 AM, Mike Schrag wrote: i also use single table all the time ... it's easy and predicable. vertical is just asking for complications. you can make vertical work, but it's just trickier. Yep - what he said. Lots of people use horizontal inheritance too. (I do use vert

Re: EOF inheritance

2009-09-06 Thread Mike Schrag
i also use single table all the time ... it's easy and predicable. vertical is just asking for complications. you can make vertical work, but it's just trickier. On Sep 6, 2009, at 7:45 PM, Jon Nolan wrote: Travis Britt wrote: On Sep 6, 2009, at 7:18 PM, Jon Nolan wrote: I now have a proje

Re: EOF inheritance

2009-09-06 Thread Jon Nolan
Travis Britt wrote: On Sep 6, 2009, at 7:18 PM, Jon Nolan wrote: I now have a project which begs for it. What say you? Do you use inheritance or is my gut feeling correct in telling me to keep on staying away? Which type? I use single table inheritance all the time and it works perfectly.

Re: EOF inheritance

2009-09-06 Thread Travis Britt
On Sep 6, 2009, at 7:18 PM, Jon Nolan wrote: I now have a project which begs for it. What say you? Do you use inheritance or is my gut feeling correct in telling me to keep on staying away? Which type? I use single table inheritance all the time and it works perfectly. I have no real-wo

EOF inheritance

2009-09-06 Thread Jon Nolan
I haven't used inheritance in years. My experience was that the hassles you faced far outweighed the benefits of elegance of design. I now have a project which begs for it. What say you? Do you use inheritance or is my gut feeling correct in telling me to keep on staying away? Thanks, Jon _

Re: EOF Inheritance problems help

2007-05-18 Thread Alan Ward
we do this. Alan On May 18, 2007, at 11:43 AM, Chuck Hill wrote: On May 17, 2007, at 11:21 PM, Lachlan Deck wrote: Hi there, first up, can inheritance cross model boundaries? i.e., if I have ModelA and ModelB both of which have different connection dictionaries (to different databases

Re: EOF Inheritance problems help needed

2007-05-18 Thread Chuck Hill
On May 18, 2007, at 2:31 AM, Lachlan Deck wrote: Okay, I've made some progress, simplified the model, but there's one final problem that's a bit baffling: - the foreign key ('clientId') is not being given a value in the sql. So I have an abstract parent called Taggable with various kids. Ta

Re: EOF Inheritance problems help

2007-05-18 Thread Chuck Hill
On May 17, 2007, at 11:21 PM, Lachlan Deck wrote: Hi there, first up, can inheritance cross model boundaries? i.e., if I have ModelA and ModelB both of which have different connection dictionaries (to different databases) can EntityB in ModelB inherit from EntityA in modelA? I _think_

Re: EOF Inheritance problems help

2007-05-18 Thread Lachlan Deck
Hi there, On 18/05/2007, at 8:25 PM, Ken Anderson wrote: Maybe others could chime in more, but one thing I know is that EOF will use the top entity in the hierarchy to get the primary key so that all sub-entities have unique keys. That part I have no problem with. The primary key is being

Re: EOF Inheritance problems help

2007-05-18 Thread Ken Anderson
Lachlan, Maybe others could chime in more, but one thing I know is that EOF will use the top entity in the hierarchy to get the primary key so that all sub-entities have unique keys. This is pretty necessary if you're going to have a relationship to the super-entity (otherwise, the forei

Re: EOF Inheritance problems help needed

2007-05-18 Thread Lachlan Deck
Okay, I've made some progress, simplified the model, but there's one final problem that's a bit baffling: - the foreign key ('clientId') is not being given a value in the sql. So I have an abstract parent called Taggable with various kids. Taggable (Abstract, vertical inheritance) id

EOF Inheritance problems help

2007-05-17 Thread Lachlan Deck
Hi there, first up, can inheritance cross model boundaries? i.e., if I have ModelA and ModelB both of which have different connection dictionaries (to different databases) can EntityB in ModelB inherit from EntityA in modelA? If the answer is no then the below is irrelevant - but if yes,

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-03 Thread Ray Kiddy
On Jul 2, 2006, at 10:01 AM, Mr. G Brown wrote:Hello,I have a few questions about inheritance, thanks if anybody can help.The parent class would be a Patient, or more accurately, a PatientAlias, because with typos, name changes (marriage or otherwise) information about the same human being could ap

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Guido Neitzer
On 03.07.2006, at 4:34 Uhr, Mr. G Brown wrote: a VerifiedPatient 'is a' PatientAlias , (a special alias, which is why I asked about inheritance), AND 'has a' to many relationship with objects of its parent class (PatientAliases). Of course it will work to have a VerifiedPatient table and

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Ian Joyner
On 03/07/2006, at 12:34 PM, Mr. G Brown wrote:On Jul 2, 2006, at 8:55 PM, Ian Joyner wrote:On 03/07/2006, at 7:27 AM, Mr. G Brown wrote: Yes,A VerifiedPatient would be a  subclass of a PatientAlias (from a Java perspective); they would have many properties in common, methods, validations, etc. A Ve

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Jerry W. Walker
Hi, G. Brown, Although there are a couple known problems with EO inheritance, generally, it is fairly reliable. I don't see any problems with using inheritance here. I'm presuming definitions something like the following: PatientAlias name address city state zip te

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Mr. G Brown
On Jul 2, 2006, at 8:55 PM, Ian Joyner wrote:On 03/07/2006, at 7:27 AM, Mr. G Brown wrote: Yes,A VerifiedPatient would be a  subclass of a PatientAlias (from a Java perspective); they would have many properties in common, methods, validations, etc. A VerifiedPatient would link (from a SQL perspecti

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Ian Joyner
On 03/07/2006, at 7:27 AM, Mr. G Brown wrote: Yes, A VerifiedPatient would be a subclass of a PatientAlias (from a Java perspective); they would have many properties in common, methods, validations, etc. A VerifiedPatient would link (from a SQL perspective) to many PatientAliases, and und

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Mr. G Brown
Yes,A VerifiedPatient would be a  subclass of a PatientAlias (from a Java perspective); they would have many properties in common, methods, validations, etc. A VerifiedPatient would link (from a SQL perspective) to many PatientAliases, and under each PatientAlias there would then be links to inform

Re: EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Ken Anderson
Mr G. Brown,I think it would be necessary to understand your object model a little more before being able to recommend if/how to use inheritance.  At the moment, I really don't see any entities you have that are good candidates for inheritance, unless I'm misunderstanding your problem.  It seems to

EOF Inheritance, Relationships between super class and subclass

2006-07-02 Thread Mr. G Brown
Hello,I have a few questions about inheritance, thanks if anybody can help.The parent class would be a Patient, or more accurately, a PatientAlias, because with typos, name changes (marriage or otherwise) information about the same human being could appear, does appear, under several PatientAliases