# Monday, 17 May 2004

My favorite TV show, “Law and Order” is a very good show. I Tivo it and it is basically the only show I really watch on TV. One problem, for the last 5 years there have been various spin-offs and there are reruns for Law and Order on like 7 days a week. So there is just way too much Law and Order on TV!! Law and Order overload.

Same problem in blogland. My mom has a blog. Bill Gates is considering blogging. Your mom has a blog. George Bush as a blog. My dog has a blog. Where does it end? When such stong willed people like Richard Campbell feel that they have to blog you know that the end is near.

Blogland is way too crowded. Now I have to keep up with the web, emails and blogs. Information overload. Help. I don't think it will get better anytime soon.

Suddenly I wish it were 1994 and we all had 14.4 modems.

posted on Monday, 17 May 2004 17:44:22 (Eastern Daylight Time, UTC-04:00)  #    Comments [15] Trackback
# Sunday, 16 May 2004

Last night Malek flew in for a quick stopover in New York on his way to West Va and then San Diego for TechEd. Kathleen and I took him out on the town first for some beers and Mexican food. Then we went to Biddies for some beers with my pals Justin and Jack and the gang. Katlheen somehow managed to get a free beer glass from the bartender, it pays to be a hot blonde. All in all a good time was had by all.

Oh, Richard Campbell now blogs! Holy crap. This is going to be crazy.

Lastly, getting ready for not only teched, but the PDC in Karachi, Pakistan. We expect 1,500 developers, see you there!

 

posted on Sunday, 16 May 2004 12:06:34 (Eastern Daylight Time, UTC-04:00)  #    Comments [8] Trackback
# Friday, 14 May 2004

Another successful CTTM (or now called SDC) in the Netherlands. What a great show and 7 RDs where speaking. Richard and I did a dry run of From Interoperability to Migration: SQL Server and Linux Databases Working Together and it went very well. Hopefully we can get Oracle to work and play well on the VPC image before our TechED session in 13 days. This session is quite cool, hope to see you all there.

DATC02  From Interoperability to Migration: SQL Server and Linux Databases Working Together
Monday, May 24 1:30 PM- 2:45 PM, Cabana 08
Speaker(s): Richard Campbell, Stephen Forte
Track(s): Data Management
"They" say it can be done, now see it in action! This session demonstrates how SQL Server can acts as the gateway to interoperability with Linux databases such as DB2 and Oracle! You'll see a fully functioning Linux-based web application using Red Hat Linux, Apache, PHP and Oracle sharing data with an identically implemented ASP.NET application using SQL Server. This session shows not only how to interoperate, but to use these interoperate capabilities to facilitate a seamless migration from the Linux based system to SQL Server and Windows . This is how migration was meant to be!


 

posted on Friday, 14 May 2004 14:30:52 (Eastern Daylight Time, UTC-04:00)  #    Comments [18] Trackback
# Tuesday, 11 May 2004

So RedHat is offering a version of Windows that is geared to the desktop. But the “free” operating system of Linux will cost you $70 a year to RedHat for support, etc. Sorry this is doomed to fail.

 

Today I did a session on “From Interoperability to Migration: SQL Server and Linux Databases” where we showed an Oracle 10g instance running on RedHat trying to interoperate with SQL Server running on Windows 2003. We had several issues trying to get the Oracle to work as well as many other things. (Like the iSQL web client showing different results than the command line iSQL).

 

Let me say this to the Linux community. You love Linux because you are geeks. And in my geekier moments I think that there are some really awesome cool things in Linux. But I can’t walk my dad through most of the things in Linux. Nor is playing music or a DVD a trivial task. So my message is: Make Linux much easier to install and use by the average user. Then you stand a chance. Instead of bashing Microsoft, look at when they do well and try to improve on that and look at what Microsoft does poorly and try to make it better in your offering. If any Linux geek comments today that “Microsoft does nothing good” you’ve missed the point and can go continue playing with Linux in your own little world and I will continue to work with Microsoft in the real world.

posted on Tuesday, 11 May 2004 10:43:55 (Eastern Daylight Time, UTC-04:00)  #    Comments [12] Trackback
# Monday, 10 May 2004

Today I gave software developers in the Netherlands a preview of the XML Features of SQL Server 2005 or better know by its code name “Yukon” (the US National Park, not the Canadian frozen land). I show off the very cool and advanced XML to Relational mapping. (Clemens is a big fan). I then talk all about the deep XML integration via the XML Data type. This is a native SQL Server type so we have the option to store XML in its native format. For example you can do just about anything a standard datatype can do, excluding Foreign Keys and PKs. Here is the XML Data Type at work in a variable:

 

DECLARE @xmlData AS XML

SET @xmlData = (SELECT * From Customers where CustomerID='ALFKI'  FOR XML AUTO, TYPE)

SELECT @xmlData

 

The results look like this:

<Customers CustomerID="ALFKI" CompanyName="Alfreds Futterkiste" ContactName="Maria Anders" ContactTitle="Sales Representative" Address="Obere Str. 57" City="Berlin" PostalCode="12209" Country="Germany" Phone="030-0074321" Fax="030-0076545"/>

 

(1 row(s) affected)

 

Then it is fun to create tables with XML fields in them and do things like create an index on them, etc.

--create the table with the XML Datatype

CREATE TABLE OrdersXML

     (OrderDocID INT PRIMARY KEY, xOrders XML NOT NULL)

 

Then you can insert some XML into the table, you can do this manually, from an XML Raw statement or via a XML file.

--Get some XML Data, can also use a file

DECLARE @xmlData AS XML

SET @xmlData = (SELECT * From Orders FOR XML AUTO, TYPE)

 

--insert into the table

Insert Into OrdersXML (OrderDocID, xOrders) Values (1, @xmlData)

 

Then let’s add an index on that column:

CREATE XML INDEX idx_1 ON OrdersXML (xOrders)

 

It is more fun to create an XML Schema as data validation for data validation. This is my favorite thing about the XML integration, it gives you the best of both worlds. This shows off the deep integration of the XML model and the relational model, the XML Schema works just like a constraint, allowing us to validate the XML that we put into our XML data type fields in the database.

 

--xml schema as validation

use northwind

CREATE XMLSCHEMA

'<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

            xmlns:tns="http://corzen.com/customer"

            targetNamespace="http://corzen.com/customer" >

   <xsd:simpleType name="personAge" >

     <xsd:restriction base="xsd:float" >

       <xsd:maxInclusive value="65" />

       <xsd:minExclusive value="18" />

     </xsd:restriction>

   </xsd:simpleType>

   <xsd:element name="age" type="tns:personAge" />

</xsd:schema>'

GO

 

-- create table with xml column and use schema as a 'constraint'

CREATE TABLE xml_schematest (

   the_id INTEGER,

   xml_col XML('http://corzen.com/customer')

)

GO

 

-- works

INSERT INTO xml_schematest VALUES(1,

 '<p:age xmlns:p="http://corzen.com/customer">55</p:age>')

GO

 

-- fails, age > 65

INSERT INTO xml_schematest VALUES(2,

 '<p:age xmlns:p="http://corzen.com/customer">100</p:age>')

GO

 

-- fails, column is validated on update also

UPDATE xml_schematest

  SET xml_col = '<p:age xmlns:p="http://corzen.com/customer">100</p:age>'

  WHERE the_id = 1

 

DROP TABLE xml_schematest

GO

 

DROP XMLSCHEMA NAMESPACE 'http://corzen.com/customer'

GO

 

 

But wait, there’s more! I show off a little bit of XQuery. What is cool is that XQuery is integrated fully with TSQL.

 

--XQuery

use adventureworks

--take a look at an XML column

select * from ProductModel where productmodelid=19

 

--query out a piece of data from the xml field

SELECT Name, CatalogDescription::query('

namespace PD="http://www.adventure-works.com/schemas/products/description"

<Product ProductModelID="{ /PD:ProductDescription[1]/@ProductModelID }" />

') as Result

 

FROM ProductModel

 

where Name like 'Mo%' and CatalogDescription::exist('

namespace PD="http://www.adventure-works.com/schemas/products/description"

namespace wm="http://www.adventure-works.com/schemas/products/WarrAndMain"

     /PD:ProductDescription/PD:Features/wm:Warranty ') = 1

 

 

posted on Monday, 10 May 2004 03:45:37 (Eastern Daylight Time, UTC-04:00)  #    Comments [0] Trackback
# Friday, 07 May 2004

I am leaving tomorrow for the Netherlands to speak at the Software Developers Conference in Arnhem, the Netherlands. What was once CTTM is now SDC, so I have been doing this conference every year since 1998. my sessions are:

 

-          Exploring the XML Features of SQL Server “Yukon

-          ASP .NET Scalability- Caching Techniques

 

Also I rejoin my pal and now fellow RD Richard Campbell on stage for a Joint session:

-          From Interoperability to Migration: SQL Server and Linux Databases Working Together

 

Besides Richard and I other RDs will be there, Clemens, Michelle, Gert, Paul Sheriff, and Ken Getz.

 

Look forward to seeing you there!

 

 

posted on Friday, 07 May 2004 12:44:26 (Eastern Daylight Time, UTC-04:00)  #    Comments [5] Trackback
# Thursday, 06 May 2004

Major League Baseball is going to decorate the bases one weekend with Spiderman web logos as part of a promotion for the new Spiderman 2 movie. People are complaining that there is too much advertising. Or it is “destroying the sacred game.” Ok, the madness has to stop. There have been billboards in the outfield of stadiums since the 1800s. Wrigley Field, one of the last legends, like 100 years old was the fist field named after a corporate sponsor and nobody seems to care in Chicago about that one. (And the proves that sponsorship works, ask anyone where the Cubs play and Wrigley has free advertising based on money they spent 100 years ago, how is that for ROI.)

 

Other sports sell ads. Ever watch the World Cup? The Olympics? Or my beloved hockey, where the NHL allows the stadiums (with names like Pepsi Arena) to sell ads under the ice. Or what about the Baseball teams in Japan, named after corporate sponsors.

 

Let’s face it, we live in a world ruled by advertising and corporate sponsorship. Just deal. Critics of the game should be more concerned with all the players on Steroids.

posted on Thursday, 06 May 2004 12:04:59 (Eastern Daylight Time, UTC-04:00)  #    Comments [20] Trackback
# Monday, 03 May 2004

Yesterday’s 27th Annual 5 Borough Tour started out with a little bit of rain, but it turned out to be a very awesome day. We rode our bikes over 42 miles with the streets closed to cars from Battery Park, pass ground zero, up 6th Avenue into Central Park and then Harlem into the Bronx, back down the FDR in Manhattan to the 59th Street Bridge, through Queens and Brooklyn and finally the winds died down as we climbed the 2.5 mile span of the Verrazano Narrows Bridge (the longest suspension bridge in the US) into Staten Island.

 

I have done this ride every year except two since 1986. If you like to bike ride and live in New York City.

posted on Monday, 03 May 2004 09:56:57 (Eastern Daylight Time, UTC-04:00)  #    Comments [19] Trackback