HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to generate the E-R Diagram of Wordpress using mySQL Workbench

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
theworkbenchwordpressdiagramgeneratemysqlusinghow

Problem

I am trying to generate the E-R Diagram of Wordpress using the 'Reverse Engineer' feature. There is a slight obstacle though.
The diagram does not show the relationships between the entities. Is this the way it's supposed to work or am I missing something?

Solution

The EER diagram is correct. There should be no relationships because WordPress does not have any constraints. The EER diagram shown in the codex is only for reference (it's a dummy EER diagram). You must rely on other logical operations to make sure you have no orphaned data.

Source: https://codex.wordpress.org/Database_Description


Please note that within the standard installation of WordPress no
integrity between the tables is enforced e.g. between posts and
comments. If you are creating a plugin or extension that manipulates
the WordPress database, your code should do the housekeeping so that
no orphan records remain in the tables e.g. by removing records in
other tables with a set of SQL commands when foreign keys are deleted
(Don't forget to remind users to backup before such operations).

Context

StackExchange Database Administrators Q#72453, answer score: 5

Revisions (0)

No revisions yet.