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


Beware of Search Argument (SARG) Data Types


Beware of Search Argument (SARG) Data Types

Author
Message
Yelena Varshal
Yelena Varshal
SSCrazy Eights
SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)SSCrazy Eights (8.9K reputation)

Group: General Forum Members
Points: 8918 Visits: 600

Hi,

Classic ORM is Object Role Modelling, not Object Relational Mapping.

Everything else in this article about SARG is brilliant.

Here are the references to the source on ORM:

http://www.orm.net/pdf/springer.pdf#search='terry%20halpin%20object%20role%20modeling'

Object-Role Modeling (ORM/NIAM)

by Terry Halpin

http://msdn.microsoft.com/library/?url=/library/en-us/dv_vstechart/html/vstchvsea_ormoverview.asp

Object Role Modeling: An Overview

Terry Halpin
Visual Studio Team
Microsoft Corporation

November 2001




Regards,
Yelena Varshal

DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3467 Visits: 432
BTW I was able to confirm that the new driver is indeed the JTDS driver. Seems to be working fine and provide a small, but noticable improvement over the MS JDBC driver.

/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3467 Visits: 432

Thanks.

Indexes on computed columns are an option, but ultimately they are not quite as useful as function based indexes IMO.



/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3467 Visits: 432

No, Hibernate does not explicitly force your data model to reflect the object model, however the net result is nearly that, at least in my experience. Admittedly this is a very small sampling that provides only anecdotal evidence and may not fully support the statement in the article. However, the development team has had direct access to a "Hibernate expert" and they are reportedly following his recommendations.

There are some pretty severe limitations that we have run across as well. Every object referenced in your Hibernate queries must actually exist in the database so derived tables, CTEs and temporary tables are out of the question. Hibernate also chokes on varibles so any kind of more complex queries and cursors are out too. Hibernate can apparently make use of stored procedures but at the cost of greatly diminished pagination and sorting functionality.



/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)SSC Guru (214K reputation)

Group: General Forum Members
Points: 214332 Visits: 41979
I loved the examples... nice and simple. Great job, DC.

--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
Dan Skutt
Dan Skutt
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 13

Great article. What setting was changed to stop Hibernate from sending Unicode?

Thanks,

Dan





DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3467 Visits: 432

It was actually in JBoss...

In the apollo-ds.xml file you need to add the following in the <datasources> section.

<xa-datasource-property name="SendStringParametersAsUnicode">false</xa-datasource-property>



/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
David Kilzer
David Kilzer
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 1
The sendStringParametersAsUnicode is a property of the JDBC driver being used. The jTDS driver supports this parameter, as does one of the commercial SQL Server 2000 drivers (although I don't recall which one).

http://jtds.sourceforge.net/faq.html#urlFormat

Be sure to check your JDBC driver documentation for supported properties.

Dave
DCPeterson
DCPeterson
Hall of Fame
Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)Hall of Fame (3.5K reputation)

Group: General Forum Members
Points: 3467 Visits: 432

Dave,

Thanks for the clarification. After consulting with the configuration team, it is indeed a jTDS setting. I knew that we were using that particular JDBC driver, but their emails initially indicated that it was a JBoss setting...



/*****************

If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek



*****************/
Dan Skutt
Dan Skutt
Forum Newbie
Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: General Forum Members
Points: 5 Visits: 13

Thanks for the feedback! Any ideas on how to prevent unicode when NHibernate and the native SQL drivers are used?

Thanks again,

Dan





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