From 34ad9946788ba7ac4707c7e945578386c9959144 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 5 May 2022 15:12:54 +0530 Subject: README: Document loading RDF and visualizing schema. * README.md (Using): Document loading RDF and visualizing schema. --- README.md | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 069fdb8..d558e4d 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,13 @@ with the appropriate values. (sql-password . "") (sql-database . "") (sql-host . "") - (sql-port . )) + (sql-port . ) + (virtuoso-port . ) + (virtuoso-username . "") + (virtuoso-password . "") + (sparql-scheme . ) + (sparql-host . "") + (sparql-port . )) ``` Then, to dump the database to \~/data/dump, run @@ -34,7 +40,37 @@ $ ./pre-inst-env ./dump.scm conn.scm ~/data/dump ``` Make sure there is enough free space! It\'s best to dump the database on -penguin2 where disk space and bandwidth are not significant constraints. +penguin2 where disk space and bandwidth are not significant +constraints. + +Then, load the dumped RDF into virtuoso. This will load the dumped RDF +into the `http://genenetwork.org` graph, and will delete all +pre-existing data in that graph. + +``` shell +$ ./pre-inst-env ./load-rdf.scm conn.scm ~/data/dump/dump.ttl +``` + +Now, you may query virtuoso to visualize the SQL and RDF schema. + +``` shell +$ ./pre-inst-env ./visualize-schema.scm conn.scm +``` + +This will output graphviz dot files `sql.dot` and `rdf.dot` describing +the schema. Render them into SVG images like so. + +``` shell +$ dot -Tsvg -osql.svg sql.dot +$ dot -Tsvg -ordf.svg rdf.dot +``` + +Or, peruse them interactively with `xdot`. + +``` shell +$ xdot sql.dot +$ xdot rdf.dot +``` # Contributing -- cgit v1.2.3