Reed Me

Development schtuff, SQL Server & other random geekness. Now with more [fill in the blank]!

Tweeting AdventureWorks?

Tweeting AdventureWorks?

  • Comments 4

Earlier this week, the gravitational pull of Twitter got the better of me. Jimmy May emailed me that Paul Nielsen was trying to sort out the gender of the fictitious IT Manager of AdventureWorks (Jean Trenary) for the next edition of the SQL Server Bible and was tweeting on the subject. One thing led to another. (Doesn’t it always?)

I vaguely recall signing up for Twitter as “reedme” but twitter doesn’t seem interested in sending me a forgotten password for that user name... so I reverted to an older, darker user name for tweeting: DarthReed. Just so you know. More useless information is now available on the web with even greater frequency.

Anyway, here are the queries for anybody else who cares. First for the old school AdventureWorks OLTP database (with thanks to Gail in UE for writing the first one):

USE AdventureWorks
GO
SELECT 
c.FirstName , c.LastName, e.Title, e.Gender
FROM HumanResources.Employee as e
JOIN Person.Contact AS c ON e.ContactID = c.ContactID
WHERE LastName = 'Trenary'
GO

And then my “port” for the AdventureWorks2008 OLTP database (will like be the same for AdventureWorksKilimanjaro):

USE AdventureWorks2008
GO
SELECT 
c.FirstName , c.LastName, e.JobTitle, e.Gender
FROM HumanResources.Employee as e
JOIN Person.Person AS c ON e.BusinessEntityID = c.BusinessEntityID
WHERE LastName = 'Trenary'
GO

If my adventures in Twitter last beyond the end of my “trial month”, I’ll have to break down and figure out how to feed them into the sidebar of the blog.

image

Leave a Comment
  • Please add 3 and 8 and type the answer here:
  • Post
  • I question the normalization of storing the gender attribute in the Employee table since that table is primarily storing info about their current job assingment. The Person.Person table seems a better place. True gender can change, but then the change isn't likely to tied to a job change.

    I did find  Jean on LinkedIN, and she used to work at Microsoft, but the profile is incomplete and didn't include enough to determine her gender.

    In any caase, it's good to know that Jean is a female, I hate to get it wrong in the book.

  • Paul, I'm going to guess that it's based on the Real World™ presumption that gender is only applicable or appropriate to record for employees. Since I wasn't involved with the original Yukon design for AdventureWorks. One of my projects is a data dictionary for AdventureWorks2008, and as we get good feedback like yours, we'll consider design updates in the future.

  • Your blog alias is quite the double entendre, Reed!

    But how about coming clean with your new! improved! twitter alias for your fans out there, eh?

    Or perhaps you can wait a few weeks when you deliver your verdict on whether you're going to stay a twit.  Frankly, the jury's still out for me, but I've twitted with some outstanding folks during my short tenure.  

    Jimmy May

    http://blogs.msdn.com/jimmymay

    http://www.twitter.com/aspiringgeek

  • Earlier this week, the gravitational pull of Twitter got the better of me. Jimmy May emailed me that

Page 1 of 1 (4 items)