What are alternatives to standard ORM in a data access layer? [closed]
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this questionWe're all familiar with basic ORM with relational databases: an object corresponds to a row and an attribute in that object to a column, though many ORMs add a lot of bells and whistles.
I'm wondering what ot开发者_JAVA技巧her alternatives there are (besides raw access to the data). Alternatives that just work with relational databases would be great, but ones that could work with multiple types of backends besides just SQL (such as flat files, RSS, NoSQL, etc.) in a uniform manner would be even better. I'm more interested in ideas rather than specific implantations and what languages/platforms they work with, but please link to anything you think is interesting.
Your basic choices are:
- Just use raw SQL.
- Pick an ORM that meets your needs. Most platforms have a variety of choices. - for example the .NET platform supports LINQ, nHibernate, Entity Framework, etc.
- Write your own ORM and/or data access framework.
I'm working in something more or less along the lines you have said. I think that data-store related tools have grown complex with time instead of simpler and more usable.
So, instead to add complexness, this kind of things must be as simple as:
- Get something that points to the data
- Use it to do something with the data (query or modify)
The thing you use to interact with the data should do some kind of (transparent) adaptation to the data-store you are working with, and done.
The translation thing may sound a bit ORM-like, but I'm speaking of something more generic:
Some kind of internal implementation to communicate with whatever you are working with (something similar to a JDBC driver, but without the need to work with SQL)
Some kind of mapping to convert data to java object (more or less like in ORM)
The implementation of these concepts I've developed is for java and you can see more of it at http://www.bryghts.com
Right now, I've only developed an engine for SQL related data-sources, but it's prepared for independence of it.
精彩评论