Parts of the course

This course has four parts corresponding to the following categories of antipatterns:

Logical antipatterns

In this part, we’ll discuss what information we need to keep in our database, and the best way to organize and interconnect our data. This includes planning database tables, columns, and relationships.

Physical antipatterns

In this part, we’ll discuss how to implement data management as efficiently as we can using the features of RDBMS technology after deciding what data we need to store. This includes defining tables and indexes, and choosing data types. We use the statements of SQL’s data definition language, such as CREATE TABLE.

Query antipatterns

In this part, we’ll look at how to add data to our database and then retrieve data. SQL queries are made with data manipulation language—statements such as SELECT, UPDATE, and DELETE.

Application development antipatterns

SQL is supposed to be used in the context of applications written in another language, such as C++, Java, PHP, Python, or Ruby. There are right ways and wrong ways to employ SQL in an application, and this part of the course describes some common blunders.

Many of the antipattern chapters have humorous or evocative titles, such as Golden Hammer, Reinventing the Wheel, or Design by Committee. It’s traditional to name positive design patterns and antipatterns such that the names serve as metaphors or mnemonics that describe their functions.

Anatomy of an antipattern

Each antipattern chapter contains lessons that have the following parts:

Synopsis

This contains the introduction to the problem that we are trying to solve. As we will see, antipatterns are used with the intention to provide a solution, but they end up causing more problems than they solve. (However, rules usually have exceptions. There may be circumstances in which an approach normally considered an antipattern is nevertheless appropriate for the task.)

This part also includes a topic on the legitimate uses of the related antipattern.

Antipattern

This section describes the nature of the commonly employed solution to the problem and illustrates the unforeseen consequences that make it an antipattern.

Solution

This section describes the more appropriate solution, which solves the original objective without running into problems caused by the antipattern.

How to recognize an antipattern

There may be certain clues that help us identify when an antipattern is being used in our project. Certain types of barriers we encounter, or phrases we hear ourselves or others using, can tip us off to the presence of an antipattern. We will have multiple assessments throughout the course based on these clues.