As seen in Chapter 4, The Power of Custom Post Types, custom post types provide a very powerful and easy way to create and manage custom content in a WordPress installation. That being said, if the new items that you wish to create do not benefit from having access to the built-in text editor and have a large amount of data fields that need to be stored in the system, storing them using custom post types can actually become cumbersome. More specifically, each custom field requires a separate function call to be associated with a custom post. Also, custom fields have limited functionality, since they store all their information in simple text fields, making it difficult to perform ordered queries based on special data types, such as dates.
An alternative solution to manage custom content is to create new tables in the website's database and offer a custom interface to manage these new items.
While working directly with the website database might sound like a tall order, and should really only be done if custom post types don't work as desired, WordPress actually offers a utility class that makes it very easy to create new database tables, store information in these new structures, and perform data retrieval queries. While having a basic level of Structured Query Language (SQL) knowledge will help understand all of the recipes in this chapter while we create a bug tracking system, each recipe thoroughly explains how each command works to produce the end result.