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