# Converting Archetype into Nosql Schemes
**Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156)
**Created:** 2016-10-13 16:29 UTC
**Views:** 1
**Replies:** 8
**URL:** https://discourse.openehr.org/t/converting-archetype-into-nosql-schemes/15456
---
## Post #1 by @Fadoua_Khennou
Hello,
I am a Phd student, working on the implementation of OpenEhr standard with Nosql technologies in order to study the performances for such plateformes.
And because i have just got familiar with archetypes in the ADL workbench and Ocean informatics, i would like to know is there an automatic way of generating from operational template the adequate sql or nosql tables?
If not should i integrate any other tools or modules in order to do this conversion?
Thanks in advance for your response.
My regards,
Fadoua
---
## Post #2 by @system
Sorry, I cannot help you, but it is a very interesting question, and I am very interested to hear about follow up.
Bert
---
## Post #3 by @Eric_Browne
Hello Fadoua,
Although I am not able to directly help with your request, you may be interested in a tool to view/edit operational template XML files developed under the current release \(ADL1\.4\), such as those on the openEHR CKM site\. This runs on Windows, Linux and MacOS and might help you explore some of the bundle of models that have already been developed around the world\. It is based on a generic XML authoring tool XMLmind, augmented with a plugin I developed specifically for viewing openEHR Operational Templates\.
I've written a brief blog article at http://healthbase.info/blog/?p=390 describing how to obtain and install it\.
Other pointers that might be more relevant to your question:\-
https://openehr.atlassian.net/wiki/display/resources/Persistence+FAQs
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4636072/
http://www.ep.liu.se/ecp/070/009/ecp1270009.pdf
regards,
eric
Eric Browne
eric\.browne@montagesystems\.com\.au
ph \+61 414 925 845
skype: eric\_browne
---
## Post #4 by @system
Hi!
We have performed and published some studies regarding the combination of openEHR and noSQL and can probably help you, if we get some more information about your ultimate implementation/thesis goal. So please tell us a little bit more about the context and goal of your work.
Getting into oenEHR implementation can be a bit tricky and time consuming, especially if you plan to do everything from scratch. I would recommend starting by building something based on existing open source implementations or published experiments, and then extend/improve them by adding suitable noSQL parts and other things that you might find missing.
If you are using a noSQL backend for storage, it will most likely have a query language capable querying any kind of structured document. So you might not need to make separate tables for different kinds archetypes and templates.
Perhaps it would be useful to focus on suitable ways of storing any kind of reference model (RM) based documents/objects and then exploring how to query them with the native query languages/mechanisms of your noSQL solution. After that, or in parallel, you will likely want to explore how to translate openEHR AQL queries to the native query language of your noSQL backend.
Best regards,
Erik Sundvall
fredag 14 oktober 2016 skrev Eric Browne <[eric.browne@montagesystems.com.au](mailto:eric.browne@montagesystems.com.au)>:
---
## Post #5 by @system
Hi,
You might want to take a look at an interesting project out of Kyoto
University that was presented at MIE2016 recently \- openEHR based on
neo4j\.
The presentation is on the openEHR wiki at \.\.
https://openehr.atlassian.net/wiki/download/attachments/38436882/HEC2016-Graph-openEHR.pdf?version=1&modificationDate=1476423862176&api=v2
The developer of the EtherCis openEHR CDR, Christian Chevalley, also
has experience of writing an openEHR CDR against Intersystems Cache\.
https://github.com/ethercis.
Ian
Dr Ian McNicoll
mobile \+44 \(0\)775 209 7859
office \+44 \(0\)1536 414994
skype: ianmcnicoll
email: ian@freshehr\.com
twitter: @ianmcnicoll
Co\-Chair, openEHR Foundation ian\.mcnicoll@openehr\.org
Director, freshEHR Clinical Informatics Ltd\.
Director, HANDIHealth CIC
Hon\. Senior Research Associate, CHIME, UCL
---
## Post #6 by @Fadoua_Khennou
Thanks everyone for you help i will take into consideration your notes
As for making my goal more clear for Eric, i would like to combine my Openehr archetypes with different nosql schemes ( document oriented, colomn oriented and key/value) in a sense of comparing the performence of storage and processing of these models with openehr standard.
because (till now there is only the comparison of couchbase with SQL relational databases and no focus on specific nosql schemes)
so by then i can select the optimal solution to include as a performant model and do some analytics with datamining techniques and here goes the process of my whole phd goal.
My regards,
Fadoua khennou
---
## Post #7 by @pablo
Hi Fadoua,
I would suggest to consider generating a DB schema from the information model rather than generating it from the archetypes, since the schema for the IM can store any archetyped structure without modifying the schema, and with the approach you proposed, your schema will grow with each new archetype.
Also measuring performance is tricky, because performance will depend on specific use cases, and some schemas might be more performant for insert intensive usage, and others will be more performant for querying intensive usage. Event two different schemas on the same DB technology might have different benchmark/performance results on different use cases. Also optimizations can be done, and as more indexes are defined (more redundant data), performance for querying can be improved a lot, even using a relational database.
You might already consider this but it's worth noting: most of the current relational databases support XML or JSON as primitive datatypes. It might be interesting to test those also as an alternative of a native document database.
I've been working on this area for awhile, and a couple of years ago I designed the openEHR clinical database implementation course (in spanish, english available soon), and presented a workshop with other members of this community for the MEDINFO, it was the workshop with most attendees of the conference
here you can find the presentation:
[http://www.slideshare.net/pablitox/design-and-implementation-of-clinical-databases-using-openehr](http://www.slideshare.net/pablitox/design-and-implementation-of-clinical-databases-using-openehr)
[](http://www.slideshare.net/pablitox/design-and-implementation-of-clinical-databases-using-openehr)[http://www.cabolabs.com/capacitacion/medinfo2015_tutorial_bases_de_datos_cilnicas.pdf](http://www.cabolabs.com/capacitacion/medinfo2015_tutorial_bases_de_datos_cilnicas.pdf)
>
[Design and Implementation of Clinical Databases with openEHR](http://www.cabolabs.com/capacitacion/medinfo2015_tutorial_bases_de_datos_cilnicas.pdf)
www.cabolabs.com
Design and Implementation of Clinical Databases with openEHR Pablo Pazos Gutiérreza,b,c, Koray Atalagd, Luis Marco-Ruize, Erik Sundvallf,g, Sérgio Miranda Freireh
|
> - |
>
[
](http://www.slideshare.net/pablitox/design-and-implementation-of-clinical-databases-using-openehr)
|
[Design and implementation of Clinical Databases using openEHR](http://www.slideshare.net/pablitox/design-and-implementation-of-clinical-databases-using-openehr)
www.slideshare.net
Design and implementation of Clinical Databases using openEHR 1. Tutorial - Design and Implementation of Clinical Databases with openEHR ...
|
> - | - |
BTW, did you considered testing openEHR backends? If yes, please take a look: [http://cabolabs.com/en/projects](http://cabolabs.com/en/projects)
---
## Post #8 by @system
Very good presentation, Pablo\.
Very good for people studying the possibilities, good study, good evaluation of the databases\.
I was missing the MarkLogic database, which is expensive to use \($18\.000 a year, or $0\.99/hr on Amazon AWS\), but can be downloaded for free for developers:
http://developer.marklogic.com/free-developer
I appreciate if someone can publish experiences with this database\. It is document\-centric: native XML, JSON and NoSQL\.
Bert
---
## Post #9 by @system
The key part of our openEHR server is the composition/path index based on Lucene and served by Apache Solr\.
There are no SQLs involved in the query part here\.
Vennlig hilsen
Bjørn Næss
Product owner
DIPS ASA
Mobil \+47 93 43 29 10
\-\-\-\-\-Opprinnelig melding\-\-\-\-\-
---
**Canonical:** https://discourse.openehr.org/t/converting-archetype-into-nosql-schemes/15456
**Original content:** https://discourse.openehr.org/t/converting-archetype-into-nosql-schemes/15456