Tweeting AdventureWorks?
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.
Comments
Anonymous
January 15, 2009
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.Anonymous
January 16, 2009
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.Anonymous
January 16, 2009
The comment has been removedAnonymous
January 19, 2009
The comment has been removed