Custom Database Table

If you are looking forward to developing WordPress plugins which will rely heavily on the database for storing data, you might want to consider using a custom database table. A custom database table can come in handy when the data you are trying to store is structured differently from the existing database schema.

Explore the videos for insights and tutorials on the Custom Database Table. This section comprises 3 modules with a combined duration of 46 minutes.

Video ContentTime
WPDB Class Overview 13:36
CRUD Operations on Custom Database15:48
Deep Dive into wpdb class17:13

If you are not sure when you need a custom database table or how to create one, including its pros and cons, have a look at the below resources –

Ideas to Explore:

  • How will you create a custom table in WordPress?
  • How will you perform CRUD operations on the custom tables in WordPress?
  • If you run a SQL query on WordPress database on wp_posts table with a WHERE clause like post_author = <something>, what do you think the time complexity of that query will be?
  • Assuming we made changes to our custom database schema that our plugin creates on activation hook, how can we ensure that those changes will be applied when the plugin is updated(the plugin is already installed and active)?

References