SQL Homework – October 2017 – Sample/Test Database(s)
3October 2, 2017 by Kenneth Fisher
Last month your homework was to set up your own lab. Now it’s time to put a sample database or two on at least one SQL instance. Microsoft has provided copies of AdventureWorks for years and recently switched over to Wide World Importers.
Download the database backups
- AdventureWorks
- Wild World Importers: Info/Download
Then pick your instance(s) (if you have more than one) and restore them.
Simple enough and again, no grade involved. However for bonus points download the sample scripts, unzip them and review them. Really all we are doing here is setting up a place to work and test things.
I also recommend:
- Keep the backups so you can restore over any changes you have made. Over time, with lots of practicing, making changes etc they get a bit scrambled so it’s easier to just overwrite them.
- Create a Test database. This will give you a place to create new tables, code, whatever that you don’t want to put in your AW or WWI databases.
- Don’t be afraid to add a new database to test things like in-memory, filestream etc that require additional filegroups.
- This is a practice environment and most of what you are creating probably won’t be something you care about saving, but best practices are always a good idea. Regular backups, index maintenance, etc are always a good idea and good practice.
[…] the code behind two or more of the existing views in whatever sample database(s) you set up last month. (20 […]
[…] been just putting down things as I think of them. In September I had you set up a home lab, and in October I had you download and attach some sample databases. What would have been the next logical step? […]
[…] In general this homework series is meant to give you ideas of things to play with that most if not all data professionals are going to end up touching eventually. Personally, I’ve found it nice to have a little bit of practice ahead of time whenever possible. This month I want you to take a look at table sizes. This will work best if you have a few tables with at least a reasonable amount of data in them. If you don’t already have some from previous testing you can either create a few or use a sample database. […]