15.4 ORM problem
ORM stands for Object Relational Mapping, which is a popular approach to handle relational DB nowadays, especially for Object-Oriented Programming.
Of course, Guile has it’s own Object System named GOOPS. Users can 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 critics about ORM:
Here are some known ways to solve ORM related problems:
- 2. Give up relational storage model. Don’t use a relational DB. Use another DB style, such as No-SQL. Well, this way is not cool when you must use a 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. Limiting 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. Microsoft’s LINQ is such a case.
- 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)