12.2 ORM problem
ORM stands for Object Relational Mapping, which is a popular approach to handle relational DB nowadays, in OOP.
Of course, Guile has it’s own Object System named GOOPS. Users may use OOP with it. And it’s possible to implement ORM in GNU Artanis as well.
However, FP fans realized that they don’t have to use OOP if they can use FP features reasonably.
Besides, there’re some criticism pointing to ORM:
And here’re some known ways for trying to solve the problems of ORM:
- 2. Give up relational storage model. Don’t use relational DB, pick up others, say, No-SQL. Well, this way is not cool when you have to use relational DB.
- 3. Manual mapping. Write SQL code directly. It’s fine sometimes. But the code increases when things get complicated. Refactoring and reusing would be worth to consider.
- 4. Limited ORM. Limited the utility of ORM. And use ORM to solve part of your work rather than whole, depends on you. This may avoid some problems.
- 5. SQL related DSL. Design a new language. LINQ from Microsoft is one of the cases.
- 6. Integration of relational concepts into frameworks. Well, harder than 5, but worth to try.
- 7. Stateless. This is the critical hit to counter complexity and unreliability.
Basically, GNU Artanis has no ORM yet, and maybe never will. GNU Artanis is trying to experiment new ways to solve the problems of ORM.
GNU Artanis provides three ways to complete this mission. All of them, are experimental at present.
- SSQL (1,3,5)
- FPRM (4,7)
- SQL Mapping (1,3,6)