SlideShare a Scribd company logo
One Size fits All




                             David Funaro
domenica 3 aprile 2011
-
                         One Size fits-All




                             David Funaro
domenica 3 aprile 2011
Why i’m Here

                         “There must be a better way to
                         design this model”
                         ?????????????????????????????????


domenica 3 aprile 2011
Evolution of the persistence

                                          TIME
                           ’60

                         Application




                SINGLE USER

               Everything in inside the
               application, every time
               we have to spend time
               to reinvent the wheel


domenica 3 aprile 2011
Evolution of the persistence

                                                  TIME
                           ’60                  ’70/80

                                                Application
                         Application
                                                  Library



                SINGLE USER                SINGLE USER

               Everything in inside the
                                          a good way to develop. All
               application, every time
                                          the business logic is in the
               we have to spend time
                                          Library
               to reinvent the wheel


domenica 3 aprile 2011
Evolution of the persistence

                                                  TIME
                           ’60                  ’70/80                          ’90

                                                Application
                         Application
                                                  Library
                                                                              RDBMS


                SINGLE USER                SINGLE USER                      MULTI-USER

               Everything in inside the
                                          a good way to develop. All
               application, every time
                                          the business logic is in the   Centralized storage of the
               we have to spend time
                                          Library                        model
               to reinvent the wheel


domenica 3 aprile 2011
Data-Driven
                         Application Design


                                   Data




                               Application
domenica 3 aprile 2011
Way to Develop

          • Define ER:
           • Indentify every Entities
           • Foeach entity find all the
                         attributes




domenica 3 aprile 2011
Active Record


                “Active record is an approach to accessing data in a
                 database. A database table or view is wrapped into
                                      a class.”
                                                             Wikipedia




domenica 3 aprile 2011
...but NOT always



domenica 3 aprile 2011
...but NOT always
                           is the right way


domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                  Event
                   User_id    100              id : 12
                   event_id   12




domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                  Event
                   User_id    100              id : 12
                   event_id   12

                                           Document
                                            id : 54




domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                  Event
                   User_id    100              id : 12
                   event_id   12

                                           Document
                                            id : 54


                                               Group
                                               id : 78


domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                  Event
                   User_id    100              id : 12
                   event_id   12

                                              Document
                           UserEntity          id : 54
                     User_id          100
                       Class       Document
                     entity_id         12      Group
                                               id : 78


domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                  Event
                   User_id    100              id : 12
                   event_id   12

                                              Document
                           UserEntity          id : 54
                     User_id          100
                       Class       Document
                     entity_id         12      Group
                                               id : 78


domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                  Event
                   User_id    100              id : 12
                   event_id   12

                                              Document
                           UserEntity          id : 54
                     User_id          100
                       Class       Document
                     entity_id         12      Group
                                               id : 78


domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                  Event
                   User_id    100              id : 12
                   event_id   12

                                              Document
                           UserEntity          id : 54
                     User_id          100
                       Class       Document
                     entity_id         12      Group
                                               id : 78


domenica 3 aprile 2011
1:Real Case: plugin
                    UserEvent                             Event
                   User_id    100                         id : 12
                   event_id   12

                                                         Document
                           UserEntity                     id : 54
                     User_id          100
                       Class       Document
                     entity_id         12                 Group
                                                          id : 78
                                    Integrity : Broken
domenica 3 aprile 2011
1:Real Case: Redundance
                 UserEvent
                                  Event
                User_id    100
                                  id : 12
                event_id   12

           UserDocument
            User_id   100        Document
          document_id 12          id : 54

             UserGroup
                                  Group
            User_id   100
                                  id : 78
          document_id 12


domenica 3 aprile 2011
1:Real Case: menu
      Home:
      •page
      •event
      •group
      •document




domenica 3 aprile 2011
1:Real Case: menu
                                      Menu
                              name           home
      Home:                menu_item_id        2
      •page
      •event
      •group
      •document




domenica 3 aprile 2011
1:Real Case: menu
                                       Menu
                              name               home
      Home:                menu_item_id            2
      •page
      •event                          MenuItem
      •group                   name              home
      •document             menu_item_id            2
                                class            Group
                              entity_id            id




domenica 3 aprile 2011
1:Real Case: menu
                                       Menu
                              name               home
      Home:                menu_item_id            2
      •page
      •event                          MenuItem
      •group                   name              home
      •document             menu_item_id            2
                                class            Group
                              entity_id            id



         Event
         id : 12


domenica 3 aprile 2011
1:Real Case: menu
                                       Menu
                              name               home
      Home:                menu_item_id            2
      •page
      •event                          MenuItem
      •group                   name              home
      •document             menu_item_id            2
                                class            Group
                              entity_id            id



         Event                                           Document
         id : 12                                          id : 54


domenica 3 aprile 2011
1:Real Case: menu
                                       Menu
                              name               home
      Home:                menu_item_id            2
      •page
      •event                          MenuItem
      •group                   name              home
      •document             menu_item_id            2
                                class            Group
                              entity_id            id



         Event                        Group              Document
         id : 12                      id : 78             id : 54


domenica 3 aprile 2011
1:Real Case: menu
                                       Menu
                              name               home
      Home:                menu_item_id            2
      •page
      •event                          MenuItem
      •group                   name              home
      •document             menu_item_id            2
                                class            Group
                              entity_id            id



         Event                        Group              Document
         id : 12                      id : 78             id : 54


domenica 3 aprile 2011
1:Real Case: menu
                                       Menu
                              name               home
      Home:                menu_item_id            2
      •page
      •event                          MenuItem
      •group                   name              home
      •document             menu_item_id            2
                                class            Group
                              entity_id            id



         Event                        Group              Document
         id : 12                      id : 78             id : 54


domenica 3 aprile 2011
1:Real Case: menu
                                       Menu
                              name               home
      Home:                menu_item_id            2
      •page
      •event                          MenuItem
      •group                   name              home
      •document             menu_item_id            2
                                class            Group
                              entity_id            id



         Event                        Group              Document
         id : 12                      id : 78             id : 54


domenica 3 aprile 2011
Impedence
           mismatch

domenica 3 aprile 2011
Design Model




domenica 3 aprile 2011
Design Model           Application Needs




domenica 3 aprile 2011
Design Model           |
                         =   Application Needs




domenica 3 aprile 2011
Design Model                           |
                                         =           Application Needs

                 Comportamenti che i modelli non sono in grado di supportare




domenica 3 aprile 2011
Arrangement


  Design Model                           |
                                         =           Application Needs

                 Comportamenti che i modelli non sono in grado di supportare




domenica 3 aprile 2011
Technology focus




domenica 3 aprile 2011
Technology focus




domenica 3 aprile 2011
Bad RDBMS Cases



domenica 3 aprile 2011
Data Mapping
                 Struttura Dati           RDBMS

                                          id    10


                                      name     pippo


                                   parent_id    19




domenica 3 aprile 2011
The Alien


                            Different Behaviour
                            Different Model




domenica 3 aprile 2011
Unpredictable
                            Tomorrow

                    • User Story never complete
                    • User Story evolve


domenica 3 aprile 2011
Bad DBMS Cases
                • Dynamic Pages
                • Data mapping
                • The Alien
                • Producer/Consumer
                • Overnormalized
                • Unpredictable tomorrow
domenica 3 aprile 2011
Bad DBMS Cases
                • Dynamic Pages
                • Data mapping
                • The Alien
                • Producer/Consumer
                • Overnormalized
                                           =
                • Unpredictable tomorrow
domenica 3 aprile 2011
Bad DBMS Cases
                • Dynamic Pages
                • Data mapping
                • The Alien
                • Producer/Consumer
                • Overnormalized
                                           =
                • Unpredictable tomorrow
domenica 3 aprile 2011
NoSql




domenica 3 aprile 2011
NoSql

                           Not Only
                             Sql


domenica 3 aprile 2011
NoSql

                             Not Only
                               Sql
                         Just find the right way
                         to manage our data-set
domenica 3 aprile 2011
NoSql



domenica 3 aprile 2011
document-                   document-
          TYPE             oriented
                                        key-value
                                                       oriented
                                                                      graph


                          Reliability /             Performance /
       FOCUS             doc-oriented
                                        Performance
                                                    doc-oriented
                                                                  edge relations

                                                                   Schema-less
     SCHEMA              Schema-less   Schema-less   Schema-less   Schema-full
                                                                      Mixed

domenica 3 aprile 2011
Performance


                    • Redis : about 110000 SETs per second,
                         about 81000 GETs per second.




domenica 3 aprile 2011
TYPE
                             Key - Value


                         ‘nome’ -> ‘Davidino’


domenica 3 aprile 2011
TYPE              document-Oriented


         ‘person’ -> ‘{
         ‘name’ : ‘david’,
         ‘surname’ : ‘funaro’,
         phones: [
              34702323,
              233234124,
              134014
            ]
         }’
                                                     JSon
domenica 3 aprile 2011
TYPE
                         Graph DB




                                    JSon
domenica 3 aprile 2011
More ...


domenica 3 aprile 2011
So ?




domenica 3 aprile 2011
So ?
                    • Removing impedence mismatch is a
                         good reason to avoid the relational
                         model




domenica 3 aprile 2011
So ?
                    • Removing impedence mismatch is a
                         good reason to avoid the relational
                         model
                    • Performances aren’t the only reason to
                         choose NoSQL




domenica 3 aprile 2011
So ?
                    • Removing impedence mismatch is a
                         good reason to avoid the relational
                         model
                    • Performances aren’t the only reason to
                         choose NoSQL
                    • A RDBMS isn’t always the proper
                         choice

domenica 3 aprile 2011
Thanks

                    • David Funaro
                    • http://www.davidfunaro.com
                    • @ingdavidino
                    • ing.davidino@gmail.com

domenica 3 aprile 2011

More Related Content

PDF
NoSQL overview #phptostart turin 11.07.2011
PDF
Graph databases in PHP @ PHPCon Poland 10-22-2011
PDF
Graph db: time for serious stuff @ codemotion 23/03/2012
PDF
Continuous delivery @wcap 5-09-2013
PDF
CMF: a pain in the F @ PHPDay 05-14-2011
PDF
The Continuous delivery Value @ codemotion 2014
PDF
Back your app with MySQL and Redis on Cloud Foundry
PDF
Active domain
NoSQL overview #phptostart turin 11.07.2011
Graph databases in PHP @ PHPCon Poland 10-22-2011
Graph db: time for serious stuff @ codemotion 23/03/2012
Continuous delivery @wcap 5-09-2013
CMF: a pain in the F @ PHPDay 05-14-2011
The Continuous delivery Value @ codemotion 2014
Back your app with MySQL and Redis on Cloud Foundry
Active domain

Similar to One size fit All (20)

PDF
User Stories Applied
PDF
Syllabus PS03CINT05 detailing
PPT
Kuldeep presentation ppt
PDF
May 2010
PDF
DOC
.NET Project Manual
PPTX
The Boundaryless Value-Chain
PDF
PDF
Vertically Challenged
PDF
P1153 kumar a
PPTX
Re the status_quo_and_what_lies_ahead
KEY
Event Driven Architecture
PDF
Services Oriented Infrastructure in a Web2.0 World
PDF
Vertically Challenged
PDF
Nuno Godinho
PDF
WF and WCF with AppFabric – Application Infrastructure for OnPremise Services
PDF
Graph Pattern Identification
PDF
Application integration
PDF
Lição prova professor coordenador
PPT
Designingapplswithnet
User Stories Applied
Syllabus PS03CINT05 detailing
Kuldeep presentation ppt
May 2010
.NET Project Manual
The Boundaryless Value-Chain
Vertically Challenged
P1153 kumar a
Re the status_quo_and_what_lies_ahead
Event Driven Architecture
Services Oriented Infrastructure in a Web2.0 World
Vertically Challenged
Nuno Godinho
WF and WCF with AppFabric – Application Infrastructure for OnPremise Services
Graph Pattern Identification
Application integration
Lição prova professor coordenador
Designingapplswithnet
Ad

Recently uploaded (20)

PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
A Presentation on Artificial Intelligence
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Empathic Computing: Creating Shared Understanding
PDF
Approach and Philosophy of On baking technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Cloud computing and distributed systems.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Electronic commerce courselecture one. Pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
NewMind AI Weekly Chronicles - August'25 Week I
A Presentation on Artificial Intelligence
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Empathic Computing: Creating Shared Understanding
Approach and Philosophy of On baking technology
The AUB Centre for AI in Media Proposal.docx
Network Security Unit 5.pdf for BCA BBA.
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Cloud computing and distributed systems.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
The Rise and Fall of 3GPP – Time for a Sabbatical?
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Electronic commerce courselecture one. Pdf
Ad

One size fit All

  • 1. One Size fits All David Funaro domenica 3 aprile 2011
  • 2. - One Size fits-All David Funaro domenica 3 aprile 2011
  • 3. Why i’m Here “There must be a better way to design this model” ????????????????????????????????? domenica 3 aprile 2011
  • 4. Evolution of the persistence TIME ’60 Application SINGLE USER Everything in inside the application, every time we have to spend time to reinvent the wheel domenica 3 aprile 2011
  • 5. Evolution of the persistence TIME ’60 ’70/80 Application Application Library SINGLE USER SINGLE USER Everything in inside the a good way to develop. All application, every time the business logic is in the we have to spend time Library to reinvent the wheel domenica 3 aprile 2011
  • 6. Evolution of the persistence TIME ’60 ’70/80 ’90 Application Application Library RDBMS SINGLE USER SINGLE USER MULTI-USER Everything in inside the a good way to develop. All application, every time the business logic is in the Centralized storage of the we have to spend time Library model to reinvent the wheel domenica 3 aprile 2011
  • 7. Data-Driven Application Design Data Application domenica 3 aprile 2011
  • 8. Way to Develop • Define ER: • Indentify every Entities • Foeach entity find all the attributes domenica 3 aprile 2011
  • 9. Active Record “Active record is an approach to accessing data in a database. A database table or view is wrapped into a class.” Wikipedia domenica 3 aprile 2011
  • 10. ...but NOT always domenica 3 aprile 2011
  • 11. ...but NOT always is the right way domenica 3 aprile 2011
  • 12. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 domenica 3 aprile 2011
  • 13. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document id : 54 domenica 3 aprile 2011
  • 14. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document id : 54 Group id : 78 domenica 3 aprile 2011
  • 15. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78 domenica 3 aprile 2011
  • 16. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78 domenica 3 aprile 2011
  • 17. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78 domenica 3 aprile 2011
  • 18. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78 domenica 3 aprile 2011
  • 19. 1:Real Case: plugin UserEvent Event User_id 100 id : 12 event_id 12 Document UserEntity id : 54 User_id 100 Class Document entity_id 12 Group id : 78 Integrity : Broken domenica 3 aprile 2011
  • 20. 1:Real Case: Redundance UserEvent Event User_id 100 id : 12 event_id 12 UserDocument User_id 100 Document document_id 12 id : 54 UserGroup Group User_id 100 id : 78 document_id 12 domenica 3 aprile 2011
  • 21. 1:Real Case: menu Home: •page •event •group •document domenica 3 aprile 2011
  • 22. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event •group •document domenica 3 aprile 2011
  • 23. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id domenica 3 aprile 2011
  • 24. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event id : 12 domenica 3 aprile 2011
  • 25. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Document id : 12 id : 54 domenica 3 aprile 2011
  • 26. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54 domenica 3 aprile 2011
  • 27. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54 domenica 3 aprile 2011
  • 28. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54 domenica 3 aprile 2011
  • 29. 1:Real Case: menu Menu name home Home: menu_item_id 2 •page •event MenuItem •group name home •document menu_item_id 2 class Group entity_id id Event Group Document id : 12 id : 78 id : 54 domenica 3 aprile 2011
  • 30. Impedence mismatch domenica 3 aprile 2011
  • 31. Design Model domenica 3 aprile 2011
  • 32. Design Model Application Needs domenica 3 aprile 2011
  • 33. Design Model | = Application Needs domenica 3 aprile 2011
  • 34. Design Model | = Application Needs Comportamenti che i modelli non sono in grado di supportare domenica 3 aprile 2011
  • 35. Arrangement Design Model | = Application Needs Comportamenti che i modelli non sono in grado di supportare domenica 3 aprile 2011
  • 38. Bad RDBMS Cases domenica 3 aprile 2011
  • 39. Data Mapping Struttura Dati RDBMS id 10 name pippo parent_id 19 domenica 3 aprile 2011
  • 40. The Alien Different Behaviour Different Model domenica 3 aprile 2011
  • 41. Unpredictable Tomorrow • User Story never complete • User Story evolve domenica 3 aprile 2011
  • 42. Bad DBMS Cases • Dynamic Pages • Data mapping • The Alien • Producer/Consumer • Overnormalized • Unpredictable tomorrow domenica 3 aprile 2011
  • 43. Bad DBMS Cases • Dynamic Pages • Data mapping • The Alien • Producer/Consumer • Overnormalized = • Unpredictable tomorrow domenica 3 aprile 2011
  • 44. Bad DBMS Cases • Dynamic Pages • Data mapping • The Alien • Producer/Consumer • Overnormalized = • Unpredictable tomorrow domenica 3 aprile 2011
  • 46. NoSql Not Only Sql domenica 3 aprile 2011
  • 47. NoSql Not Only Sql Just find the right way to manage our data-set domenica 3 aprile 2011
  • 49. document- document- TYPE oriented key-value oriented graph Reliability / Performance / FOCUS doc-oriented Performance doc-oriented edge relations Schema-less SCHEMA Schema-less Schema-less Schema-less Schema-full Mixed domenica 3 aprile 2011
  • 50. Performance • Redis : about 110000 SETs per second, about 81000 GETs per second. domenica 3 aprile 2011
  • 51. TYPE Key - Value ‘nome’ -> ‘Davidino’ domenica 3 aprile 2011
  • 52. TYPE document-Oriented ‘person’ -> ‘{ ‘name’ : ‘david’, ‘surname’ : ‘funaro’, phones: [ 34702323, 233234124, 134014 ] }’ JSon domenica 3 aprile 2011
  • 53. TYPE Graph DB JSon domenica 3 aprile 2011
  • 54. More ... domenica 3 aprile 2011
  • 55. So ? domenica 3 aprile 2011
  • 56. So ? • Removing impedence mismatch is a good reason to avoid the relational model domenica 3 aprile 2011
  • 57. So ? • Removing impedence mismatch is a good reason to avoid the relational model • Performances aren’t the only reason to choose NoSQL domenica 3 aprile 2011
  • 58. So ? • Removing impedence mismatch is a good reason to avoid the relational model • Performances aren’t the only reason to choose NoSQL • A RDBMS isn’t always the proper choice domenica 3 aprile 2011
  • 59. Thanks • David Funaro • http://www.davidfunaro.com • @ingdavidino • ing.davidino@gmail.com domenica 3 aprile 2011