Object Relational Mixer

Mix Object Orientation with Relational Orientation... the same way that, for example C++ is a mix of procedural orientation, and object orientation, with LINQ will be possible to declaratively (relationally?) filter in memory arrays, it might even be possible to make it real easy to do parallel programming by hiding the implementation of the filtering mechanism. It is, see parallel LINQ.

Of, for example, imagine a languange on which you could say "do this operation on all the elements of an collection and aggregate the result" if you could hint in the language that the operation does not need to be done in a particular order, you would leave to the compiler the task of executing the operation in parallel... I know, I know, that is just the way a database does it... and I know that a lot of people say that they do not want database stuff in their code... but the thing is that a lot of the code inside a "non-database" application is about searching, filtering, aggregating: -Find a Button in a Form (in the list of all controls) and disable it (SELECT and UPDATE) -Change the format of all the labels in an application (SELECT and UPDATE) -Get the result of a complex operation (SELECT AGGREGATE FUNCTION)

I am not saying that this will solve all the software development problems but it will take us closer to the power of a language with ConceptProgramming capabilities, that is code that actually reflects the concepts in your application. (If it can be expressed easier and in a more natural way by using a declarative approach... why not give languages like Java or CSharp the ability to specify logic ina declarative way (and even more, give them the capacity to increase the number of operations that can be expressed declaratively)... In other words MakeItEasyToBuildYouOwnSql?

Is SQL reinvention/wrapping such a good idea? (ExpressionApiComplaints)

---

I don't think SQL Wrapping is a good idea... but reinvention could be a good idea... why do we have so many object oriented languages and only one relational language, I know, there are others, but we only have one mainstream relational language, at it is mainly used only to persist stuff... who said that relational operations are only for persistent stuff? why should I write a while loop if could just filter a collection of objects in memory using a relational operator? why every language has built it support for aritmetic operators and boolean operators, but it has no support for relational operators? There are some solutions, for example MultiversionConcurrencyControl that could be implemented in an easier more scalable way, if we could easily apply a relational operation to both the information in remote persistent rows and in local in memory, just for this BusinessTransacion?... ¿why should temporary experiments with row be sent all the way to database, and then rollbacked or commited? why cant that be done locally? after all, modification that are not commited shouldn't lock rows for other users... In other words RelationalOperationsAreOnlyForDatabases ? I really don't think so... or even more DatabasesHaveToBePersistent? Why cant we have small local in memory non persistent databases for uncommited transactions ?


The relational algebra is orthogonal to persistence. Relational operators can and should be definable on relations and how they are stored, if at all, is beside the point.

However, if this is a good idea, then why is the SQL not pure relational? I do not agree that sql is only used to persist stuff, but then maybe that is a mistake.

Also LINQ is doing something like this from what I hear, but I am not sure it is any purer than SQL as far as relational algebra is concerned.

Now as for ¿why should temporary experiments with row be sent all the way to database, and then rollbacked or commited? why cant that be done locally? well they can but then its up to you so fix the mess if there is contention.

and Why cant we have small local in memory non persistent databases for uncommited transactions ? We do and I have always called them caches. the issue is ensureing data consistancy. It will be your mess to fix if there is contention.

-- MarcGrundfest



See also: ObjectRelationalMapping


EditText of this page (last edited August 23, 2010) or FindPage with title or text search