Skip to content

Commit de4bddd

Browse files
committed
switch to docgen
1 parent 23efaa2 commit de4bddd

1 file changed

Lines changed: 31 additions & 1 deletion

File tree

README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,33 @@ sqlite> SELECT * FROM rdfs_label_statement WHERE value LIKE 'Abnormality of %';
2020
|HP:0000032|HP:0000032|rdfs:label||Abnormality of male external genitalia|xsd:string||
2121

2222

23-
Ready-made ontologies can also be downloaded for any ontology in [OBO](http://obofoundry.org), using URLs such as https://s3.amazonaws.com/bbop-sqlite/hp.db
23+
Ready-made SQLite3 builds can also be downloaded for any ontology in [OBO](http://obofoundry.org), using URLs such as https://s3.amazonaws.com/bbop-sqlite/hp.db
2424

2525
[relation-graph](https://github.com/balhoff/relation-graph/) is used to pre-generate tables of [entailed edges](https://incatools.github.io/semantic-sql/EntailedEdge/). For example,
2626
all is-a and part-of ancestors of [finger](http://purl.obolibrary.org/obo/UBERON_0002389) in Uberon:
2727

28+
```sql
29+
$ sqlite db/uberon.db
2830
sqlite> SELECT * FROM entailed_edge WHERE subject='UBERON:0002389' and predicate IN ('rdfs:subClassOf', 'BFO:0000050');
31+
```
32+
33+
|subject, predicate, object|
34+
|---|
35+
|UBERON:0002389, BFO:0000050, UBERON:0015212|
36+
|UBERON:0002389, BFO:0000050, UBERON:5002389|
37+
|UBERON:0002389, BFO:0000050, UBERON:5002544|
38+
|UBERON:0002389, rdfs:subClassOf, UBERON:0000061|
39+
|UBERON:0002389, rdfs:subClassOf, UBERON:0000465|
40+
|UBERON:0002389, rdfs:subClassOf, UBERON:0000475|
41+
42+
SQLite provides many advantages
43+
44+
- files can be downloaded and subsequently queried without network latency
45+
- compared to querying a static rdf, owl, or obo file, there is no startup/parse delay
46+
- robust and performant
47+
- excellent support in many languages
2948

49+
Although the focus is on SQLite, this library can also be used for other DBMSs like PostgreSQL, MySQL, Oracle, etc
3050

3151
## Installation
3252

@@ -101,6 +121,16 @@ See [Schema Documentation](https://incatools.github.io/semantic-sql/)
101121

102122
The [source schema](https://github.com/INCATools/semantic-sql/tree/main/src/semsql/linkml) is in [LinkML](https://linkml.io) - this is then compiled down to SQL Tables and Views
103123

124+
The basic idea is as follows:
125+
126+
There are a small number of "base tables":
127+
128+
* [statements](https://incatools.github.io/semantic-sql/Statements/)
129+
* [prefix](https://incatools.github.io/semantic-sql/Prefix/)
130+
* [entailed_edge](https://incatools.github.io/semantic-sql/EntailedEdge/) - populated by relation-graph
131+
132+
All other tables are actually views (derived tables), and are provided for convenience.
133+
104134
## ORM Layer
105135

106136
A SemSQL relational database can be accessed in exactly the same way as any other SQLdb

0 commit comments

Comments
 (0)