DC web design news

The wordpress data model

In this analysis I’m going to talk about the data model in WordPres for a single instance that works for any other installation with multisites. I’m gonna supose that the prefix table is “wp_”.

WordPress is a CMS that started being a blog system, and later evolved to a multi-purpose content management system. Then , It could be the reason of his structure that has been maintained a long time to have it it simple and clear.

The WordPress Database

A site created in this CMS is based basically in posts, users, options and comments. As you can see in the figure, there are only 11 tables.

Wordpress database image

You would say,  where are the pages, menus, plugins, categories, widgets? The answer is: they are there, inside those tables, using a specific logic to add easily any new implementation. In most cases, the database does not grow when you add new functionalities.

From my point of view I would say that this CMS is structured in 3 essential parts: users, content and options.

WordPress Users

The users have a table where are stored: administrators, subscribers, editors, authors, contributors. The aditional information for the users are stored at wp_user_meta, in this table plugins save personalized options for each user without use aditional tables.

WordPress Content

Posts, pages, media are saved in wp_posts, some extra fields in the table to filter  each type of content and the help of “wp_postmeta” are enough to extend wordpress from a simple blog system to a system where is possible to create, edit and delete any content based in html, JavaScript or RIAs.

The other part of the content is composed by two concepts: terms and taxonomy. These tables store the information related to categories, menus and organization of the WordPress content.

WordPress Options

It´s the heart of the CMS, where you find since the title and site url to the configurations for sidebars, widgets and plugins. WordPress has special functions to access and save the options information easily for any purpose: starting with specific core functions and others that are extended by programmers.

Conclusions

WordPress has many detractors that say  It shouldn’t be considered a CMS, that It’s obsolete because we have other options with Object oriented programming, and tools that make easier the work for the programmer. In the market we could have  other ‘sophisticated’ options like drupal, joomla, between others; ok, they are good, but why they have to make taks complex for the user?. WordPress is usable starting in the conception, If it’s not easy for the programmer or he/she doesn’t have a framework to follow, Does is matter? WordPress is pure php+MySql with a simple data model, then if you want to have a disorganized code you can, if you want to have a good structured code using OOP + MVC you can. The important point is to have the concept clear in your mind: users, content, options. Programmers develop for the final users, not for other programmers, then what is the best option? I think It’s another discussion.

A blog dedicated to small business startups, technology trends, online marketing, and web accessibility by Blake Newman: SEO expert, social media enthusiast and Internet pioneer since 1995.

If you are an effective communicator, have something interesting and valuable to say to our readers and are interested in being a guest blogger for inQbation™, please send us a writing sample to blake (at) the name of this website dot com.
Close
technology-cit-bulding
Contact Us

inQbation headquarters is located at the Center for Innovative Technology (CIT) building at Washington DC´s Dulles International Airport and Route 28 in Herndon, Virginia.

The CIT building is also home to George Mason University (GMU) executive programs and the Northern Virginia Technology Council.

Washington, DC

2214 Rock Hill Road, Suite 010
Herndon, VA 20170-4228

icon-email resultsatinqbation.com icon-phone 703.999.1232
inQbation Contact Us