I’m coming up to speed on BaseX 10 and trying to understand the practical difference between using the built-in store (or a custom store) and simply saving values into a database. As far as I can tell from the docs the basic feature is the same: given e.g., a map with stuff in it, I can store the map to a database with the new db:put-value() function or to the build-in store (or a custom store) using store:put() and in both cases can get the map back.

 

Given that the store is automatically persistent, it seems like the obvious choice if you’re using maps as a result caching technique, so I’m wondering what the reasons would be for not using it and using a database instead.

 

I think the answer includes:

 

 

Have I missed any other important considerations?

 

Without taking the time to do the measuring, I’m guessing that there is negligible performance difference between using the store and a database—I’d be very surprised if the underlying implementation was not based on the same code.

 

In our Project Mirabel system I need to do caching of large query results, so being able to quickly and conveniently store maps is ideal and I’m very excited to take advantage of this new feature.

 

Cheers,

 

E.

 

_____________________________________________

Eliot Kimber

Sr Staff Content Engineer

O: 512 554 9368

M: 512 554 9368

servicenow.com

LinkedIn | Twitter | YouTube | Facebook