or not... and that all seems interesting, also Bert, you've mentioned the
BLOB-based storage, and I can understand that the overhead of indexing/and
others can be performed at specific moments, but I have understood that
unforeseen queries have a much worse scalability issue with XML-based
databases than with relational ones. Which still gives me the uneasy
feeling
that querying your EHRs can become a nightmare?
For the record, it was not my solution, I was talking about, but it is a
solution in an EHR system, not openehr, but also object-based, from 1996.
Querying was not a nightmare, most of the time, because, most queries are
well-known. Unknown queries needed preparation.
In the present time, one must ask in how far this is a problem. It is
always possible for a technician, who understands the RM, any query can be
build and executed in less then a few hours.
Strictly querying the openehr-RM-classes this is not too difficult, one
could think about solutions as HQL from Hibernate, or OCL.
This could be possible without writing much code, I believe there is an
OCL implementation for java-objects, the only thing needed is that the
classes can transparent load their data. You start on the top, the
EHR-object, and query into the compositions, or anything else.
But there is a problem, it may be easy to implement OCL, but it is not
easy to use. This is mainly because (f.e.) a "List" is not often used in
the RM, but an "ItemList" takes it's place, there is no text
attribute-type, but there is a DvText, etc.
These kind of RM-complexity make the use of languages as OCL hard to
understand and use.
It will be quite an advantage to build and implement a query-language,
that works on the RM, and which will be user-friendly, and eliminates the
need for technicians.
- one thing that I'm a bit confused about is the actual relation between
an
archetype and the reference model. Say that you have an INSTRUCTION
archetype, then persisting this consists of persisting data that is
required/mandatory/optional in the reference model defintion of an
INSTRUCTION, accompanied by all the data that is added as from the
archetype. Right? So in a sense, this feels like an open invititation to
map
the reference model to your database model, and have the
archetypes-defined
data stored in your blobly-like database? How are your ideas on this?
- in your database model, you tend to have everything expressed explicitly
(i.e. sort of pure relational). Am i right?
No, I explain.
I describe now shortly, in a few lines how I solve this problem, it maybe
can help you and others to think about a solution.
I would really like others to do the same (describe their database
solution), but that does not happen too much. That is a pity.
So, my database-structure is not a relational mirror of the RM (for every
class a table), and it is not pure relational.
I have parts of data stored in XML (specially, the more simple
structures), mostly to avoid excessive querying of the database. This
works fine. (retrieve one XML-string from the database (fast query), and
having a complete structure filled up with data)
Also which gives the kernel-database-layer speed is, I wrote the
data-retrieval "lazy". This means that data are only on request collected.
I also, take advantage of the database-rows, data which are implicit
collected (while collected other data, in one single database-read-action)
fill already up the classes. So the querying is lazy and in other moments
also pro-active.
The RM-classes fill up their selves, so, you can asked a list of
compositions from an EHR, without doing any database call, of being aware
of a database.
Thios is a transparent layer which does not know anything about the
database, and below that, I can put whatever I want. Now I have the
solution as described here, but switching to another solution (f.e. ther
blob-structure, or intersystems Cache) is easy, and will not disturb the
application-layers
I am thinking about implementing OCL, as a query language, but this still
will be the domain of technicians.
I read some discussions about AQL, which seems very interesting, but I
don't see an implementable solution or specification now (maybe I missed
it)
As soon as it is ready, I will look further into that subject.
I hope this helps
Regards
Bert