0

I've seen that there is a vote for a close request because the question is too broad. Let me rewrite the question:

There is a need to add metadata to different database tables (and thus records) which exposes itself as linked data in the form of json-ld on the website.

Database records of the same type could have different metadata. Depending on the content I should be able to save/store different metadata.

For example, I could add this fixed metadata to every page. Because I have this data available:

<script type="application/ld+json">
        {"@context":"https://schema.org","@type":"City","name":"@model.MyCityVariable"}
    </script>

Let's say I want to link my city to Geonames and Getty TGN. In a normal circumstance I would need to add two database fields: one to store the Geonames id and one to store the Getty TGN id.

For brussels this would be:

ID 2800866 from https://www.geonames.org/2800866/brussels.html
ID 7007868 from https://www.getty.edu/vow/TGNFullDisplay?find=Brussel&place=&nation=&prev_page=1&english=Y&subjectid=7007868

What if I want to add other sources or other metadata. Adding a database field for each new item doesn't feel right.

The goal is finding out how to store additional metadata, without having to add a specific database field for each item.

After searching I didn't know sql server was capable of working with JSON: https://learn.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server?view=sql-server-ver16

It looks like this might be a good way to add one extra database field and store a serialized json object in it, which contains my different metadata fields (like the IDs).

Maybe the question now can be:

Is this json+sql server a proper way of storing metadata and linking/providing linked data to an existing website/database? Are there other, better ways?

Tech used: sql server, asp.net core mvc, ef core

(I might be adding an asp.net core web api also.)

3
  • Are you aware of triplestores? Commented Aug 19, 2022 at 11:49
  • looks like this is another type of DB, meaning that it can't be used with my current sql server? Commented Aug 22, 2022 at 8:21
  • 1
    Yes, such a triplestore DB would be the "proper way" to store RDF (JSON-LD is a RDF serialization). But depending on your setup / use case, using it might be overkill, of course. Commented Aug 22, 2022 at 9:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.