Create on-the-fly
What's this?
Say you have some application that does analysis or annotation of
text. It could be a parser, a morphological tagger, or similar. The
program could do the analysis on its own, or via human input.
Now you want to store those analyses in an Emdros database for easy
searching.
How do I store my analyses?
Well, let us assume you have some in-memory representation of your
analyses.
You first need to write a schema that fits your data model.
Then you need to map your data model to your schema.
Then you need to write code that issues MQL statements that
create the objects in the database from your in-memory
representation.
How do I issue MQL statements?
You have several strategies at your option:
Given that this is an on-the-fly creation, the easiest is
probably to have a live database connection into which you can pump
the MQL on-the-fly. Use either the C++ libraries or one of the SWIG
bindings.
You can also write the MQL to a file and then pump that file
through the mql(.exe) program.
Finally, you can write the MQL to a pipe that is connected to
stdin on a process running the mql(.exe) program.
How do I create the objects?
See this section:
|