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
23
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
30
Unlocking creativity - Marilia Darilli
wpgr
0
61
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
48
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
62
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
69
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
74
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
62
Other Decks in Programming
See All in Programming
CSC305 Lecture 10
javiergs
PRO
0
330
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
210
Amazon ECS Managed Instances が リリースされた!キャッチアップしよう!! / Let's catch up Amazon ECS Managed Instances
cocoeyes02
0
120
オンデバイスAIとXcode
ryodeveloper
0
370
Inside of Swift Export
giginet
PRO
1
270
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.3k
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
34k
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
600
Go言語はstack overflowの夢を見るか?
logica0419
0
670
Google Opalで使える37のライブラリ
mickey_kubo
3
180
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.9k
CSC305 Lecture 11
javiergs
PRO
0
320
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Producing Creativity
orderedlist
PRO
348
40k
Building Applications with DynamoDB
mza
96
6.7k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Balancing Empowerment & Direction
lara
5
710
Typedesign – Prime Four
hannesfritz
42
2.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
950
Automating Front-end Workflow
addyosmani
1371
200k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
900
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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