- Wordpress Web Application Development(Third Edition)
- Rakhitha Nimesh Ratnayake
- 257字
- 2021-07-09 19:52:37
Planning the forum application tables
The forum management system developed throughout this book will make use of existing tables in every possible scenario. However, it's hard to imagine even an average web application without using custom tables, so here we will identify the possible custom tables for our system. You might need to revisit the planning section in the Development plan for forum management application section of Chapter 1, WordPress as a Web Application Framework, in order to remind yourself of the system requirements. We planned to create a functionality to allow free and premium members to subscribe to follow topic activities in the system. Let's discuss the requirement in detail to identify the potential tables we'll need.
This is a very simple and practical scenario for identifying the use of custom tables. We can easily scale this up to be compatible with complex systems. Forum members are stored as users of the system. Therefore, we only have a choice of the wp_usermeta table for additional features. It's highly impractical to keep topic updates in the wp_usermeta table, so we need to create our first custom table, which we will call topic_subscriptions, to implement this feature.