The db4o-community sees a regular request in the forums: How can I use SQL with db4o?
Hey, db4o is an Object-Database which is focused around the OO-programming language of your choice (Java / C#), so why do you constantly ask about a query language dating back to the 1970s?
What might be the use-case for SQL in an OO-database?
Forget about the argument that people are used to SQL and therefore wants to see it as a "must-have"-feature of a "real" database... best to choose an RDBMS if you'll lost in SQL.
Another use-case might be ad-hoc-queries? Just use a simple BeanShell-interpreter (or something similar) connected to your db4o and you can reuse all the features of your domain-model to construct queries in your native programming language (e.g. Java) at runtime of your application. What's the need of flattening your nice domain-model to an SQL-like expression which isn't real SQL anyway? Simply a waste of time...
Reporting? Using Cry*Reports to get nice reports of your SQL-database? db4o has recently published the Db4o Replication System (drs), which allows you to replicate your data to an RDBMS via Hibernate. Just replicate and connect your reporting tool. So there's no more need for "more" SQL to create reports. Maybe we have to think about a possibility for "real-time"-replication. But maybe we are reporting against POJOs in the future anyway...
Another use-case? Manipulating your objects via SQL (insert, update, delete)? Yeah... create an OO-model with nice encapsulation of private data and allow people to work around by firing misbehaving SQL against your objects... not me.
One central vision of db4o: Avoid string-based queries by all means (e.g. the invention of Native Queries compared to former SODA-Queries). And that's one reason developers love db4o: No more strings which will break your nice compile-time-checks and refactoring-tools...
So please, dear db4o-developers: Don't waste time on "integrating" SQL into db4o beyond the DRS. There's simply no use-case for it, it's just a bad marketing for db4o overall, because a possible "db4oSQL" isn't the Standard-SQL people are used to... claiming to support a standard like SQL which cannot be supported properly will result in bad reputation. So stay on the real standard: the programming language of your choice.
Tuesday, July 18, 2006
Subscribe to:
Post Comments (Atom)
2 comments:
speaking of the devil...
Post a Comment