Author: way0utwest

  • Version Control for Databases

    This is based on my Team Based Development with Version Control talk, which has evolved a bit.

    Abstract

    Getting your database under version control is ultimately a way of communicating changes and collaborating with team members, maintaining an audit trail and ensuring you always have a version to roll back to.

    In this session, we’ll cover why this gives you and your team a crucial advantage in reducing the risk in your development processes. We’ll also discuss another door that your team opens by adopting solid version control: setting up the fundamentals of continuous integration. You will learn what build automation means as a first step towards continuous integration and the value it brings as part of your evolving deployment process. We’ll also discuss branching strategies, and how to manage this for databases as part of your evolving deployment process.

    Goals

    • Understand the value of version/source control for databases
    • Learn the tools, standards, patterns and best practices needed to manage a database from source control
    • Identify the necessary flow within a team needed to develop a database with source control

    This talk includes the following demos:

    • Move database DDL into VCS manually
    • Link database DDL and lookup data with SQL Source Control
    • Make development changes and check into VCS
    • Setup a new developer DB linked to VCS
    • Changes flowing back and forth between developers
    • Resolving conflicts between development changes made by two people
    • Basic branching of code for bug fixes and linking a database for development work to an old branch

    Length: 45-75 minutes. Shorter lengths with fewer demos.

    Slides: Get Database Under Source Control.pptx (Slideshare)

  • A T-SQL Code Testing Guide

    Do we need a guide for code like this one? The piece linked is from a programmer at Google who gives some code review items that should be tested for. I’m wondering we we might want to have something similar for T-SQL code?

    I’ve given a few talks on how I to get started with tqslt, which is a great framework for unit testing T-SQL code. As I’ve learned more about it, and experimented, I’ve been amazed by how flexible it is and how it makes it easy to setup and run tests on T-SQL code. However I can only experiment with the way I code and the tests I think of, and I’m sure there are many other ways in which we can better verify that our queries work as expected.

    Testing has changed since I developed software in VB and C++. It seems that much thought has been given to building better unit testing that can not only catch bugs, but also ensure the code performs as we expect it to. There’s also the idea that we can run these tests in an automated fashion. That helps prevent some bug when we first write code, but it more often ensures code continues to work as we re-factor our work and enhance our applications. More and more I think that the constant and continuous regression testing is at least as important as initial testing, if not more so.

    I really hope that we improve our development processes and testing methodologies for SQL code. It seems that it’s an area where we can also increase the speed at we build better database applications, and improve the quality at the same time. If any of you are formalizing the testing of your T-SQL code, we would be interested in publishing your thoughts and results for others to learn from. Please feel free to submit an article.

    Steve Jones

     

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.5MB) podcast or subscribe to the feed at iTunes and LibSyn. 

  • Making Better Presentations–Practice

    This is part of a series of tips for speakers on how to make your presentations better.

    There’s one thing that makes a big difference for many speakers.

    Practice

    Practice makes perfect, but more importantly, practice develops familiarity. Everyone gets a little nervous on stage, everyone struggled to memorize their entire talk. The best presenters learn to minimize the amount of thinking they need to do on stage, and build a smooth flow of topics.

    It’s important for you to practice your talks so that you become comfortable with the flow and ordering of your slides. I have typically done the following when I build a new presentation

    • Practice sections as I create them – Actually run through the words in my head.
    • Practice the entire talk of slides out loud – I may do this a few times in my office.
    • Record myself giving the talk and watch for the flow – I rarely do this anymore, but I have done it quite a few times when I was beginning speaking. Even now I’ll see recordings of myself at times and see things I want to improve or remove in my style.
    • Run through the talk the night before, often in my head, quickly, but covering each slide and demo.

    Above all, practice with your demos and code. Learn to move around the system easily and smoothly. Being able to select icons, hit shortcuts, select code, etc. makes your presentations smoother, but it’s also handy in your work. Having these tools quickly move in and out of your way make you a more efficient worker.

    The big things I’d tell people to understand is how to switch to and from Powerpoint. Note that you don’t need to stop the presentation to switch. ALT+Tab to your other application and ALT+TAB back to Powerpoint. The presentation itself will be an app separate from Powerpoint. It will take you 30 seconds to figure it out, but practice.

    Practice, practice, practice.

    Remember, amateurs practice until they get it right. Professionals practice until they don’t get it wrong.

  • The Next Five Years

    On one hand, the next five years don’t seem too far away. Five years, that’s a year more than most of us spent in high school or college. On the the other hand, 5 years ago was a long time in the computer world. Azure first gave us the ability to create a database, as opposed to just a key value store. SQL Server 2008 was the current version of the platform. SQL Saturday #26 was held the first weekend in October in Redmond. 8GB was the large size for flash drives and the iPad hadn’t started the current tablet revolution.

    The world of data has grown dramatically in 5 years. Our cell phones and other devices are drastically changed the amount of data that is collected and consumed. Advances in bandwidth have almost removed the need for us to move all but the largest sizes of data without any physical media. If we look to the next five years, does anyone think they can accurately predict how much storage we’ll maintain in our pockets or how fast we’ll expect to move data on a daily basis?

    I ran across a prediction of surprising things in the next five years, and while I’m not sure I think they will all come true, I do think that similar things will come to pass because of two things: amazing increases in computational power available to any individual and tremendous amounts of data. That’s no great surprise, but I am excited. I can’t help but think that there will be so many opportunities for data professionals that most of us will be gainfully employed for decades.

    I do think, however, that the mundane, easy jobs of administering individual instances, checking logs and backups, and setting security will be few and far between. Unless you know how to do those things for thousands of instances at a time.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.5MB) podcast or subscribe to the feed at iTunes and LibSyn.