<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'community', 't-sql tuesday', and 'sql'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=community,t-sql+tuesday,sql&amp;orTags=0</link><description>Search results matching tags 'community', 't-sql tuesday', and 'sql'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Collation errors in business</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/12/13/collation-errors-in-business.aspx</link><pubDate>Mon, 13 Dec 2010 23:59:21 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:31584</guid><dc:creator>rob_farley</dc:creator><description>&lt;p&gt;At the &lt;a href="http://www.sqlpass.org/summit/na2010/default.aspx" target="_blank"&gt;PASS Summit&lt;/a&gt; last month, I did a set (Lightning Talk) about collation, and in particular, the difference between the “English” spoken by people from the US, Australia and the UK.&lt;a href="http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/12/07/t_2D00_sql-tuesday-_2300_13-_2D00_-what-the-business-says-is-not-what-the-business-wants.aspx" target="_blank"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:5px;padding-left:0px;padding-right:0px;display:inline;float:right;border-top:0px;border-right:0px;padding-top:0px;" title="TSQL2sDay150x150" border="0" alt="T-SQL Tuesday" align="right" src="http://sqlblog.com/blogs/rob_farley/TSQL2sDay150x150_21DC5B54.jpg" width="154" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;One of the examples I gave was that in the US drivers might stop for gas, whereas in Australia, they just open the window a little. This is what’s known as a &lt;a href="http://en.wikipedia.org/wiki/Paraprosdokian"&gt;paraprosdokian&lt;/a&gt;, where you suddenly realise you misunderstood the first part of the sentence, based on what was said in the second. My current favourite is Emo Phillip’s line “I like to play chess with old men in the park, but it can be hard to find thirty-two of them.”&lt;/p&gt;  &lt;p&gt;Essentially, this a collation error, one that good comedians can get mileage from.&lt;/p&gt;  &lt;p&gt;Unfortunately, collation is at its worst when we have a computer comparing two things in different collations. They might look the same, and sound the same, but if one of the things is in SQL English, and the other one is in Windows English, the poor database server (with no sense of humour) will get suspicious of developers (who all have senses of humour, obviously), and declare a collation error, worried that it might not realise some nuance of the language.&lt;/p&gt;  &lt;p&gt;One example is the common scenario of a case-sensitive collation and a case-insensitive one. One may think that “Rob” and “rob” are the same, but the other might not. Clearly one of them is my name, and the other is a verb which means to steal (people called “Nick” have the same problem, of course), but I have no idea whether “Rob” and “rob” should be considered the same or not – it depends on the collation.&lt;/p&gt;  &lt;p&gt;I told a lie before – collation isn’t at its worst in the computer world, because the computer has the sense to complain about the collation issue.&lt;/p&gt;  &lt;p&gt;People don’t.&lt;/p&gt;  &lt;p&gt;People will say something, with their own understanding of what they mean. Other people will listen, and apply their own collation to it. I remember when someone was asking me about a situation which had annoyed me. They asked if I was ‘pissed’, and I said yes. I meant that I was annoyed, but they were asking if I’d been drinking. It took a moment for us to realise the misunderstanding.&lt;/p&gt;  &lt;p&gt;In business, the problem is escalated. A business user may explain something in a particular way, using terminology that they understand, but using words that mean something else to a technical person. &lt;/p&gt;  &lt;p&gt;I remember a situation with a checkbox on a form (back in VB6 days from memory). It was used to indicate that something was approved, and indicated whether a particular database field should store True or False – nothing more. However, the client understood it to mean that an entire workflow system would be implemented, with different users have permission to approve items and more. The project manager I’d just taken over from clearly hadn’t appreciated that, and I faced a situation of explaining the misunderstanding to the client. Lots of fun...&lt;/p&gt;  &lt;p&gt;Collation errors aren’t just a database setting that you can ignore. You need to remember that Americans speak a different type of English to Aussies and Poms, and techies speak a different language to their clients.&lt;/p&gt;</description></item><item><title>Spatial data from shapefiles (for T-SQL Tuesday #006)</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/05/10/spatial-data-from-shapefiles-for-t-sql-tuesday-006.aspx</link><pubDate>Tue, 11 May 2010 03:57:38 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:25001</guid><dc:creator>rob_farley</dc:creator><description>&lt;p&gt;I’m giving a presentation on May 12th at the Adelaide .Net User Group, around the topic of spatial data, and in particular, the visualization of said data. Given that it’s about one the larger types, this post should also count towards &lt;a href="http://sqlblog.com/blogs/michael_coles/archive/2010/05/03/t-sql-tuesday-006-what-about-blob.aspx" target="_blank"&gt;Michael Coles’ T-SQL Tuesday on BLOB data&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;I wrote recently about &lt;a href="http://sqlblog.com/blogs/rob_farley/archive/2010/04/13/exploding-maps-in-reporting-services-2008-r2.aspx" target="_blank"&gt;my experience with exploded data&lt;/a&gt;, but what I didn’t go on to talk about was how using a shapefile like this would translate into a scenario with a much larger number of shapes, such as all the postcode areas in the US and Australia, plus high-level postcodes from the UK or Canada (US and Aus roughly have a postcode per city/suburb, whereas the UK &amp;amp; Canada use a postcode for a much smaller group of addresses, with the city/suburb being typically the first half of the postcode).&lt;/p&gt;  &lt;p&gt;The issue comes down to the fact that the shapefile isn’t filtered. It contains all the shapes. So if you want to display the ones near a point of interest, you’re having to trawl through the lot still. Maybe not what you’re after. So the trick is to use polygons stored in a geography field in SQL, and use that instead. Basically rejecting that “ESRI shapefile” option that Report Builder 3.0 presented. And in particular, put a spatial index on that geography field.&lt;/p&gt;  &lt;p&gt;I could go into a ton of detail about the way that spatial indexes work, about how they apply a grid over the world, and then break the squares that result into smaller squares, until they get into quite some level of detail – but I’ll let you research that through Books Online or the like. I just want to point out that the geography type CAN be indexed, and that this allows you to handle a much larger set of regions without incurring the performance hit that you’d get if you had massive shapefiles.&lt;/p&gt;  &lt;p&gt;Unfortunately, shapefile data isn’t trivial to get into a geography type, but &lt;a href="http://www.sharpgis.net/page/Shape2SQL.aspx" target="_blank"&gt;Morten Nielsen has put a great tool together which you can use for this&lt;/a&gt;. It works very well indeed.&lt;/p&gt;  &lt;p&gt;In my presentation, I’ll go into a lot more stuff that I’ve learned about shapefiles and the like, but I’ll let you come along and discover that in person. If there’s interest in this stuff, I might even submit a talk on this for some of the upcoming conferences, such as TechEd AU/NZ or PASS.&lt;/p&gt;</description></item><item><title>T-SQL Tuesday #003 (Relationships): The round-up</title><link>http://sqlblog.com/blogs/rob_farley/archive/2010/02/12/t-sql-tuesday-003-relationships-the-round-up.aspx</link><pubDate>Sat, 13 Feb 2010 04:45:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22513</guid><dc:creator>rob_farley</dc:creator><description>&lt;p&gt;(Reposted from my &lt;a href="http://msmvps.com/blogs/robfarley/archive/2010/02/13/t-sql-tuesday-003-relationships-the-round-up.aspx" target="_blank"&gt;msmvps.com blog&lt;/a&gt;)&lt;/p&gt;  &lt;p&gt;Lots of blog posts for this month, for the first T-SQL Tuesday to leave the safe-haven of &lt;a href="http://sqlblog.com/blogs/adam_machanic/" target="_blank"&gt;Adam Machanic’s blog&lt;/a&gt;. Some people obviously missed out, probably because they don’t read this blog, but I guess that’s the nature of the meme. I don’t know who is hosting next month yet, but I’ll be looking out for Adam to post something about it in early March.&lt;/p&gt;  &lt;p&gt;All the posts had to appear as trackbacks or comments on the &lt;a href="http://sqlblog.com/blogs/robfarley/archive/2010/02/02/invitation-for-t-sql-tuesday-003-relationships.aspx" target="_blank"&gt;invitation to participate&lt;/a&gt;, but this post is a short summary for posterity.&lt;/p&gt;  &lt;p&gt;As the second week of February involves Valentine’s Day (and a few days earlier, my wedding anniversary), I thought the topic of Relationships would be a nice one for this event. There was a good range of topics too, which I have ordered by the type of relationships chosen.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Special mention:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;It wasn't quite on the right day, but a big congratulations to &lt;a href="http://sqlfool.com/" target="_blank"&gt;Michelle Ufford&lt;/a&gt; who almost managed to time &lt;a href="http://twitter.com/sqlfool/status/8926158962" target="_blank"&gt;the birth of her new baby Chloe&lt;/a&gt; for T-SQL Tuesday. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;We have “purely technical” posts:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://bradsruminations.blogspot.com/2010/02/dear-from-clause.html" target="_blank"&gt;Brad Schulz&lt;/a&gt; is keeping the bar way too high, and if you haven’t read his pieces from previous Tuesdays, then I recommend you go through the history of posts on his blog. This month he has written a letter of disappointment to the FROM clause. At some point Brad will likely be asked to compile these posts into a book, but until that happens, you’ll have to follow the link to his blog. It’s entertaining, but still fits in the “purely technical” category.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqltechconsulting.com/2010/02/09/tsql2sday-diagramming-relationships-in-sql-server/" target="_blank"&gt;John Dunleavy&lt;/a&gt; demonstrated (complete with screenshots – something I should put more of in my posts) how foreign keys can be made so easily using the Diagram part of Management Studio. It’s not something I do much of, but I have to admit that reading posts like John’s can often inspire me to changing my ways. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://orionseven.com/blog/2010/02/08/t-sql-tuesday-spot-relationships-with-database-diagrams/" target="_blank"&gt;Bryan Smith&lt;/a&gt; also talked about database diagrams, and how they can be used to discover relationships in a system. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/michael_coles/archive/2010/02/10/almost-t-sql-tuesday-003.aspx" target="_blank"&gt;Michael Coles&lt;/a&gt; officially missed the deadline, but I’m going to link to him anyway, demonstrating a nice trick for creating a Product aggregate based on the relationship between a number and its logarithm.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/allen_white/archive/2010/02/09/t-sql-tuesday-3-database-relationships.aspx" target="_blank"&gt;Allen White&lt;/a&gt; wrote about the fact that any RDBMS should have relationships to really be considered relational. Great reminder of some of the basics.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/marco_russo/archive/2010/02/09/how-to-relate-tables-in-dax-without-using-relationships.aspx" target="_blank"&gt;Marco Russo&lt;/a&gt; timed a piece on relating tables in DAX amazingly well, and only realised that it qualified for T-SQL Tuesday after he had initially posted it. Useful piece, which will appear in search engine results for years to come I’m sure.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://sqlblog.com/blogs/robfarley/archive/2010/02/09/the-query-optimizer-s-handling-of-relationships-for-t-sql-tuesday-003.aspx" target="_blank"&gt;Rob Farley&lt;/a&gt; wrote a pile of rubbish… hey, that’s me! I wrote about the importance of relationships in a database system to help the Query Optimizer do its job. I also surmised that Foreign Keys using candidate keys (rather than the primary key) might help many queries do away with needing joins. If you have thoughts on that I’d still like to hear them.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Some posts that were about less technical relationships:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://midnightdba.itbookworm.com/midnightdba/blog/post/I-Love-You2c-I-QUIT.aspx" target="_blank"&gt;Jen McCown&lt;/a&gt; wrote about how she left her husband Sean, in a piece called ‘I love you, I quit’. Actually, she was just leaving a job, but it’s a nice piece about the degradation of a employer-employee relationship. It rings too true for all of us I think, and I hope that as an employer I manage to ‘keep the mystery’ for my employees to stop them going through that same experience.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://jasonbrimhall.info/?p=281" target="_blank"&gt;Jason Brimhall&lt;/a&gt; wrote about some of the different relationships in his life, particularly how he wants to make sure that the Parent-Child relationship in his life doesn’t become a Foreign relationship. Nicely done Jason.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.allenkinsel.com/archive/2010/02/your-relationship-with-your-professional-organization/" target="_blank"&gt;Allen Kinsel&lt;/a&gt; recommends that relationships with professional organisations can be deepened, and that this can be very beneficial. I’m sure he’s right. I have a tendency to get extra-involved in groups, and I hope Allen’s sentiments are heard by many.&lt;/p&gt;  &lt;p&gt;The link to &lt;a href="http://www.sqlservercentral.com/blogs/steve_jones/archive/2010/02/09/relationships-_2D00_-t_2D00_sql-tuesday-_2300_3.aspx" target="_blank"&gt;Steve Jones&lt;/a&gt;’ article must’ve changed. The link that I followed today didn’t work, even though I’d read it successfully a couple of days ago. Still, I managed to find it, and I can thoroughly recommend reading about the relationships between Steve and his colleagues. He’s most definitely correct in pointing out that any effort in developing personal relationships with your colleagues will help you get things done!&lt;/p&gt;  &lt;p&gt;&lt;b&gt;And some “combination” posts:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.straightpathsql.com/archives/2010/02/unrelated-relationship-ramblings/" target="_blank"&gt;Mike Walsh&lt;/a&gt; provided the first piece of the day, with an excellent run down of various types of relationships that are important, including a recommendation to read up on database design. Great advice, Mike. Thanks.&lt;/p&gt;  &lt;p&gt;With &lt;a href="http://sqlblog.com/blogs/kalen_delaney/archive/2010/02/09/sql-server-relationships.aspx" target="_blank"&gt;Kalen Delaney&lt;/a&gt;’s post we almost got two for the price of one. A brilliant prelude talking about some of the personal relationships that have enhanced her SQL career, followed up by covering how foreign key relationships have developed through the versions of SQL Server. Kalen’s blog posts are always worth reading, as I’m sure everyone who is reading this post appreciates.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://codegumbo.com/index.php/2010/02/09/tsql2sday-003-maslow-and-relational-design/" target="_blank"&gt;Stuart Ainsworth&lt;/a&gt;’s piece was on Maslow, drawing parallels between the hierarchy of needs of a person with the hierarchy of needs of a database system. It’s thought-provoking, and something that I feel could be made into a poster for database developers’ walls.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;In summary&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;I’d like to thank everyone who has taken part, and for Adam for having introduced the T-SQL Tuesday concept to us. Keep your eye on his blog to find out what’s going on next month. If your name isn’t listed here, then I encourage you to write something for March. &lt;/p&gt;  &lt;p&gt;Also remember that lots of these people are on Twitter and are very much followable. Look at the hashtag &lt;a href="http://twitter.com/search?q=" target="_blank"&gt;#tsql2sday&lt;/a&gt; for related posts, and make sure you follow the people who post blogs for these events.&lt;/p&gt;</description></item></channel></rss>