Need a recommendation on storing html fragements in stardog

I know Stardog is not a document database. However I have a need to store HTML tables of various length.

So a few questions:

  • What data type should I use? xsd:string?
  • What is the limit in chars of how much data can be stored in one attribute?

Once the html fragments are are stored they will be used in a couple ways:

  • Presented to the user in a webapp for reference purposes
  • Used as input for similarity search against some other attributes

Thanks,
Radu

You might be able to argue that Stardog is a document database with the BITES feature but I get that's not exactly what you're talking about.

The limit on literals is like 8mb after compression so it's not an exact number. https://www.stardog.com/docs/#_known_issues_2

You have a lot of options here but which one you choose will depend on your use case. I would possibly load the data into Stardog, either directly or via virtual mapping, and serve the tables at some IRI with a web server and include a link to the html table with your data. You'd have the data that your can search against and when you wanted the html table for presenting you'd have them fetch from the IRI.

Thank you Zachary - very helpful reply.

P.S. BITES on back burner to look at already!

There's a lot of cool stuff to checkout with Stardog.

One thing I'd add to my answer that just occured to me. This is assuming that your tables are generally immutable since keeping any updates synched between your HTML tables and the triples stored in stardog difficult. You could also write a custom BITES extractor that would extract the table data automatically and provide and HTTP endpoint for the tables automatically. The data would be updated when you reprocessed the table in BITES. You could also write some custom code to simply recreate the HTML tables directly from triples with something like an XSLT to transform a sparql results query to an HTML table.

You have a bunch of options here depending what exactly you're looking to do.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.