Scott Hanselman, one of my favorite bloggers, has expressed his deep disdain for Northwind.
I'm just sick of Northwind. Sick to death of the Northwind Database. You know, this is the Products, Categories, Suppliers, yada yada yada sample database that you've been seeing in Microsoft demos since the beginning of time. (FYI, the beginning of time was about 1997. ;) ) ... When I'm showing some technology that is talking to a Database or to POCO (Plain Ol' CLR Objects) I still need good sample data to pull from. Thus, the Northwind Virus continues. And I hate it with the heat of a thousand suns.
Sure, there are other Microsoft endorsed sample databases (most notably, AdventureWorks), but Northwind, despite its age and limitations, is still the de facto database for articles, demos, and talks involving Microsoft technologies.
What's wrong with Northwind? Scott focuses on his emotional distate and doesn't really provide any logical or rational reasons as to why he hates Northwind so passionately. Northwind certainly has its shortcomings - it's at times overly simple (very small amounts of data in each table, for example). The main two shortcomings that get under my skin are:
- It is, literally, very dated. The date/time values in the database are from the mid-1990s, for instance. Which is a little odd and discomforting when demoing an application that allows users to filter orders by their date, and having to enter sample dates within the year 1996.
- The images stored in the Categories table are stored as grainy, low-quality 16-color BMP images that includes an OLE header that must be stripped out. I detail these pains in Displaying Binary Data in the Data Web Controls. The short of it is that the category images are ugly and use a poor image file format for the web with antequated image quality settings.
Scott proposes that the community band together and develop a new sample database:
I suspect, though, that if we (the community) took a few weeks, did some Skype conference calls, assigned some tasks, brainstormed and did it, we could come up with NotNorthwind. The Lazy Web, the Web of Clay Shirkey, .NET Flash Mobs included, could create a sample database, (we can argue about whether to start in the middle or in the db in the first meeting) as well as some good examples of things like NHibernate, LINQ to SQL or Whatever.
I don't know if this makes the most sense or if it's the best use of time and energy and effort. As Steve Smith points out, the reason Northwind 'works' is because virtually anyone who has attended a Microsoft talk knows what Northwind is already. There's no need to spend 5-10 minutes explaining the data model of some new, community-created database. Steve explains:
The first stated requirement for NotNorthWind is this:
- Complex enough to be called Real World but simple enough that someone could "get it" in 5-10 minutes
That alone is enough for me, as a presenter, to suggest that perhaps this is not a good idea. In the course of such presentations, which usually have 75 minutes or so allocated to them and very little tolerance for going over, I don't have an extra 5-10 minutes per presentation to stop everything and explain what the heck I'm using as my data for this thing. ... Enter NorthWind, the HTTP standard of databases, understood by virtually all Microsoft developers without need for preamble. It just works. With the words, "I'm using Northwind for my database." I now have the complete understanding of 95% of the people in the room - we're all on the same page - and I can continue with the actual point of the presentation or demo, which is not, has not, and probably will never be, "why this database isn't Northwind."
But that isn't Northwinds only selling point. Other benefits include:
It has few enough tables to not overwhelm a person new to the data model, yet enough that interesting and real-world examples can still be drawn from it.
It has stored procedures and views. Granted, there are only a handful of sprocs and views, and neither are very interesting, but at least there are some sprocs and views, so that demos can use these features, if needed.
It has Unicode characters (in the Products.ProductName column).
It has examples of storing binary data directly in the database in the form of the category images, albeit the images leave a lot to be desired.
There are foreign key constraints in place.
It models a common business scenario that everyone can wrap their heads around: products, categories, suppliers, employees, customers, orders, and order details.
And, perhaps most importantly, it is a Microsoft-approved database. In short, Microsoft has the license to use the product names, supplier names, and employee names in Northwind in their literature and technical papers. When reviewing some sort of database viewer for my Toolbox column in MSDN Magazine, I cannot show a screen shot of the tool displaying any old database. Rather, I have to use one of the Microsoft-approved databases: AdventureWorks or Northwind.
I'll be honest, I like Northwind. I don't love it, but I don't hate it, and I certainly don't hate it with the heat of a thousand suns. :-) I used Northwind extensively in my Working with Data tutorials, and I use it in LUG talks and in the classroom. I've used it so often I have many of the values memorized. For example, I can recite from memory the categories in order of CategoryID - Beverages, Condiments, Confections, Dairy, Grains, Meat, Produce, Seafood. I know that Chai Tea is the first product, and Chang the second. I know the big boss man is Andrew Fuller. You could say I have a sort of affinity for this database, its products, categories, employees, and customers. Yes, it is far from perfect and could use some updating with regards to the date/time values and the category pictures, but those warts aside, it does a good job at what it was designed to do.