Extending a database with custom tables

Default WordPress databases can be extended by any number of custom tables to suit our project requirements. The only thing we have to consider is the creation of custom tables over existing ones. We can think of two major reasons for creating custom tables:

  • Difficulty of matching data with existing tables: In the previous section, we considered real application requirements and matched the data with the existing tables. Unfortunately, it's not practical in all scenarios. Consider a system where the user purchases books from a shopping cart. We need to keep all the payment and order details for tracking purposes, and these records act as the transactions in the system. There is no way that we can find a compatible ...

Get WordPress Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.