{"id":1040,"date":"2010-02-06T00:17:37","date_gmt":"2010-02-05T23:17:37","guid":{"rendered":"http:\/\/www.gamlor.info\/wordpress\/?p=1040"},"modified":"2021-03-11T09:45:22","modified_gmt":"2021-03-11T08:45:22","slug":"reporting-in-nosql","status":"publish","type":"post","link":"https:\/\/www.gamlor.info\/wordpress\/2010\/02\/reporting-in-nosql\/","title":{"rendered":"Reporting In NoSQL"},"content":{"rendered":"<p>Rob Conery, creator of <a href=\"http:\/\/www.subsonicproject.com\/\">SubSonic<\/a>, states his opinion about\u00a0reporting <a href=\"http:\/\/blog.wekeroad.com\/2010\/02\/05\/reporting-in-nosql\">in NoSQL database<\/a>: Use the right tool for the right job. Consider splitting up your data in &#8216;domain-data&#8217; and &#8216;reporting-data&#8217;. The domain-data\u00a0is kept databases which fits best, like a document-store, object-database etc. The data for the reporting stored\u00a0separately. So it\u2019s a separation of data concerns.<\/p>\n<p>First you may think:\u00a0\u201cOh no, more work\u201d. Two data-stores, that\u2019s even more code, more libraries etc you have to maintain. But I&#8217;m not if that is really true. When I&#8217;m thinking about all the &#8216;pain&#8217;\u00a0you go through to map you domain\u00a0into a normalized\u00a0relational model. Especially\u00a0when the\u00a0relational-model is used for both, reporting and\u00a0the application-domain.<\/p>\n<p>For example I&#8217;ve once build a quite sophisticated survey application. Well I first designed my domain-model for representing a survey. Like domain-objects for a question, possible-answers, rating-criteria&#8217;s etc. I\u2019ve build a nice model an then mapped it onto a relational representation. Now of course a survey-application also needs detailed reports.\u00a0Well first\u00a0the domain-model was\u00a0easy to work with. But it wasn\u2019t optimal\u00a0for reporting.\u00a0Things\u00a0got worse\u00a0because I\u00a0tried to \u2018hammer\u2019 the reporting-&#8216;nails&#8217; with a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Object-relational_mapping\">ORM-mapper<\/a>. And it was\u00a0a nightmare, because the ORM couldn\u2019t handle complex queries appropriately\u00a0. So I needed to tweak the domain-model to make it more reporting friendly. In summary, I spend a lot of time\u00a0tweaking and changing the domain-model and ended with something, which was neither good for reporting nor a good domain-model.<\/p>\n<p>When I think back, I could have saved a lot of trouble by separating the both parts completely. Use nice domain-model for the survey, preferably stored in object-database or maybe a document-database. This is data which is actively changed and updated. And then for reporting, additional data is stored In big, flat and denormalized tables.<\/p>\n<p>Conclusion: I can imagine that separating data for different purposes\u00a0can be a real benefit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rob Conery, creator of SubSonic, states his opinion about\u00a0reporting in NoSQL database: Use the right tool for the right job. Consider splitting up your data in &#8216;domain-data&#8217; and &#8216;reporting-data&#8217;. The&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[17],"tags":[162,164,163],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1040"}],"collection":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/comments?post=1040"}],"version-history":[{"count":5,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1040\/revisions"}],"predecessor-version":[{"id":3846,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/1040\/revisions\/3846"}],"wp:attachment":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/media?parent=1040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/categories?post=1040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/tags?post=1040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}