Re: [Modeling-users] Re: Implementing inheritance through vertical mapping
Status: Abandoned
Brought to you by:
sbigaret
From: Federico H. <fh...@vi...> - 2003-09-26 00:27:27
|
On Thu, 2003-09-25 at 19:18, Sebastien Bigaret wrote: > Not at all! For postgresql e.g., we use dedicated sequences, one for > each inheritance tree; Trying to recall why we didn't go for this approach, I vagely remember that we discarded it in search of database independence... (the exploration of PostgreSQL's inheritance is just meant as a temporary hack, DBMS independence is important to us). But we might reconsider this. > Well, since the siblings get different ids, resolving FKs "simply" means > deep-fetching the inheritance tree to find the related row. I checked the code... and it looks suspiciously simple. You're hiding something from me! :-) I guess there's some cool magic hidden in there, my guess is that objectsForSourceGlobalID has some clever tricks up its sleeve. It's late now, I'll look into it tomorrow. Right now, my sleep-deprived brain can't imagine any other ways of doing it than trying all tables in sequence until you find one that has the record you're looking for, or keeping a table that tracks what table got assigned which key, all of which doesn't sound more efficient than joins... But things may look clearer tomorrow. Sleep is a marvelous thing, when you can get some :-) > Will this allow a second look at horizontal mapping ? ;) You seem to be advocating it very much... Any particular reason? We've been doing the vertical mapping thing with databases that are representative of our target, running on slow machines, and the DB never was the bottleneck. Fede |