summaryrefslogtreecommitdiff
path: root/topics/next-gen-databases
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-07-31 17:29:32 +0300
committerMunyoki Kilyungi2023-07-31 17:30:26 +0300
commit8286f7474c9c0e7f4b9663cbc2916a4b7758072a (patch)
tree95642de0803349c0c38ad7fef83765b3000fca86 /topics/next-gen-databases
parent722945456e942f281c159b7da12a4aaf1faff10b (diff)
downloadgn-gemtext-8286f7474c9c0e7f4b9663cbc2916a4b7758072a.tar.gz
Add new entry documenting lessons from refining our ontologies
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'topics/next-gen-databases')
-rw-r--r--topics/next-gen-databases/ontology.gmi37
1 files changed, 37 insertions, 0 deletions
diff --git a/topics/next-gen-databases/ontology.gmi b/topics/next-gen-databases/ontology.gmi
new file mode 100644
index 0000000..0cd8deb
--- /dev/null
+++ b/topics/next-gen-databases/ontology.gmi
@@ -0,0 +1,37 @@
+# Ontologies
+
+Sticking to GN tables is a bad idea because it doesn't capture what "how" we want to define our data. Second we are not using the freedom of RDF.
+
+Here, we note down all lessons learnt while we continuously improve our ontologies.
+
+
+### rdfs:label
+
+Consider this pattern when dumping data in rdf:
+
+```
+(set gnt:displayName (field Species MenuName))
+```
+
+Notice that we use a new term: "gnt:displayName". This is unnecessary. Since what we want is to use a human readable way of capturing that. A better way would be:
+
+```
+(set rdfs:label (field Species MenuName))
+```
+
+This prevents us from having to "invent" our own terms all the time.
+
+
+### rdfs:domain and rdfs:range
+
+We use "rdfs:domain" and "rdfs:range" to "connect" a property to a class. So:
+
+```
+gn:code rdfs:domain gnc:inbredSet
+```
+
+means that gnc:inbredSet has the predicate gn:code. To represent the above using rdfs:range:
+
+```
+gnc:inbredSet rdfs:range gn:code
+```