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 behind those 12 tables - WordCamp Athens 2016
Search
WordPress Greek Community
November 19, 2016
Programming
2
400
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
Enhancing WordPress and WooCommerce - Case study of ymca.gr
wpgr
0
26
Κατανόηση της καταναλωτικής συμπεριφοράς και διαμόρφωση στρατηγικής
wpgr
0
27
Συνδυαστικές στρατηγικές για Επιτυχημένο E- Commerce, Online Merchandising και Digital Marketing
wpgr
0
39
Ρυθμίσεις & styling μλοκ με χρήση του theme.json
wpgr
0
72
Marketing στην πράξη το 2023
wpgr
1
44
Το Metaverse και πώς σχετίζεται με το WordPress!
wpgr
0
77
Γνωριμία με την ομάδα Training
wpgr
0
15
Στρατηγική SEO content για e-commerce websites
wpgr
0
48
Είμαι Freelancer, πώς να κάνω personal branding
wpgr
0
32
Other Decks in Programming
See All in Programming
元気予報
suu_mire0726
0
860
1인 개발자로 행복하게 살기 - GDG 송도 헬로월드 2024
benjaminkim
1
5.6k
Folding Cheat Sheet #1
philipschwarz
PRO
0
210
二郎系ラーメンのコールで学ぶ AST 解析
memory1994
PRO
7
1.7k
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
330
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
0
190
Doctrine ORMでValue Objectを扱う方法4選 #phpstudy / 4 ways to handle Value Objects with Doctrine ORM
77web
4
110
GitHub Actionsで泣かないためにやっておきたい設定 / Recommended GHA settings to avoid crying
pinkumohikan
3
490
CQRS/ES avec Symfony, c’est (trop) bien !
jeremyfreeagent
1
630
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
340
Ruby Pattern Matching
bkuhlmann
0
920
What We Can Learn From OSS
inouehi
0
400
Featured
See All Featured
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Designing with Data
zakiwarfel
95
4.8k
The Brand Is Dead. Long Live the Brand.
mthomps
48
28k
The Illustrated Children's Guide to Kubernetes
chrisshort
29
46k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
6
990
Debugging Ruby Performance
tmm1
70
11k
How to train your dragon (web standard)
notwaldorf
72
5.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
240
1.2M
WebSockets: Embracing the real-time Web
robhawkes
59
7k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
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