@prefix owl:  <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:  <http://www.w3.org/2001/XMLSchema#> .
@prefix m: <https://magnowlia.com/ontology/mapping#> .

<https://magnowlia.com/ontology/mapping> a owl:Ontology ;
    rdfs:label "Magnowlia Mapping Vocabulary" ;
    rdfs:comment "Vocabulary for mapping business concepts to physical database structures in the Magnowlia ontology framework." .

m:BusinessView a owl:Class ;
    rdfs:label "Business View" ;
    rdfs:comment "Logical business view that may combine or filter one or more technical tables." .

m:Table a owl:Class ;
    rdfs:label "Table" ;
    rdfs:comment "Physical database table or persisted view." .

m:Column a owl:Class ;
    rdfs:label "Column" ;
    rdfs:comment "Physical database column used for mapping business attributes and metrics." .

m:mapsToTable a owl:ObjectProperty ;
    rdfs:label "maps to table" ;
    rdfs:comment "Links a business class or view to one or more underlying physical tables." ;
    rdfs:domain owl:Class ;
    rdfs:range m:Table .

m:mapsToColumn a owl:ObjectProperty ;
    rdfs:label "maps to column" ;
    rdfs:comment "Links a business attribute to the physical column(s) that realize it." ;
    rdfs:domain owl:DatatypeProperty ;
    rdfs:range m:Column .

m:belongsToTable a owl:ObjectProperty ;
    rdfs:label "belongs to table" ;
    rdfs:comment "Links a physical database column to its containing table." ;
    rdfs:domain m:Column ;
    rdfs:range m:Table .

m:joinCondition a owl:DatatypeProperty ;
    rdfs:label "join condition" ;
    rdfs:comment "SQL-like join/filter rule for composite or filtered business views." ;
    rdfs:domain owl:Class ;
    rdfs:range xsd:string .

m:unionOfTables a owl:DatatypeProperty ;
    rdfs:label "union of tables" ;
    rdfs:comment "SQL-like UNION rule describing a business union view." ;
    rdfs:domain owl:Class ;
    rdfs:range xsd:string .

m:realizedBy a owl:DatatypeProperty ;
    rdfs:label "realized by" ;
    rdfs:comment "SQL-like realization of a business relationship via technical tables." ;
    rdfs:domain owl:ObjectProperty ;
    rdfs:range xsd:string .

m:tablePrefix a owl:DatatypeProperty ;
    rdfs:label "table prefix" ;
    rdfs:comment "Schema prefix for SQL table references. Composed with the table URI fragment to form the qualified SQL table name." ;
    rdfs:domain m:Table ;
    rdfs:range xsd:string .

