Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Mauricio Gelves - WordPress Database: What’s be...
Search
WordPress Greek Community
November 19, 2016
Programming
2
510
Mauricio Gelves - WordPress Database: What’s behind those 12 tables - WordCamp Athens 2016
WordPress Greek Community
November 19, 2016
Tweet
Share
More Decks by WordPress Greek Community
See All by WordPress Greek Community
Thanassis Zannias - Flexible WordPress Dev Environment with Docker
wpgr
0
16
Andreas Karavanas - AI Supercharged Landing Pages
wpgr
0
21
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
28
Unlocking creativity - Marilia Darilli
wpgr
0
59
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
46
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
59
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
68
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
73
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
57
Other Decks in Programming
See All in Programming
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
8
1.4k
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
240
React Nativeならぬ"Vue Native"が実現するかも?_新世代マルチプラットフォーム開発フレームワークのLynxとLynxのVue.js対応を追ってみよう_Vue Lynx
yut0naga1_fa
2
460
What's new in Spring Modulith?
olivergierke
1
170
AI 駆動開発におけるコミュニティと AWS CDK の価値
konokenj
5
210
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
110
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
270
Introduce Hono CLI
yusukebe
6
3.1k
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.2k
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
140
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
260
ALL CODE BASE ARE BELONG TO STUDY
uzulla
27
6.6k
Featured
See All Featured
Fireside Chat
paigeccino
40
3.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
A better future with KSS
kneath
239
18k
Scaling GitHub
holman
463
140k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Transcript
WordPress Database: What’s behind those 12 tables? Mauricio Gelves |
@maugelves
Do you know this Masterpiece?
None
None
None
A love story
None
Set of columns Data types Indexes The table anatomy
Table rows
I’m Rebel!
Normalization
Process to avoid: • Data redundancy • Unnecessary updates •
Data integrity problems
None
None
None
None
None
WordPress code of conduct: No political jokes are allowed
UPDATE tbl_students SET president = '<new president name>' WHERE president
= 'Prokopis Pavlopoulos' On every change:
Normalized tables: FK’s (Foreign Keys)
¿Is WordPress Rebel?
• wp-posts • wp-term-taxonomy
None
None
None
33,3333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333 333333333333333333333333333333333333333
333333333333333333333333333333333333333 333333333333333333333333333333333333…%
¿Why WordPress powers 26% of all websites?
ES FLEXIBLE
KEY => VALUE
wp_posts WordPress’ Heart.
wp_posts
¿Where’s the rest of the information?
Meta Tables wp_posts => wp_postmeta wp_users => wp_usermeta wp_comments =>
wp_commentmeta wp_terms => wp_termmeta
KEY VALUE => wp_posts
KEY VALUE => Usuarios
SHE ’S ORGANIZED
KEY VALUE => wp_options
SHE’S ADAPTABLE
Taxonomies
Taxonomías Simple terms Which taxonomy has?
Es muy fácil comunicarse con ella: Diapositiva: una mujer con
un teléfono It’s easy to talk to her
SQL Structured Query Language
Estructura de consulta: Which column/s? Which table/s? Should we filter
the search?
¿Do we have to know SQL to work with WordPress?
WordPress Functions:
What if we need Meta values?
WordPress Functions:
and for more complex searches?
WP_Query
None
None
None
CUSTOM TABLES How and why?
Why Custom Tables?: • Efficiency (Inner joins) • Efficiency (calculated
fields) • Space (uncompleted fields) • Data security
How to create a Custom Tables?: • Create it on
plugin/theme activation
None
How to create a Custom Tables?: • Create it on
plugin/theme activation • UI implementation with WP_List class
None
http://wpengineer.com/2426/wp_list_table-a-step-by-step-guide/
Because of this and more I’m in love with the
WordPress database.
Thank you! @maugelves