{"id":332,"date":"2009-04-16T23:15:42","date_gmt":"2009-04-16T22:15:42","guid":{"rendered":"http:\/\/www.gamlor.info\/wordpress\/?p=332"},"modified":"2021-03-11T09:44:25","modified_gmt":"2021-03-11T08:44:25","slug":"db4o-object-database","status":"publish","type":"post","link":"https:\/\/www.gamlor.info\/wordpress\/2009\/04\/db4o-object-database\/","title":{"rendered":"db4o object database"},"content":{"rendered":"<p>I\u2019ve looked for a small embedded, easy to use data store for implementing my small software-engineering course project. Of course I\u2019ve looked at MS SQL Server, which works great together with <a href=\"http:\/\/en.wikipedia.org\/wiki\/LINQ\">LINQ<\/a> and the .NET world. However it isn\u2019t small and lightweight. I\u2019ve also tried Hibernate.NET, however the .NET version is way behind the Java-Version feature wise. The attribute\/annotation-based mapping is buggy, the <a href=\"http:\/\/en.wikipedia.org\/wiki\/LINQ\">LINQ<\/a>-Implementation unusable etc. Other frameworks failed to impress me as well.<\/p>\n<p>So accidently I\u2019ve found the object-database <a href=\"http:\/\/www.db4o.com\/\">db4o<\/a>, which fits my requirement perfectly. It is really small, less than 800 KiB. It it easy, you just store your native objects, done. Retrieving the objects is also easy, because <a href=\"http:\/\/www.db4o.com\/\">db4o<\/a> support LINQ.<\/p>\n<p>Yeah, a object-database is a new territory for me and its exiting to gain experience with it. So here are my first few impressions:<\/p>\n<p>Positive:<\/p>\n<ul>\n<li>As I said, its easy, simple etc. No XML-Files, no mappings, no \u2018alien\u2019-SQL in your C#-Code, no \u2018Hibernate-Session\u2019 managing head aches etc.<\/li>\n<li>Easy extension of the db-schema, because your classes are your schema.<\/li>\n<li>No \u2018magic\u2019 like compile-time\/runtime-instrumented classes, no generated code.<\/li>\n<li>Flexible, building-blocks API. You can run it in server-client-mode, embedded-mode, memory-database-mode, change persistence behaviors of classes, create backups, add versioning, add callbacks,\u00a0 add different IO-Adapter etc.<\/li>\n<li>Additional functionality like sending messages to the server.<\/li>\n<\/ul>\n<p>Negative:<\/p>\n<ul>\n<li>High coupling between the database and your domain-classes, because your classes are the database-schema.<\/li>\n<li>Activation \/ Update-Depth: Because you store and retrieving object-graph, db4o stops a some point to load it automatically (otherwise you would load the whole db). You can manage this manually or use instrumented code. But with instrumented code you get some \u2018Hibernate\u2019-like problems back.<\/li>\n<li>The tool-support is really, really bad.<\/li>\n<li>No standard like \u2018SQL\u2019 is supported, so you cannot access your database with a query-tool.<\/li>\n<li>Not entirely maintenance free, due defragmentation.<\/li>\n<\/ul>\n<p>Neutral<\/p>\n<ul>\n<li>The object-database isn\u2019t a rational database. So if you start to use joins etc you will get pure performance. Instead the object-database is really god at traversing the object-graph. This requires some rethinking.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve looked for a small embedded, easy to use data store for implementing my small software-engineering course project. Of course I\u2019ve looked at MS SQL Server, which works great together&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":[126,17],"tags":[21,24,100],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/332"}],"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=332"}],"version-history":[{"count":2,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/332\/revisions"}],"predecessor-version":[{"id":518,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/posts\/332\/revisions\/518"}],"wp:attachment":[{"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/media?parent=332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/categories?post=332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gamlor.info\/wordpress\/wp-json\/wp\/v2\/tags?post=332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}