﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Andrey Shchekin commented on The fallacy of IRepository</title><description>__The only way of doing this with RDBMS is using joins (in a single statement), which is going to cause Cartesian product, which is expensive in the DB and have to be dealt with in the app layer.
  
  
Why does it "have to be dealt with in the app layer" ? If you have either .SelectMany() from Repository or some way to say that you want to preload all posts/comments (considering that you do want to preload them and lazy load does not work well enough), why should the app layer care about how the Repository does it?
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment19</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment19</guid><pubDate>Mon, 17 Nov 2008 07:34:26 GMT</pubDate></item><item><title>Andrew Peters commented on The fallacy of IRepository</title><description>Tobin,
  
  
Yeah, this could just be some loose terminology.
  
  
Extremely jealous of your guitar setup!
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment18</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment18</guid><pubDate>Sun, 16 Nov 2008 23:46:59 GMT</pubDate></item><item><title>Tobin Harris commented on The fallacy of IRepository</title><description>@Andrew
  
  
Thanks. Wouldn't an outer join just ensure rows are return even if a join condition is not satisfied? it wouldn't result in a cartesian product would it? Maybe I need to hit the SQL books again!... 
  
  
Heard the news about Microsoft btw, congrats :)
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment17</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment17</guid><pubDate>Sun, 16 Nov 2008 23:09:14 GMT</pubDate></item><item><title>Andrew Peters commented on The fallacy of IRepository</title><description>@Tobin,,
  
  
It's because he's referring to an Outer Join.
  
  
@Ayende,
  
  
Sure, but it is a single _call_. And, one that returns much less redundant data and can span a wider/deeper load graph.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment16</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment16</guid><pubDate>Sun, 16 Nov 2008 22:58:07 GMT</pubDate></item><item><title>Tobin Harris commented on The fallacy of IRepository</title><description>I thought that a query with join conditions isn't a cartesian product? Basically, I thought the cartesian product would be this:
  
  
select * from Blog, Post
  
  
  
  
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment15</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment15</guid><pubDate>Sun, 16 Nov 2008 22:49:53 GMT</pubDate></item><item><title>Simon commented on The fallacy of IRepository</title><description>Thanks Ayende
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment14</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment14</guid><pubDate>Sun, 16 Nov 2008 22:27:54 GMT</pubDate></item><item><title>Ayende Rahien commented on The fallacy of IRepository</title><description>Bunter,
  
something like that would take _time_. I don't have much of that.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment13</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment13</guid><pubDate>Sun, 16 Nov 2008 19:02:10 GMT</pubDate></item><item><title>Ayende Rahien commented on The fallacy of IRepository</title><description>Ryan,
  
You just made my point.
  
In particular, the part about using the DB locally vs. remotely has huge implications on the application.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment12</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment12</guid><pubDate>Sun, 16 Nov 2008 19:00:52 GMT</pubDate></item><item><title>Ayende Rahien commented on The fallacy of IRepository</title><description>Andrew,
  
That is not a single statement. 
  
You can see that I referred to that latest in the post.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment11</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment11</guid><pubDate>Sun, 16 Nov 2008 18:56:59 GMT</pubDate></item><item><title>Ayende Rahien commented on The fallacy of IRepository</title><description>Tobin,
  
Huh?
  
  
select * from Blog join Post on Blog.Id = Post.BlogId
  
  
will result in Cartesian product of each blog being repeated for each of its posts.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment10</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment10</guid><pubDate>Sun, 16 Nov 2008 18:56:06 GMT</pubDate></item><item><title>Tuna Toksoz commented on The fallacy of IRepository</title><description>Simon, 
  
[ayende.com/.../Future-Query-Of-implemented.aspx](http://ayende.com/Blog/archive/2008/01/24/Future-Query-Of-implemented.aspx)  
Check this and also the implementation in that link.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment9</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment9</guid><pubDate>Sun, 16 Nov 2008 15:23:29 GMT</pubDate></item><item><title>Demis commented on The fallacy of IRepository</title><description>I guess it would depend on the way you work. Personally for every service I develop, I first start with the building the domain model, i.e. a set of POCO classes that represents the domain of the application I'm creating with all the data and relations it needs to maintain. The end result is the 'ideal domain model' without any considerations for a RDBMS back end or UI front end. To persist the domain objects to a RDBMS I would translate it to a set of nHibernate data classes (which are mapped 1:1 with a db table) and save that. Basically my nHibernate data classes *do not* represent my domain model, they are just relational data objects I use to persist to a RDBMS.  
  
  
To move to an OODB I just do away with the translator classes and just persist the domain model directly. 
  
  
DB4O is a very functional OODB, with transactional support and optional client/server access. I use it for all my transactional and 'process services' (i.e. transient data) though for my repository/catalogue db's I still opt to use a RDBMS as I still like the security/ future proofing/full-text searching that  a mature RDBMS can provide.  
  
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment8</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment8</guid><pubDate>Sun, 16 Nov 2008 15:20:05 GMT</pubDate></item><item><title>Bunter commented on The fallacy of IRepository</title><description>Why not just prove it - create a sample application supporting first OODBMS and then switch it to RDBMS... It doesn't have to be even UI based, just little if core going beyond two table/object setup and some real world queries as test cases. 
  
  
Lot of warm air would be spared...
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment7</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment7</guid><pubDate>Sun, 16 Nov 2008 14:30:04 GMT</pubDate></item><item><title>Ryan Roberts commented on The fallacy of IRepository</title><description>Using db4o remotely appears to be a relatively rare scenario, batching becomes much less useful when everything is in process. 
  
  
The repository interface I have chosen where I intend to take db4o into production is narrower than Rob's - my generic base only supports fetches of aggregates by their identifier. It's just too dangerous to expose its pretty immature linq support (it's quite possible to confuse it with even simple queries that involve generics) outside of the repository, as well as it lacking index support in some scenarios. It can't construct an index on object types for one thing, and I have an EAV scenario where the types of some things cannot be known at compilation time.
  
  
I am building a Lucene index on commit and using that for complex queries, as well as supporting projections from stored index fields to avoid activations in situations where I do not want to have drill into a large numbers of returned aggregates.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment6</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment6</guid><pubDate>Sun, 16 Nov 2008 14:20:35 GMT</pubDate></item><item><title>Simon commented on The fallacy of IRepository</title><description>You mention that your current IRepository implementations uses the future pattern. Have you got an example of it up anywhere I could read, please?
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment5</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment5</guid><pubDate>Sun, 16 Nov 2008 13:52:39 GMT</pubDate></item><item><title>Mark Nijhof commented on The fallacy of IRepository</title><description>Why not stick with the OODB? Depending on your needs of course but collage's have been very happy with Cache on a large project and it was faster then Oracle or SQL Server. And that can of course be bad query design :)
  
  
-Mark
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment4</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment4</guid><pubDate>Sun, 16 Nov 2008 12:50:20 GMT</pubDate></item><item><title>Andrew Peters commented on The fallacy of IRepository</title><description>"The only way of doing this with RDBMS is using joins (in a single statement), which is going to cause Cartesian product, which is expensive in the DB and have to be dealt with in the app layer"
  
  
Not true. Batched nested result sets is another approach.
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment3</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment3</guid><pubDate>Sun, 16 Nov 2008 12:29:31 GMT</pubDate></item><item><title>Tobin Harris commented on The fallacy of IRepository</title><description>Correction, I think a Cartesian product is where you *don't* have a join?
  
  
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment2</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment2</guid><pubDate>Sun, 16 Nov 2008 12:28:38 GMT</pubDate></item><item><title>Tuna Toksoz commented on The fallacy of IRepository</title><description>Linq would make this transition easier, i think. Linq provides another level of abstraction so that you don't have to do joins _manually_. Even though this is the case, this assumption is usually not really good, i have to admit because not all the providers are perfect, and one has to workaround for one provider and not for the other. I mean db4o may not fail for one specific expression but linq 2 sql would(or yield in perf problem such as n+1), this thing would hide the problem when transition to sql occur. 
</description><link>http://ayende.com/3704/the-fallacy-of-irepository#comment1</link><guid>http://ayende.com/3704/the-fallacy-of-irepository#comment1</guid><pubDate>Sun, 16 Nov 2008 09:56:57 GMT</pubDate></item></channel></rss>