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.

  1. You first need to write a schema that fits your data model.

  2. Then you need to map your data model to your schema.

  3. 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:

  1. 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.

  2. You can also write the MQL to a file and then pump that file through the mql(.exe) program.

  3. 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:


Previous:Import
Up:Strategies
Next:Creating objects