Semantic SQL
A datamodel for RDF, OWL, and OBO Ontologies designed to work harmoniously with SQL databases.
Note that the primary purpose of this linkml schema is to organize and define SQL VIEWs to
be used on top of a generic SQL database following the rdftab statements schema.
These SQL views are encoded with the sqlviews>>
tag inside the yaml.
We use linkml to do this rather than a simple SQL DDL file because linkml gives us a standard way to do things such as:
- attach descriptions to each view
- define a data dictionary of all columns used, together with domains/ranges
- modular structure with imports
- the ability to attach rich semantic metadata to each schema element
Additionally, the framework provides automatic compilation to SQLAlchemy models, and tools for being able to turn views into indexed tables for efficient querying, as well as a rich searchable documentation system and other tooling.
This schema is best browsed online: https://cmungall.github.io/semantic-sql/
Note that things are in flux, and there some oddities that need ironed out, see issues for details.
See the github repo for code to convert from the linkml yaml into SQL DDL
URI: https://w3id.org/kgcl/semsql Name: semsql
Classes
Class | Description |
---|---|
AllProblems | |
AnnotationPropertyNode | A node representing an OWL annotation property |
AnonymousClassExpression | An OWL anonymous class expression, such as for example `SomeValuesFrom(partOf... |
AnonymousExpression | An OWL expression, such as a class expression |
AnonymousIndividualExpression | |
AnonymousPropertyExpression | |
AsymmetricPropertyNode | |
AxiomDbxrefAnnotation | |
BlankNode | A node with an ID that is not preserved between databases |
ClassNode | A node that represents an RDFS/OWL class |
ClassTrait | |
CountOfInstantiatedClasses | Number of distinct instantiations of a class |
CountOfPredicates | Number of distinct usages of a predicate |
CountOfSubclasses | Number of subclasses for a given class |
DeprecatedNode | |
Edge | A relation graph edge that connects two entities by a predicate |
EntailedEdge | A relation graph edge that is inferred |
EntailedEdgeCycle | An edge that composes with another edge to make a cycle |
EntailedEdgeSamePredicateCycle | An entailed_edge_cycle over a single predicate |
HasBroadMatchStatement | |
HasBroadSynonymStatement | |
HasDbxrefStatement | |
HasExactMatchStatement | |
HasExactSynonymStatement | |
HasMappingStatement | |
HasMatchStatement | |
HasNarrowMatchStatement | |
HasNarrowSynonymStatement | |
HasOioSynonymStatement | |
HasRelatedMatchStatement | |
HasRelatedSynonymStatement | |
HasSynonymStatement | |
HasTextDefinitionStatement | |
IndividualTrait | |
IriNode | |
IrreflexivePropertyNode | A node representing an OWL irreflexive object property |
IsReport | Used to describe classes/views that have a reporting function |
LexicalProblem | a problem with the textual value of an annotation property |
NamedIndividualNode | A node that represents an OWL Named Individual |
Node | The basic unit of representation in an RDF or OWL graph |
NodeToNodeStatement | A statement where object is non-null and value is not populated |
NodeToValueStatement | A statement where value is non-null and object is not populated |
NodeTrait | abstract groupings/properties for different aspects of the model |
NodeWithTwoLabelsProblem | |
ObjectPropertyNode | A node representing an OWL object property |
OntologyNode | A node representing an ontology |
OntologyStatusStatement | |
OwlAllValuesFrom | |
OwlAxiom | |
OwlAxiomAnnotation | |
OwlComplementOfStatement | |
OwlComplexAxiom | An axiom that is composed of two or more statements |
OwlDisjointClassStatement | |
OwlEquivalentClassStatement | A statement that connects two class_nodes where both classes are equivalent |
OwlEquivalentToIntersectionMember | Composition of OwlEquivalentClass , OwlIntersectionOf , and RdfListMember ... |
OwlHasSelf | |
OwlHasValue | |
OwlImportsStatement | |
OwlInverseOfStatement | |
OwlReifiedAxiom | An OWL axiom that has been reified - i |
OwlRestriction | An OWL restriction, such as SomeValuesFrom(partOf Hand) |
OwlSameAsStatement | A statement that connects two individual nodes where both individual are equi... |
OwlSomeValuesFrom | An OWL SomeValuesFrom restriction |
OwlSubclassOfSomeValuesFrom | Composition of subClassOf and SomeValuesFrom |
Prefix | Maps CURIEs to URIs |
Problem | Represents an instance of a problem pertaining to conformance to OBO guidelin... |
PropertyNode | Note this only directly classifies nodes asserted to be rdf:Properties |
PropertyTrait | |
PropertyUsedWithDatatypeValuesAndObjects | A problem in which the same property is used two two different ways, one in w... |
RdfFirstStatement | A statement that connects a list to its first element |
RdfLevelSummaryStatistic | Abstract grouping for views/classes that provide some kind of count summary a... |
RdfListMemberStatement | |
RdfListNode | A node representing an RDF list |
RdfListStatement | A statement that is used to represent aspects of RDF lists |
RdfRestStatement | A statement that connects a list to its remaining elements |
RdfRestTransitiveStatement | |
RdfTypeStatement | A statement that indicates the asserted type of the subject entity |
RdfsDomainStatement | |
RdfsLabelStatement | |
RdfsRangeStatement | |
RdfsSubclassOfNamedStatement | |
RdfsSubclassOfStatement | |
RdfsSubpropertyOfStatement | |
ReflexivePropertyNode | A node representing an OWL reflexive object property |
RelationGraphConstruct | A construct used as part of a Relation Graph |
RepairAction | Represents an action that needs to be taken to repair a problem |
Statements | Represents an RDF triple |
SubgraphEdgeByAncestor | An edge within a subgraph anchored around a set of ancestor terms |
SubgraphEdgeByAncestorOrDescendant | |
SubgraphEdgeByChild | An edge within a subgraph anchored around a set of child terms |
SubgraphEdgeByDescendant | An edge within a subgraph anchored around a set of descendant terms |
SubgraphEdgeByParent | An edge within a subgraph anchored around a set of parent terms |
SubgraphEdgeBySelf | A special null form of a subgraph query where there is no expansion |
SubgraphQuery | A subgraph query encompasses as subgraph edge and a seed/anchor object and se... |
SymmetricPropertyNode | A node representing an OWL symmetric object property |
TermAssociation | A minimal datamodel for relating a subject entity to an object term |
TrailingWhitespaceProblem | |
TransitiveEdge | A relation graph edge that is formed from a chain of one or more edges |
TransitivePropertyNode | A node representing an OWL transitive object property |
Slots
Slot | Description |
---|---|
anchor_object | |
anchor_predicate | |
annotation_datatype | |
annotation_language | |
annotation_object | |
annotation_predicate | |
annotation_subject | |
annotation_value | |
axiom_datatype | |
axiom_language | |
axiom_object | |
axiom_predicate | |
axiom_value | |
base | The base URI a prefix will expand to |
count_value | |
datatype | the rdf datatype of the value, for example, xsd:string |
description | |
element | |
evidence_type | |
filler | |
id | An identifier for an element |
label1 | |
label2 | |
language | the human language in which the value is encoded, e |
object | Note the range of this slot is always a node |
on_property | |
predicate | The predicate of the statement |
prefix | A standardized prefix such as 'GO' or 'rdf' or 'FlyBase' |
publication | |
restriction | |
secondary_predicate | |
source | |
stanza | the term which this statement is about |
subject | The subject of the statement |
value | Note the range of this slot is always a string |
Enumerations
Enumeration | Description |
---|---|
Types
Type | Description |
---|---|
xsd:boolean | A binary (true or false) value |
xsd:date | a date (year, month and day) in an idealized calendar |
linkml:DateOrDatetime | Either a date or a datetime |
xsd:dateTime | The combination of a date and time |
xsd:decimal | A real number with arbitrary precision that conforms to the xsd:decimal speci... |
xsd:double | A real number that conforms to the xsd:double specification |
xsd:float | A real number that conforms to the xsd:float specification |
xsd:integer | An integer |
LiteralAsStringType | |
xsd:string | Prefix part of CURIE |
NodeIdType | IDs are either CURIEs, IRI, or blank nodes |
shex:nonLiteral | A URI, CURIE or BNODE that represents a node in a model |
shex:iri | A URI or CURIE that represents an object in the model |
xsd:string | A character string |
xsd:dateTime | A time object represents a (local) time of day, independent of any particular... |
xsd:anyURI | a complete URI |
xsd:anyURI | a URI or a CURIE |
Subsets
Subset | Description |
---|---|
BaseTable | Indicates the class/table is typically not constructed from a view |
Export | Used to indicate a table/class that should be dumped as part of the export of... |