[annotator-dev] Annotator Store With SQL Server

Rouan Wilsenach rwilsen at thoughtworks.com
Mon Sep 23 07:54:53 UTC 2013


Hi Mifla

See my answers inline. Hope it helps.

Rouan

On 17 September 2013 07:18, Mifla Mashood <mifla17 at gmail.com> wrote:

> Hi,
>
> From the following statement I made out that it was possible to have my
> own storage system to store the annotations.
> *“**You'll need to store your data somewhere, luckily we've made this
> very simple to do using AnnotateIt <http://annotateit.org/>, a hosted web
> service for storing annotations.Alternatively if you'd like to integrate
> the annotator with your own storage system check out the Docs<http://github.com/okfn/annotator/wiki/> for
> more information on the annotation format and store plugin.”* *Would it
> be possible for me to use SQL Server? If yes, how should I go about doing
> it? I referred the links given. They look very generic and found a few 3rdparty tools but didn’t quite fit my requirements.
> *
>
It's completely possible to use MS SQL Server (I'm assuming that's what you
mean) or any other DB. You'll just have to write your own store server that
can accept the REST calls and interact with your DB appropriately.


> *My main requirements are,*
> *1. I should be able to store data in my sql server db and query them by
> using methods in the Annotator API*
>

The Annotator JQuery plugin will make its usual RESTful AJAX calls. It's up
to you to provide the endpoints for these to call. This page documents the
API you'll have to implement: https://github.com/okfn/annotator/wiki/Storage.
 You offer this API and point the annotator Store plugin to it (
https://github.com/okfn/annotator/wiki/Store-Plugin) using the 'prefix'
option.

*
> *
> *2. So essentially my database schema should be compliant with
> AnnotateIt, so that I can share my annotations with others who use
> Annotator.*
>

How you deal with this is up to you. If you use SQL, you obviously won't be
able to store the annotation data as JSON, but you could store it as plain
text in a normal VARCHAR column and do all the necessary encoding/parsing
in your app to deal with converting to and from JSON.


> *
> *
> *3. I would also like to use these data to draw conclusions, produce
> charts using various conditions etc... Can I do these If I use AnnotateIt
> instead of my own db?*
>

This is possible but not optimal. If you want to draw conclusions based on
the annotation data, it really would be ideal if you could use a document
store so that you could query the individual fields. Alternatives to MS SQL
here could be MongoDB, RavenDB, ElasticSearch (which is what AnnotateIt
uses) or even Postgres with its JSON column.

If you use MS SQL, you'll have to pull all the data into memory and run
your analytics there.

*
> *
> *4. How can I customize the AnnotateIt store to include additional
>  fields I would like to save?*
>

Using the 'annotationData' option of the Store plugin (
https://github.com/okfn/annotator/wiki/Store-Plugin)

*
> *
> *Regards,*
> *Mifla*
> *
> **Any guidance would be deeply appreciated.*
>
>
> --
> Kind Regards,
> Mifla
>
> _______________________________________________
> annotator-dev mailing list
> annotator-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/annotator-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/annotator-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20130923/ff784ecf/attachment-0002.html>


More information about the annotator-dev mailing list