SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Your Thoughts on ORM Tools


Your Thoughts on ORM Tools

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (142K reputation)SSC Guru (142K reputation)SSC Guru (142K reputation)SSC Guru (142K reputation)SSC Guru (142K reputation)SSC Guru (142K reputation)SSC Guru (142K reputation)SSC Guru (142K reputation)

Group: Administrators
Points: 142364 Visits: 19424
As far as experienced DBAs, we have had Brad look to tune things. The problem is the ORM layer isn't "tuneable" in that we can't specify the queries in some places. The ORM handles that and it creates it's own SQL. In places we have rewritten queries that improve performance, but in other places the framework is buckling a touch under load.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Gift Peddie
Gift Peddie
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16590 Visits: 14456
This is a legacy database, what is this strange "SCOPE_IDENTYTY()" that you speak of? When I got here three years ago there were no keys.


Scope_Identity returns the last value of your Identity key which may include gaps if there are deletes and aborted transactions.

http://msdn.microsoft.com/en-us/library/ms190315.aspx

Kind regards,
Gift Peddie
Andrew Jackson
Andrew Jackson
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1083 Visits: 1121
@Grant: Ouch. That doesn't sound nice at all!

@Steve: While I was jokingly referring to you with that remark (surely the head of any SQLServer site MUST be an experienced DBA?), it is nice to know what's going on behind the scenes here. How long did it take to write with nHibernate? How long do you think it would've taken without it?

@Gift: Thanks Gift, but I was trying to emphasize that the database was a legacy (SQL2000) database and so "SCOPE_IDENTYTY()" wasn't available (AFAIK...) We're now on SQL2005 so things are a bit better now.
Gift Peddie
Gift Peddie
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16590 Visits: 14456
@Gift: Thanks Gift, but I was trying to emphasize that the database was a legacy (SQL2000) database and so "SCOPE_IDENTYTY()" wasn't available (AFAIK...) We're now on SQL2005 so things are a bit better now.


Actually there was Scope_Identity in 2000 may be your application just did not use it.

http://msdn.microsoft.com/en-us/library/aa259185(SQL.80).aspx

Kind regards,
Gift Peddie
Andrew Jackson
Andrew Jackson
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1083 Visits: 1121
Thanks Gift, I didn't know that.
Gift Peddie
Gift Peddie
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16590 Visits: 14456
Thanks for the feedback and glad I could help.

:-)

Kind regards,
Gift Peddie
samuele.armondi
samuele.armondi
SSC-Enthusiastic
SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)SSC-Enthusiastic (172 reputation)

Group: General Forum Members
Points: 172 Visits: 192
Well, just to add my penny's worth... Here we use Castle ActiveRecord (which is actually a wrapper around NHibernate, it just allows declarative syntax rather than having to write XML files).
Personally I really like from a developer's point of view, but it doesn't support SPs which makes it harder to customise things and also leads to unnecessary data being loaded, etc... As a result of this I have now built a simple ORM which supports stored procedures, and gives me the best of both worlds.

As has been mentioned already, I do think ORM tools have a place in development, but they are not a fix-all solution - I know of people who use them because they can't write TSQL at all!!!!
IMHO there is no substitute for a well-written SP layer which then goes through to a lovely set of entity classes... the best of both worlds!!

I have some code I could pass on, PM me if you want to take a look (Warning - It's very simple, with no relationship support but it does what I want it to do!)

Regards,
S Armondi
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (208K reputation)SSC Guru (208K reputation)SSC Guru (208K reputation)SSC Guru (208K reputation)SSC Guru (208K reputation)SSC Guru (208K reputation)SSC Guru (208K reputation)SSC Guru (208K reputation)

Group: General Forum Members
Points: 208373 Visits: 41973
charlesmartinez276 (12/5/2012)
ORM positive tools is required develop with SQL feathered.I think it is a effective a lot.:-P


SPAM reported.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search