SlideShare une entreprise Scribd logo
1  sur  11
Télécharger pour lire hors ligne
Plan Before You Build: 
Data Architecture 
Planning 
Phil Lewis, @pglewis13 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
Considerations 
● Relational database structure 
● Performance 
● WordPress interoperability 
● What you need to do with the data 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
Database Basics 
● Single big flat table (spreadsheet approach) 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
Database Basics 
● Single big flat table (spreadsheet approach) 
● Normalization 
● Entities and relationships 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
Performance is Not the Only Consideration 
● Otherwise we’d just go for the fastest approach 
● Often performance is good enough to allow for 
compromise 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
Why use native WordPress settings pages 
○ A Pod without any items in it. 
○ Perfect for use in a front-page.php template 
○ Way easier than using WordPress Settings API 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
Why choose native WordPress content types? 
● Native custom post types and taxonomies/tags 
● Interoperability with well written plugins and themes 
● Automatic URL rewriting, archive pages, template 
hierarchy friendly 
● Leverage existing knowledge of the WordPress codex 
functions without a need for the extra learning curve 
of a new API 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
What is meta (EAV)? 
● WordPress is used by over 60% of all web sites where the 
CMS is known. 
● They’ve managed to do this with only 11 database tables 
in a basic, non-multisite installation 
● Easier to understand therefore easier to adopt 
● Posts and users have meta tables; taxonomies do not (yet) 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
EAV Example 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
What is EAV good at? 
● Flexibility: an item can have no meta attached, or 100 
pieces of meta 
● Easy to provide interoperability: everything fits in the 
same sized box 
● Avoids extra tables when using on LARGE setups 
(WordPress.com for example, MILLIONS OF TABLES) 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
What is EAV not so good at? 
● Scales very poorly: 
# meta fields * number items = # meta rows 
● Text field indexes are a lot slower than integers 
○ Affects sorting and filtering on meta fields 
● SQL complexity with a lot of meta fields can lead to a lot 
of joins (tricks here) 
Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014

Contenu connexe

En vedette (14)

Aggregate - Concrete Technology
Aggregate - Concrete TechnologyAggregate - Concrete Technology
Aggregate - Concrete Technology
 
Dental cement dental material
Dental cement dental materialDental cement dental material
Dental cement dental material
 
Properties of aggregrate
Properties of aggregrateProperties of aggregrate
Properties of aggregrate
 
Cement
CementCement
Cement
 
Aggregates of Concrete
Aggregates of ConcreteAggregates of Concrete
Aggregates of Concrete
 
Properties of Cement
Properties of CementProperties of Cement
Properties of Cement
 
Aggregates ppt
Aggregates pptAggregates ppt
Aggregates ppt
 
Stone masonary
Stone masonaryStone masonary
Stone masonary
 
Bamboo construction (final ppt)
Bamboo construction (final ppt)Bamboo construction (final ppt)
Bamboo construction (final ppt)
 
Construction material lime
Construction material limeConstruction material lime
Construction material lime
 
MODALS PPT
MODALS PPTMODALS PPT
MODALS PPT
 
Building Materials for Construction
Building Materials for Construction Building Materials for Construction
Building Materials for Construction
 
Stone Masonry BUILDING CONSTRUCTION
Stone Masonry BUILDING CONSTRUCTIONStone Masonry BUILDING CONSTRUCTION
Stone Masonry BUILDING CONSTRUCTION
 
MORTAR BUILDING MATERIALS
MORTAR BUILDING MATERIALSMORTAR BUILDING MATERIALS
MORTAR BUILDING MATERIALS
 

Dernier

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

Plan Before You Build: Data Architecture Planning

  • 1. Plan Before You Build: Data Architecture Planning Phil Lewis, @pglewis13 Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 2. Considerations ● Relational database structure ● Performance ● WordPress interoperability ● What you need to do with the data Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 3. Database Basics ● Single big flat table (spreadsheet approach) Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 4. Database Basics ● Single big flat table (spreadsheet approach) ● Normalization ● Entities and relationships Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 5. Performance is Not the Only Consideration ● Otherwise we’d just go for the fastest approach ● Often performance is good enough to allow for compromise Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 6. Why use native WordPress settings pages ○ A Pod without any items in it. ○ Perfect for use in a front-page.php template ○ Way easier than using WordPress Settings API Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 7. Why choose native WordPress content types? ● Native custom post types and taxonomies/tags ● Interoperability with well written plugins and themes ● Automatic URL rewriting, archive pages, template hierarchy friendly ● Leverage existing knowledge of the WordPress codex functions without a need for the extra learning curve of a new API Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 8. What is meta (EAV)? ● WordPress is used by over 60% of all web sites where the CMS is known. ● They’ve managed to do this with only 11 database tables in a basic, non-multisite installation ● Easier to understand therefore easier to adopt ● Posts and users have meta tables; taxonomies do not (yet) Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 9. EAV Example Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 10. What is EAV good at? ● Flexibility: an item can have no meta attached, or 100 pieces of meta ● Easy to provide interoperability: everything fits in the same sized box ● Avoids extra tables when using on LARGE setups (WordPress.com for example, MILLIONS OF TABLES) Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014
  • 11. What is EAV not so good at? ● Scales very poorly: # meta fields * number items = # meta rows ● Text field indexes are a lot slower than integers ○ Affects sorting and filtering on meta fields ● SQL complexity with a lot of meta fields can lead to a lot of joins (tricks here) Plan Before You Build: Data Architecture Planning // Phil Lewis // PodsCamp 2014