One of the main things that I haven’t always loved about the previous books is that it wasn’t a perfect reference book. I focused on having a flow throughout the book that, not unlike a school class, started at the beginning and finished at the end. Interspersed were semi-cohesive examples that followed along in an entire chapter (once even for the entire book). The downside to this was that it became necessary to make examples that were often contrived and felt a bit weird at times. So if the desire was to demo the First Normal Form, it was required for me to not immediately eliminate a non-scalar value, have some columns like payment1, payment2, etc. In the real word, no one with any skill does this. You immediately make a new row per value in a comma delimited list that the user wants to store, immediately create a payment table, etc. Even worse there are some tools (like triggers) where there is good value in discussing and demonstrating the power of the tool, but honestly you rarely will make use of them.
So this time, instead of setting up examples with a story, I have a plan to break the skills from the case study style usage examples and hopefully this will give me the ability to have standalone sections for each skill such that as a re-reader you get the skill, sample code, and everything packaged right there in one location. The examples will be less real world in some cases, but I find that more often than not, when I want to find some example, I use bingle (bing then google) find the topic I am looking for, and then copy the code.
This first major section is going to include many such reference bits for the process of modeling the database, which I am calling “Modeling The Database – Base Skills” would be broken down something like:
- Theory/Concepts/Requirements – The basic stuff that you ought to know to get started in relational database. Theory more or less for a history lesson to get you going and understand from whence all of the stuff came from. Admittedly I don’t expect it to be the most read part of the book by any stretch of the imagination, but I do plan on using the information from the pillars blogs I did a few years back (and am developing a new PowerPoint deck based on for a session, perhaps at the Louisville SQL Saturday?) to set the tone and context for the rest of the book.
- Language of Data Modeling – Data modeling using the IDEF1X method with examples in other styles
- Normalization – In many ways, teaching normalization as the individual forms is not completely necessary for people to make progress. But, the fact is, having knowledge of the normal forms is very useful to getting your mind in tune with what you are doing. It very much reminds me of the process of learning calculus. In the first class, we basically spent months on learning how to prove and work through the process of doing a derivative. Then they taught us the trick in 10 minutes of how to do one. The trick is the way to do it, but only once you know why it is done that way.
- Techniques and Patterns – Technically, once you know what and how to do a data model, and you know the techniques involved in normalization, you have all of the tools you need to get started. However, there are many techniques and patterns that regularly show up and knowing what they are can be extremely helpful.
Some of the example patterns I plan to work with include data driven design, uniqueness, optional data, hierarchies, and perhaps even a touch of dimensional design thrown in to illustrate that important method of avoiding denormalization by offloading querying. (I will blog this topic individually once the outline blog series has completed).
- Testing – One of the harshest criticisms I received from the previous edition was the lack of coverage of testing… So in this edition I plan to include the basics of setting up a test plan, particularly as it regards setting up the specifications for testing. In later chapters I will try to pepper sections with ideas for testing, but
By the end of this section, ideally the reader’s toolbox should be loaded up with modeling skills and be ready to do some modeling. In the next section we will apply these skills and actually create a few models. Note that the toolbox will be full of modeling “techniques”, not “implementation” techniques. As a rule, I have pushed those techniques to the latter half of the book. In the third section of the book, I am thinking that starting from the tool (constraint, trigger, procedure, client code, etc.) and demonstrating how to implement the types of techniques and patterns (and doing testing, which in and of itself may end up in the third section in total.)
I am not 100% sure if this is going to be the final way to go or not, but that is why I am doing this in the blog. Writing it out for you is also a mental exercise for me to see how it sounds when I read what I write.