Bindings, Platforms, and Innovation
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
Tracking change and innovation in the enterprise software development community
Posted by Steven Robbins on Jul 31, 2008 07:44 AM
Kasper Sørensen has created a new open source project at eobjects.dk called MetaModel. The project is a common domain model, query engine, and optimizer for different types of datastores, such as relational databases and flat files. MetaModel is a Java library that provides a fluent, object-oriented interface for SQL compliant queries.[I]t enforces a better way of interacting with your data, based on accepted standards and type-safe query-writing. The framework is small and simple, yet powerful, making it easy to use and easy to learn.The project site claimed that the overall goal for MetaModel is to provide a Java API that allows:
Download the Free Adobe® Flex® Builder 3 Trial
Adobe® Rich Internet Application Project Portal
How Java Developers Can Write Great SQL
The Role of Open Source in Data Integration
Open Sesame: Open Source Solutions for BI and Data Gain Acceptance
What are the major differences between MetaModel and other similar tools like Hibernate/Toplink ?
As stated in the article MetaModel is NOT an O/R mapping tool, so it's not comparable with Hibernate and Toplink.
1. Hibernate is an O/R mapping framework which means that the "input" in Hibernate is your domain model - an object-oriented model of your domain that you wish to map against a database.
2. MetaModel on the other hand is NOT an O/R mapping framework. It is in itself a domain model for the datastore domain. What this means is that it's appropriate to use MetaModel for applications that have the datastores as the domain itself. This is why it's called "MetaModel" - it's a "model of (data) models". You would typically use MetaModel for applications that should work across different datastores (ie. database clients, ETL-tools, database analyzing applications etc.), for example DataCleaner.
It would be interesting if it supported SQL/PSM that way it could be used as a foundation to create platform independent stored procedures, after all SQL is not Turing complete, and therefore, sooner or later one needs to write code to transform data using java, and that means having to fetch data from the database, and manipulate it in memory, without taking advantage of the automatic parallelization and indexing offered by the database server.
On the other hand, if MetaModel could be used to specify the algorithms inside stored procedures, and then it could, from the same source code, generate stored procedures in standard SQL/PSM (for DB2), PL/SQL (for Oracle), TSQL (for SqlServer), then it could be used as a fundation to really revolutionize database development (for example, as an engine for an True Relational To Pseudo Relational Mapping like Dataphor or Rel
I agree this would be an interesting feature. As of right now it's not really in our plans though and I'm not quite sure how one would implement such a meta language for stored procedures? I like the idea though and if you're (or anyone) is interested in pursuing it I will do my best to cheer them on and be helpful in any way I can.
I have been wondering, how much of this work can be automated? I mean, SQL, for example, has a defined grammar, so, up to a particular point, a lot of the code in the MetaModel API, the classes and methods in java used to describe the SELECTs, could be autogenerated from the grammar definition.
Basically what we have here is an object graph that represents a particular DDL or DML expressions. Why is all that code written by hand and not automatically generated? or is it? and if it is automatically generated... wouldnt it be possible to apply the same algorithm for SQL/PSM? After that it would be a matter of using the Strategy pattern to create different algorithms to generate SQL/PSM (for DB2), PL/SQL (for Oracle), TSQL (for SqlServer), etc.
It's not auto-generated because in contrast with parsers MetaModel contains the functionality to actually execute the queries also. Of course let the database do the work when we can, but in some examples this is not possible, for example if you want to query a CSV file and an Excel spreadsheet. Note that you can actually perform advanced querying on eg. an Excel spreadsheet like joining, filtering, ordering etc. in the excact same way that you would when interacting with a database. Also, SQL is unfortunately not a single grammar, there are lots of dialects and a lot of work has gone into making it compliant with those. MetaModel only contains a subset of the functionality of all SQL dialects and we are continously expanding this functionality but every time we add a new piece of functionality we will make this work uniformly across all supported datastores (for example we are currently investigating how various datastores convert dates to year-numbers, some databases use the YEAR(MY_DATE) function, others EXTRACT(YEAR from MY_DATE) and of course CSV, Excel and XML files don't have this function natively which is why we will also add a java-based query post-processing to match a year-extraction function. I hope this serves as a meaningful example of the challenges (and promises) of MetaModel.
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.
This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.
This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.
This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.
After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.
IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.
Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.
6 comments
Watch Thread Reply