Pinku Surana
2017-04-05 17:58:41 UTC
I need a schema-less immutable database for an application. In a nutshell,
I'm building a platform that runs customer scripts. Those scripts can
create arbitrary data structures. So I need to store them such that they
can be queried. For some weird reason, I also need to show them the state
of their app data in the past.
My current idea is to model it as a multi-tenant database similar to salesforce.com's
application database
<http://www.developerforce.com/media/ForcedotcomBookLibrary/Force.com_Multitenancy_WP_101508.pdf>.
I will define 20-50 attributes for each Datomic type (13, I think). When a
customer defines a datatype, I'll create a mapping from his type to an
implementation in Datomic.
type Person = {
fname : string;
lname : string;
age : int;
}
Could be implemented as:
{:record/type "Person" :record/string1 "Bob" :record/string2 "Dylan"
:record/int1 75}
The mappings will be stored and compiled for execution.
Not sure how to handle deeply nested records. Need to use refs in somehow.
I'd really appreciate any different ideas to achieve this goal. I don't
like having such a complicated model.
Thanks.
I'm building a platform that runs customer scripts. Those scripts can
create arbitrary data structures. So I need to store them such that they
can be queried. For some weird reason, I also need to show them the state
of their app data in the past.
My current idea is to model it as a multi-tenant database similar to salesforce.com's
application database
<http://www.developerforce.com/media/ForcedotcomBookLibrary/Force.com_Multitenancy_WP_101508.pdf>.
I will define 20-50 attributes for each Datomic type (13, I think). When a
customer defines a datatype, I'll create a mapping from his type to an
implementation in Datomic.
type Person = {
fname : string;
lname : string;
age : int;
}
Could be implemented as:
{:record/type "Person" :record/string1 "Bob" :record/string2 "Dylan"
:record/int1 75}
The mappings will be stored and compiled for execution.
Not sure how to handle deeply nested records. Need to use refs in somehow.
I'd really appreciate any different ideas to achieve this goal. I don't
like having such a complicated model.
Thanks.
--
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Datomic" group.
To unsubscribe from this group and stop receiving emails from it, send an email to datomic+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.