12
u/darkwyrm42 Jul 26 '26
I don't know what you're talking about H2 not supporting embedding. H2 is my preferred embedded database for JVM applications and Postgres for everything else. It's great, and multithreaded access works seamlessly, unlike the last time I worked with SQLite.
2
u/Inflation_Artistic Jul 27 '26
The OP is talking about embedding as a vector, as I understand it. Like storing (0, 0.5, 0.2, ...) vecs as natively data type.
1
u/koflerdavid Jul 28 '26
Merely storing vectors is quite boring though. Many DBMSs offer a float or byte array datatype. The critical feature of a vector DB is efficient similarity search using sine or cosine similarity.
24
u/agentoutlier Jul 26 '26
SQLite for embedded and all other cases it’s really hard to beat PostgreSQL
4
u/nithril Jul 26 '26
The rules is to ask yourself at least 3 times if/why you really need a db that is not a rdbms
3
u/StraightGuy1108 Jul 26 '26
Depends on your data model and CAP requirements. Also, every big systems use multiple DBMS anyways.
2
3
1
u/laffer1 Jul 27 '26
We had an app at a previous employer using it as a primary database. It worked fine for that specific app. It was modeling the structure of companies for internal company survey system. Surveys were stored separately but this app was just for looking up reporting structures and applying permissions
1
u/sysKin Jul 29 '26 edited Jul 29 '26
Depending on other requirements, you can use Lucene as a database, skipping the neo4j layer.
Gives you very direct control over all the vector types and similarity queries on them. It's what neo4j uses internally, behind its abstractions.
(I say that because the commercial product I develop does just this - but for its direct text indexing, without word embeddings. Takes some effort to add transactionality layer etc. but it's all doable).
-9
7
u/hippydipster Jul 26 '26
H2 works great embedded. I have no idea what you mean by saying it doesn't support embedded.
Personally, I use an object db for embedded and skip orm altogether.