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
500
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
9
Andreas Karavanas - AI Supercharged Landing Pages
wpgr
0
14
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
17
Unlocking creativity - Marilia Darilli
wpgr
0
45
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
30
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
44
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
50
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
56
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
39
Other Decks in Programming
See All in Programming
実践!App Intents対応
yuukiw00w
1
230
11年かかって やっとVibe Codingに 時代が追いつきましたね
yimajo
1
260
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
570
Gemini CLIの"強み"を知る! Gemini CLIとClaude Codeを比較してみた!
kotahisafuru
3
970
「リーダーは意思決定する人」って本当?~ 学びを現場で活かす、リーダー4ヶ月目の試行錯誤 ~
marina1017
0
210
AIに安心して任せるためにTypeScriptで一意な型を作ろう
arfes0e2b3c
0
340
大規模FlutterプロジェクトのCI実行時間を約8割削減した話
teamlab
PRO
0
460
AHC051解法紹介
eijirou
0
420
Google I/O Extended Incheon 2025 ~ What's new in Android development tools
pluu
1
270
QA x AIエコシステム段階構築作戦
osu
0
260
バイブコーディング × 設計思考
nogu66
0
110
それ CLI フレームワークがなくてもできるよ / Building CLI Tools Without Frameworks
orgachem
PRO
17
3.8k
Featured
See All Featured
Docker and Python
trallard
45
3.5k
Unsuck your backbone
ammeep
671
58k
Writing Fast Ruby
sferik
628
62k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
47
9.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Adopting Sorbet at Scale
ufuk
77
9.5k
We Have a Design System, Now What?
morganepeng
53
7.7k
Designing Experiences People Love
moore
142
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
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