I am getting ready to put together a few sample applications to show off some of my favorite JavaScript libraries and demonstrate just how easy they make building AJAX enabled web applications. To simplify the process I was planning to use a little SubSonic magic to wire up REST interface to my database. But what to what database?
Hello Northwind!
Well the Northwind database, naturally! Problem is, I use SQL Server 2005 on both my main dev box and my laptop and it doesn’t include the sample databases. Actually, that’s entirely not true.
Hello AdventureWorks...?
As of SQL Server 2005 the new Microsoft provided sample applications are built against the AdventureWorks database. So when you install SQL Server 2005 and it’s sample databases, that’s what you get... no Northwind to be found. Fear not!
Likely due to Redmond’s obsession, to the point of insanity, with backwards compatibility you can still download the Northwind and Pubs databases. The download is just an installer that unpacks a few files to C:\SQL Server 2000 Sample Databases\.
Installing Northwind
Run the installer and then browse to the above location. Once you get there you have 2 options:
- Attach the pre-build databases (the .mdf and .ldf files) to your SQL Server instance
- Run the .sql scripts against your SQL Server instance to build out the databases - complete with data!
Personally I’m a fan of running the .sql scripts as it just feels more natural to me, but do what makes you happy.
Now... back to building out those sample apps!