Re: O/R Mapper
- From: "Joanna Carter [TeamB]" <joanna@xxxxxxxxxxxx>
- Date: Fri, 13 Jan 2006 13:44:36 -0000
"Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xxxxxxxxx> a écrit dans le
message de news: xn0eh6pwmd80mm000@xxxxxxxxxxxxxxxxxxxxx
| what the definition of 'best' is in your statement is still vague.
I did not state that my OPF was the best, just that deriving classes from
tables was not the best. Unfortunately, unitl we get a "perfect" OODB, we
will all be working with compromise due to the impedance mismatch between
the two paradigms.
| But, tell me: why is this 'better' ? Of course wacky setups are
| thinkable where there are clear differences, the question is if this
| will bring you any advantage.
Because this is an accurate modelling of the real compositional nature of
such classes; it is not abstracted to "make it fit" a relational database.
| Yes, I know. 3 years full time now and counting.
Heheh, then it should start getting easier now :-))
| Btw I was referring to the model you proposed: add fields / hierarchy
| elements to classes and let a tool propagate the changes to the db.
| (which you seem to declare 'best'). The propagation of changes to the
| db can be cumbersome in a huge schema with lots of data.
As I have already said, I did not say that this method was "the best", just
that it avoids having an object model coerced into a relational one.
| So, your 'superior' mapper always cranks out the proper upgrade
| scripts, and takes into account the full load of the db ? Remember: you
| claimed starting with classes and let the o/r mapper update the db
| according to the changes made to the class model be 'best'. So, 'not
| true', what does that really mean?
We don't write migration scripts, the OPF looks after that for us; since we
wrote the scripting engine.
Our OPF evaluates execution times and attempts to optimise the generated
SQL; if it still can't achieve desired speeds, then we have a facility for
injecting a custom generator for any given type.
Most complex data retrieval that would require joins, etc tends to be for
what I would call reporting classes. IOW, they are complex queries for
something like, how many of a certain product were sold to Mr Bloggs in
2004. For these scenarios, we write a class like ProductSalesSummary and
ensure that the OPF contains a custom query, handcrafted if necessary.
I am not saying that your design doesn't have value; it certainly makes a
quick migration for legacy databases but for new-build projects, we have
found the object-led approach works very well.
Joanna
--
Joanna Carter [TeamB]
Consultant Software Engineer
.
- Follow-Ups:
- Re: O/R Mapper
- From: Frans Bouma [C# MVP]
- Re: O/R Mapper
- References:
- O/R Mapper
- From: Islamegy®
- Re: O/R Mapper
- From: Joanna Carter [TeamB]
- Re: O/R Mapper
- From: Frans Bouma [C# MVP]
- Re: O/R Mapper
- From: Joanna Carter [TeamB]
- Re: O/R Mapper
- From: Frans Bouma [C# MVP]
- O/R Mapper
- Prev by Date: Program icons in the ALT+TAB menu
- Next by Date: Datagridview sort programattically in virtual mode
- Previous by thread: Re: O/R Mapper
- Next by thread: Re: O/R Mapper
- Index(es):
Relevant Pages
|