Hey, quick recommendation question. Embedded DBs? ...
# announcements
a
Hey, quick recommendation question. Embedded DBs? I want something simple, file based, could be key/value or more complex. Ideally it would let me serialise custom objects automatically. Nitrite+Potassium Nitrite seemed perfect, but I'm getting way too many dependency conflicts due to using apache spark in the same project (jackson is being a pain to get right in terms of versions, which breaks all the serialisation for NO2) This is basically a project that I'm converting form Scala to Kotlin. The scala version used SQLite with an ORM, which is a perfectly reasonable slution. In which case, is there an ORM you'd recommend? Sorry, this ended up being longer than I expected 😂
d
Hey there! I am using Kotlin Expose. It´s quite nice so far. https://github.com/JetBrains/Exposed
Copy code
Currently supported database dialects:

PostgreSQL
MySQL
Oracle
SQLite
H2
SQL Server
It´sdefinitely worth a look!
m
Why not continue using SQLLite with Kotlin? Exposed is a DSL, rather than an embedded DB, but your question ended up a bit unfocused, so answers will be a bit spotty w/o further clarification.
👍 1
c
You might also check out Square’s SQLDelight https://github.com/square/sqldelight, @jw gave a great talk about it at KotlinConf last year
m
If a key/value store and some serialization support is sufficient, I find
com.sleepycat:je
to be a decent option, too.
And if you want an SQL interface, something like H2 has the advantage over SQLite that it doesn't need native binary libraries.
j
And also the massive disadvantage that it operates in a managed environment
m
😉
Depends on what you want and how hard your deployment target makes the integration of native code, I guess.
a
Thanks for your replies and sorry that the question was a bit all over the place. I'll probably try Exposed with SQLite or H2. I completely forgot about H2. I used it before and actually might fit the bill! 👍
c
there is also jetbrains xodus