{"id":194,"date":"2018-08-29T19:42:16","date_gmt":"2018-08-29T19:42:16","guid":{"rendered":"http:\/\/dsail.csail.mit.edu\/?page_id=194"},"modified":"2020-11-11T03:08:51","modified_gmt":"2020-11-11T03:08:51","slug":"data-base-designs","status":"publish","type":"page","link":"https:\/\/dsail.csail.mit.edu\/index.php\/data-base-designs\/","title":{"rendered":"Data Base Designs"},"content":{"rendered":"<h2>\n\t\tDatabase Design: The Case for Co-evolution of Applications and Data\n\t<\/h2>\n\t<p>The traditional wisdom for performing logical database design can be found in any DBMS textbook. <\/p>\n<p>Basically, the process is:<\/p>\n\t<p><em>Form an entity-relationship (E-R) model of your data<\/em><\/p>\n<p><em>When you are satisfied with your E-R model, push a button<\/em><\/p>\n<p><em>Which executes an E-R to third normal form (3NF) translation algorithm<\/em><\/p>\n<p><em>Create the 3NF schema and code the application logic for this schema<\/em><\/p>\n<p><em> \u00a0When business conditions change (and they do at least once a quarter), then<\/em><\/p>\n<p><em>Update the E-R model<\/em><\/p>\n<p><em>Update the schema<\/em><\/p>\n<p><em>Evolve the data to the new schema<\/em><\/p>\n<p><em>Do application maintenance<\/em><\/p>\n\t<p>Applying these principles will guarantee the schema is always in 3NF and is thereby a \u201cgood\u201d schema. &nbsp;In contrast, extensive application maintenance may be required. Also, repeated patching of application code may cause the application to \u201cdecay,\u201d &nbsp;i.e., become more convoluted and harder to maintain. In other words, the traditional wisdom will ensure no database decay but perhaps large application decay.<\/p>\n<p>In the real world, NO SERIOUS DEVELOPERS use the traditional wisdom. &nbsp;Some may use it for initial development, but none use it for evolution. &nbsp;Specifically, developers are almost always interested in minimizing application maintenance, and will endure large amounts of data decay to achieve this goal. &nbsp;To minimize application maintenance, the goal is to change the schema as little as possible (preferably not at all) by introducing data redundancy.&nbsp; Hence, data is allowed to decay to minimize application decay. &nbsp;Sooner or later applications (or the database) become so degraded that a complete project re-implementation is required.<\/p>\n<p>The thesis of this project is that one should perform <strong>co-evolution<\/strong> of code and data. &nbsp;Specifically, one should have a holistic metric that minimizes the composition of data and code decay. Sometimes one should focus on application decay and sometimes on data decay.&nbsp; We have obtained six years of application and data evolution from B2W, a very large Brazilian e-tailer. &nbsp;Our data encompasses about 70 iterations of their checkout software.&nbsp; Our initial analysis justifies our thesis, because B2W appears to sometimes evolve application code, sometimes the DBMS schema and sometimes both.<\/p>\n<p>We have mostly built an evolution tool that can quantify the decay in either dimension that any modification will entail. &nbsp;On top of this tool, we hope to build a machine-learning-based recommendation engine that will suggest which evolution tactic to use.<\/p>\n\t<p><strong>Citations<\/strong><\/p>\n<p>Michael L. Brodie, Michael Stonebraker, Ricardo Mayerhofer and Jialing Pei. 2018. The Case for the Co-evolution of Applications and Data, <a href=\"http:\/\/mitdbg.github.io\/nedbday\/2018\/#program\" data-mce-href=\"http:\/\/mitdbg.github.io\/nedbday\/2018\/#program\">North East Database Day 2018<\/a> (NEDS 2018), January 19, 2018.<\/p>\n<p>Michael Stonebraker, Dong Deng and Michael L. Brodie. 2017. <a href=\"http:\/\/michaelbrodie.com\/wp-content\/uploads\/2015\/04\/Co-evolution-NEDB17.pdf\" data-mce-href=\"http:\/\/michaelbrodie.com\/wp-content\/uploads\/2015\/04\/Co-evolution-NEDB17.pdf\">Application-Database Co-Evolution: A New Design and Development Paradigm<\/a>. New England Database Day, (pp. 1\u20133), January 2017.<\/p>\n<p>Michael Stonebraker, Dong Deng and Michael L. Brodie. 2016. <a href=\"http:\/\/people.csail.mit.edu\/dongdeng\/papers\/bigdata2016-decay.pdf\" data-mce-href=\"http:\/\/people.csail.mit.edu\/dongdeng\/papers\/bigdata2016-decay.pdf\">Database Decay and How to Avoid It <\/a>(pp. 1\u201310). Proceedings of the IEEE International Conference on Big Data, Washington, DC. December 2016.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Database Design: The Case for Co-evolution of Applications and Data The traditional wisdom for performing logical database design can be found in any DBMS textbook. Basically, the process is: Form an entity-relationship (E-R) model of your data When you are satisfied with your E-R model, push a button Which executes an E-R to third normal&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/pages\/194"}],"collection":[{"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/comments?post=194"}],"version-history":[{"count":11,"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/pages\/194\/revisions"}],"predecessor-version":[{"id":781,"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/pages\/194\/revisions\/781"}],"wp:attachment":[{"href":"https:\/\/dsail.csail.mit.edu\/index.php\/wp-json\/wp\/v2\/media?parent=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}