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
450
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
Παραμετροποιώντας το WooCommerce (Customizing WooCommerce)
wpgr
0
46
Enhancing WordPress and WooCommerce - Case study of ymca.gr
wpgr
0
75
Κατανόηση της καταναλωτικής συμπεριφοράς και διαμόρφωση στρατηγικής
wpgr
0
70
Συνδυαστικές στρατηγικές για Επιτυχημένο E- Commerce, Online Merchandising και Digital Marketing
wpgr
0
66
Ρυθμίσεις & styling μλοκ με χρήση του theme.json
wpgr
0
98
Marketing στην πράξη το 2023
wpgr
1
58
Το Metaverse και πώς σχετίζεται με το WordPress!
wpgr
0
95
Γνωριμία με την ομάδα Training
wpgr
0
27
Στρατηγική SEO content για e-commerce websites
wpgr
1
68
Other Decks in Programming
See All in Programming
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
500
初めてDefinitelyTypedにPRを出した話
syumai
0
240
Outline View in SwiftUI
1024jp
1
300
RubyLSPのマルチバイト文字対応
notfounds
0
100
subpath importsで始めるモック生活
10tera
0
110
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
110
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
320
Dev ContainersとGitHub Codespacesの素敵な関係
ymd65536
1
140
Java ジェネリクス入門 2024
nagise
0
700
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
170
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
210
Jakarta EE meets AI
ivargrimstad
0
270
Featured
See All Featured
Code Review Best Practice
trishagee
64
17k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Typedesign – Prime Four
hannesfritz
40
2.4k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
RailsConf 2023
tenderlove
29
900
Building Applications with DynamoDB
mza
90
6.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
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