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
490
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
Όμορφα, γρήγορα και οικονομικά websites με WordPress
wpgr
0
2
Unlocking creativity - Marilia Darilli
wpgr
0
23
Έλλη Μουχτάρη - Χτίσε το προσωπικό σου brand και απόκτησε τους πελάτες που θες
wpgr
0
11
Ioannis Kastorinis - WooCommerce technical automations in the real world
wpgr
0
18
Christos Paloukas - Cache me if you can, a journey through caching layers in WordPress
wpgr
0
30
Ευάγγελος Πάλλης - Malware Cleanup & Protection
wpgr
0
29
Νίκος Μαυράκης - Κοστολογώντας τη δημιουργικότητα
wpgr
0
21
Πώς να διατηρήσω το WordPress site μου ασφαλές;
wpgr
0
35
CSS 101: Τα μυστικά του στυλ - Χάρης Βαλτζής
wpgr
0
36
Other Decks in Programming
See All in Programming
「理解」を重視したAI活用開発
fast_doctor
0
300
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
140
KANNA Android の技術的課題と取り組み
watabee
1
500
By the way Google Cloud Next 2025に行ってみてどうだった
ymd65536
0
130
データと事例で振り返るDevin導入の"リアル" / The Realities of Devin Reflected in Data and Case Studies
rkaga
2
1.6k
複雑なフォームの jotai 設計 / Designing jotai(state) for Complex Forms #layerx_frontend
izumin5210
6
1.6k
REALITY コマンド作成チュートリアル
nishiuriraku
0
120
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
160
AIコーディングの本質は“コード“ではなく“構造“だった / The essence of AI coding is not “code” but "structure
seike460
PRO
2
410
データベースの技術選定を突き詰める ~複数事例から考える最適なデータベースの選び方~
nnaka2992
1
1.4k
プロダクトエンジニアのしごと 〜 受託 × 高難度を乗り越えるOptium開発 〜
algoartis
0
220
Featured
See All Featured
Optimizing for Happiness
mojombo
378
70k
BBQ
matthewcrist
88
9.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Thoughts on Productivity
jonyablonski
69
4.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Building an army of robots
kneath
305
45k
Facilitating Awesome Meetings
lara
54
6.3k
Become a Pro
speakerdeck
PRO
28
5.3k
Done Done
chrislema
184
16k
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