• Hi, I am reading the database of WordPress, when I come to wp_usermeta, I think that what’s in wp_usermeta can be combine into wp_users, isn’t it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • No. Actually I lean toward thinking that some stuff (the role/capability stuff) in wp_usermeta should be shifted to still another table and that some stuff in wp_users, like user_url, should be shifted to wp_usermeta, but that is another fight :).

    Splitting the tables has to do with a few things. Top of the list, I think is this: Look at your usermeta table, or run this SELECT user_id,COUNT(user_id) as count FROM wp_usermeta GROUP BY user_id on it. Users have different numbers of entries in the usermeta table. How are you going to deal with that if everything is in the same table? Add a bunch of extra columns to the wp_users table? The same issue comes up when someone wants to add additional information. As it is, a plugin or theme author can shove additional userdata into the usermeta table rather that create another table.

    Thread Starter wordpressthemes

    (@zacklive)

    Thanks for your explanation, apljdi

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Why not combine wp_usermeta into wp_users table?’ is closed to new replies.