Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

Beware of Search Argument (SARG) Data Types Expand / Collapse
Author
Message
Posted Monday, July 17, 2006 10:49 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Friday, August 8, 2014 1:35 PM
Points: 3,475, Visits: 580

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

Post #294910
Posted Wednesday, July 19, 2006 6:16 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410
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



*****************/
Post #295732
Posted Wednesday, July 19, 2006 6:20 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410

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



*****************/
Post #295733
Posted Wednesday, July 19, 2006 6:41 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410

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



*****************/
Post #295736
Posted Sunday, October 8, 2006 11:59 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 10:11 AM
Points: 36,995, Visits: 31,516
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #314012
Posted Friday, October 20, 2006 1:55 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 1, 2007 2:43 PM
Points: 5, Visits: 13

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

Thanks,

Dan




Post #317091
Posted Saturday, October 21, 2006 8:22 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410

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



*****************/
Post #317156
Posted Saturday, October 21, 2006 8:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 13, 2007 9:21 AM
Points: 3, 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
Post #317157
Posted Monday, October 23, 2006 7:48 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 8:16 AM
Points: 1,035, Visits: 410

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



*****************/
Post #317293
Posted Monday, October 23, 2006 3:39 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 1, 2007 2:43 PM
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




Post #317435
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse