Entity Framework: Right Problem, Wrong Place

I was listening to the recent .NET rocks episode about the Entity Framework advisory council and it was interesting to hear the team's point of view and the problems they are trying to solve with the Entity Framework. They have nice goals, but there is a fundamental problem here that some of the original database gurus like C.J. Date make quite clear. SQL is flawed. It's not that we need a million object relational mappers or that we need to look at our databases in terms of objects. In fact, that's the opposite of what the relational model was intended to do. When E.F. Codd invented the relational model, he intended for the database to be a collection of facts with relationships to other facts... not a collection of objects. The relational model was supposed to provide a way to look at and work with these facts in different ways, but SQL and modern RDBMS's fall short of what they were supposed to do. Somewhere along the way, the original plans were lost. Instead of building a truely relational storage system, vendors jumped on the semi-relational SQL model. The SQL model ties physical structure closely to the logical data model, which is where a lot of problems start coming into play. This leads to the situations we've all seen where we need to denormalize the data model to get decent performance numbers.  It seems to me that the solution to the problem should not start with mapping the data to objects, it should start inside SQL Server itself, transitioning from the flawed world of T-SQL to a true implementation of the relational model as it was intended, a world where the physical model is truely detatched from the logical model.

Published Thursday, August 28, 2008 10:05 AM by Jesse Ezell
Filed under: , ,

Comments

# re: Entity Framework: Right Problem, Wrong Place

Thursday, August 28, 2008 10:54 AM by Kevin Hazzard

I agree that SQL and Oracle have taken a wrong turn. Although I don't know if it's that they strayed too far from basic relational database principles. It might be that they tried to adhere to them at all in the first place. Here's an interesting spin that you are welcome to disagree with. :)

www.gotnet.biz/.../An-Unfortunate-Consequence-of-History.aspx

# re: Entity Framework: Right Problem, Wrong Place

Thursday, August 28, 2008 11:35 AM by Michael K. Campbell

Sadly I have to disagree - at least in part.

You're spot on in terms of development - SQL doesn't quite cut the mustard, and is flawed from an object oriented perspective.

But what if you want to do something with your data? like look at relationships of facts to other facts? Querying objects for that kind of information would likely become very expensive. It likely would also be very hard to organize some of the relationships that make SQL so valid and useful.

# re: Entity Framework: Right Problem, Wrong Place

Thursday, August 28, 2008 12:53 PM by Jesse Ezell
Looking at the relationship of facts to other facts is exactly what the relational model was intended to do. I recommend reading C.J. Date's Database in Depth where he talks about the original intent compared to what SQL does. The relational model addresses relationships between facts very well, SQL does not.

The relational model as originally defined has nothing to do with performance, and that's why it is important to seperate the logical model from the physical model. However, SQL coupling the physical layout to the relational model, gives this idea that somehow the layout of the relationships effects performance. It shouldn't. An optimal physical layout should be able to be derived from the relationships which might be a completely denormalized database. However, this shouldn't be the way you design your relationships.

Objects are simply a view of the facts that you have defined. The relational model, as originally defined, would allow for much more seamless O/R mapping and data analysis, since views in the relationship model itself are fully updateable. In fact, tables themselves are not distinguishable from views in a system that implements the actual relational model, not a SQL based version of it.

Note, I'm not saying that SQL should be based on objects. I think 100% the opposite. The database should only be a collection of facts, nothing else. No objects, no tables. Just facts and relationships to other facts.

# re: Entity Framework: Right Problem, Wrong Place

Thursday, August 28, 2008 8:23 PM by David Douglass

"Somewhere along the way, the original plans were lost."  Not so!  Dr. Codd published them in 1990 as The Relational Model for Database Management: Version 2 (www.amazon.com/.../ref=sr_1_1).  Vendors (and just about everybody else) ignored this book.  Had people paid attention today's databases would have a much more solid foundation to build on.

# re: Entity Framework: Right Problem, Wrong Place

Friday, August 29, 2008 7:07 AM by Jesse Ezell

If only they'd listened... I think it's time that someone rebooted everything.

# re: Entity Framework: Right Problem, Wrong Place

Thursday, September 11, 2008 5:47 PM by Paramdeep Singh

It is sad to see so many smart people debating on a wrong concept. RDBMSs are right on target to provide what they were designed to do (SQL server/Oracle/DB2) etc. It is just an evolution path they are following just like any other technical production/framework. However most of the development community members are proficient in certain technologies and not all but very few are candid enough to admit so we all want the platform (we are proficient in) to support everything. Thus came the ORs. ORs do solve some Rapid Development Issues, they do improve the development life cycle for most of the simple technical solution, the problem starts when simple solution is extrapolated to complex solutions and that causes a disaster. I think we should

# re: Entity Framework: Right Problem, Wrong Place

Wednesday, September 22, 2010 11:45 AM by Jeff Karver

Great post you got here. I'd like to read something more concerning this matter. The only thing your blog needs is some photos of some gadgets.

Jeff Karver

<a href="www.jammer-store.com/">portable jammer</a>

# re: Entity Framework: Right Problem, Wrong Place

Saturday, November 20, 2010 4:16 PM by Katherine Stepman

Wow, certainly nice topic. How will I find this subscription?

Katherine  Stepman

<a href="www.wirelesscameradetectors.com/">bug detector spy</a>

# re: Entity Framework: Right Problem, Wrong Place

Thursday, February 24, 2011 10:42 AM by Miere salcam

I think it is the right place here. I see that now, it is too late , but i hope the massage it is good.

# re: Entity Framework: Right Problem, Wrong Place

Wednesday, April 20, 2011 2:45 AM by P90X Review

I have to agree SQL is flawed but it has it's importance too. Like checking out relationships of facts is great with SQL. I guess it all depends on what you need to do.

# re: Entity Framework: Right Problem, Wrong Place

Thursday, May 26, 2011 3:16 AM by weblogs.asp.net

Entity framework right problem wrong place.. Reposted it :)

# re: Entity Framework: Right Problem, Wrong Place

Thursday, December 01, 2011 8:01 AM by fake louis vuitton belt

Every word in this piece of work is very clear and your passion for this topic shines. Please continue your work in this area and I hope to see more from you in the future.

# re: Entity Framework: Right Problem, Wrong Place

Saturday, April 14, 2012 5:04 AM by flagyl

I think, that you are not right. I am assured. I suggest it to discuss. Write to me in PM, we will communicate.

# re: Entity Framework: Right Problem, Wrong Place

Sunday, April 15, 2012 12:04 AM by kamagra

Bravo, you were not mistaken :)

# re: Entity Framework: Right Problem, Wrong Place

Monday, April 16, 2012 10:23 PM by compre kamagra portugal

You are not right. I am assured. Let's discuss. Write to me in PM, we will communicate.  

<a href=comprarkamagraonline.ubf.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Tuesday, April 17, 2012 7:14 AM by flagyl

In my opinion you commit an error. Let's discuss it. Write to me in PM.  

<a href=flagyl65.ubf.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Thursday, June 07, 2012 12:03 PM by comprar indocin online

Absolutely with you it agree. I like this idea, I completely with you agree.  

<a href=precoindocinbrasil.xup.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Saturday, June 09, 2012 12:51 PM by lioresal

Now that's something like it!  

<a href=acquistarelioresalrx.bnx.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Sunday, June 10, 2012 6:03 AM by arcoxia

Earlier I thought differently, many thanks for the help in this question.  

<a href=ventearcoxia.phorum.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Monday, June 11, 2012 5:39 AM by aldactone en france

It seems brilliant idea to me is  

<a href=achataldactone.phorum.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Tuesday, June 12, 2012 2:16 PM by comprar actos

I agree with you  

<a href=compreactos.fora.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Monday, June 25, 2012 2:34 PM by {antabuse|

I think, that you are mistaken. I can prove it. Write to me in PM, we will discuss.  

<a href=buyantabuse42.phorum.pl/>{antabuse|</a>

# re: Entity Framework: Right Problem, Wrong Place

Thursday, June 28, 2012 4:42 PM by {keflex|

You are not right. I can defend the position. Write to me in PM, we will communicate.  

<a href=buykeflexonline.fora.pl/>{keflex|</a>

# re: Entity Framework: Right Problem, Wrong Place

Monday, July 02, 2012 9:04 AM by vente cymbalta en ligne

Whom can I ask?  

<a href=achatcymbaltaenligne.fora.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Wednesday, July 04, 2012 1:43 PM by ordine nizoral online

The question is interesting, I too will take part in discussion. I know, that together we can come to a right answer.  

<a href=nizoralonline59.phorum.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Thursday, July 05, 2012 10:13 AM by inderal

I think, what is it good idea.  

<a href=cheapinderal95.xup.pl/>buy inderal online</a>

# re: Entity Framework: Right Problem, Wrong Place

Friday, July 06, 2012 1:26 AM by buy lipitor no rx

You were visited with remarkable idea  

<a href=cheaplipitor87.fora.pl/>buy lipitor  </a>

# re: Entity Framework: Right Problem, Wrong Place

Friday, July 06, 2012 7:37 AM by geodon

In it something is also idea excellent, I support.  

<a href=venditageodon.fora.pl/>comprare geodon  </a>

# re: Entity Framework: Right Problem, Wrong Place

Friday, August 10, 2012 10:09 AM by zelnorm

Most likely. Most likely.  

<a href=comprazelnormrx33.fora.pl/>compra zelnorm senza ricetta</a>

# re: Entity Framework: Right Problem, Wrong Place

Friday, August 10, 2012 2:26 PM by zelnorm

I am sorry, that has interfered... At me a similar situation. Let's discuss. Write here or in PM.  

<a href=comprazelnormrx33.fora.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Sunday, August 12, 2012 12:10 PM by buy risperdal

I consider, that you are mistaken. I can defend the position. Write to me in PM, we will communicate.  

<a href=purchaserisperdal.fora.pl/.../a>

# re: Entity Framework: Right Problem, Wrong Place

Monday, December 03, 2012 5:48 AM by Asorada

HURRAY! can’t balladeer. by virtue of himself by what name highly.

<a href=www.gravura-laser.com>gravura</a>

<a href=www.gravura-laser.com/.../medalioane-caini.html>gravura bucuresti</a>

Leave a Comment

(required) 
(required) 
(optional)
(required)