Databases are one topic that I have never had a chance to get deeper insights.
I started JDBC’ing when later I was surprised to know that one could connect to the database using ‘C’.
I had not worked enough to feel the pain of iterating over ResultSet and writing insert/update scripts that virtually went outside the screen when I saw the onset of “Hibernate-Relational Persistence for Idiomatic Java”. I never liked the writing/seeing/understanding XML, but I had no choice but to Well Hmmm!
And with most of the time spent in Hibernate, I never felt its features were intuitive to that of Java(in no specific order).
- First and foremost in Java, Enum are first class citizens, in Hibernate, working with an Enum is not at all trivial.
- Using composite keys asks you to maintain a seperate object for it.
- Already there were two worlds of entities in Application(objects) and entities in DB(records), now to understand the two, one needed to know how Hibernate understands the two worlds.
For simple applications, Hibernate is way to work with, but with very large applications, I did not like the complexity that it brought in atleast two occasions, requiring extra time to keep the DB and the hbm files in sync.
It could be the incorrect way of not completely relying on hbm for schema generation, but because these applications had predefined schema’s, this was the only possible safe-path.
Issues with RDBMS:
- Cost of mapping conversion(second level cache’s are not enough!)
- Transactions duplicates Locking- In general.
Tired of looking at xml, and with the option to write an application for fun, I have the option to evaluate the usage of Object Oriented Database.
I had found atleast a dozen implementation of such software, at the end it came down to db4o and Perst. And here is the summary of them:
- Most commonly used OODBMS.
- Easy to learn.
- Supports intuitive Refactoring of persistent classes.
- Support for Projections is not available(could not find).
- Lazy initialization supported with default level of depth.
- Has GIS Dataset
- Fastest amongst all OODBMS.
- Cryptic creation of indices for faster search.
- Concept of Links for references pollutes domain.
- No fixed DTD for import/export feature for refactoring.
Both the products have the following in common:
- Support for Transactions.
- Zero mismatch between object and saved data.
- Confusing Licence!
At the end, I have to give in to db4o for simplicity and refactoring features.
And that’s where I would start looking at injecting it into the application.
Concerns about OODBMS:
- Not Yet widely used – I wonder why?
- Clustering – I do not need it.
- Backup – RDBMS or File?
- Optimization – Exotic feature than a requirement.
So I would look forward to working on the application on db4o and will update on the findings!