Delicious Brains, the creators of WP Migrate DB, published a guide that walks developers through the WordPress database. The guide describes every database table and there associated columns within WordPress single site. It also features an entity relationship diagram that explains the relationships between the various tables. Although the image was created for WordPress 3.8, it’s still accurate. For those who want to learn the database structure of WordPress Multisite, check out their Multisite database tour as there are some key database changes to take note of: When a WordPress site is converted to a Multisite install, a “network” of subsites is created. The existing site is converted to the first subsite in the network. The database classes the network itself as a site (wp_site), and each subsite as a blog (wp_blogs). Certain tables are used only by a subsite, and a new set of tables are created every time a site is added to the network. Each set of tables is differentiated by the blog_id for the subsite used in the table prefix. e.g.
wp_2_posts. I encourage you to bookmark both guides as they’re excellent resources.