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
460
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
CSS 101: Τα μυστικά του στυλ - Χάρης Βαλτζής
wpgr
0
5
Ολοκλήρωσα το SiteΜουNowWhat? - Στέφανος Παρασκευόπουλος
wpgr
0
7
Effective personal and business branding - Maria Zarotiadou
wpgr
0
9
Web Accessibility: Hardships, pitfalls, opportunities, and preparing for European Accessibility Act 2025 - Χρήστος Μπαφέρας
wpgr
0
15
Code, Test, Repeat: Accelerating Development with WordPress Playground - Uros Tasic
wpgr
0
9
Make your users’ search experience great - Nico Orfanos
wpgr
0
15
WooCommerce Automations: Revolutionizing eCommerce with Practical Solutions - Ioannis Kastorinis
wpgr
0
17
Block themes: The future of Full Site Editing and what to expect from WordPress 6.7 - Alexandros Kaounas
wpgr
0
9
Forking the GPL way - Βαγγέλης Παπαϊωάννου, Ορέστης Σαμαράς
wpgr
0
9
Other Decks in Programming
See All in Programming
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
layerx_20241129.pdf
kyoheig3
2
290
fs2-io を試してたらバグを見つけて直した話
chencmd
0
220
Full stack testing :: basic to basic
up1
1
930
Security_for_introducing_eBPF
kentatada
0
110
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
CSC509 Lecture 14
javiergs
PRO
0
130
14 Years of iOS: Lessons and Key Points
seyfoyun
1
770
선언형 UI에서의 상태관리
l2hyunwoo
0
140
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
40
7.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
Thoughts on Productivity
jonyablonski
67
4.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Agile that works and the tools we love
rasmusluckow
328
21k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Building an army of robots
kneath
302
44k
Practical Orchestrator
shlominoach
186
10k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
Making the Leap to Tech Lead
cromwellryan
133
9k
Site-Speed That Sticks
csswizardry
2
190
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