摘要:Semantic web is a web of linked RDF data that can exchange and reuse data allowing for more use of traditional web documents. However, the huge amount of data on the web are still formed and stored in relational databases (RDBs), such data cannot be used directly via the Semantic Web. Consequently, construction of ontology (Semantic Web -side) from relational schema and data (RDBs -side) and querying of constructed ontology semantically are fundamental challenges for the development and integration of the Semantic Web from the data source (i.e. database). This paper proposes an approach for providing a formulated operation rules to express semantic queries against structured graph ontology in the relational query language SQL. This approach applied by rewriting SPARQL queries over generated ontology (i.e. RDF triples) corresponding to advantages of SQLrelational algebra operation queries in RDBs and performed by two phases. The first phase focused on proposing and improving rules of extracting ontology directly from the important concepts in the relational database with considering database containing null-values to avoid data losses during the transformation process. The generated ontology represented in the form of OWL-RDFS/RDF triples to ensure its availability at Semantic Web, thus help semantic query engines to answer more queries. Furthermore, thefirst phase providing additional rules to generate the Internationalized Resource Identifiers (IRIs) for RDB schema and data. In the second phase, we proposed a set of rules inspired by fundamental operations of relational algebra (SQL algebra) for rewriting a relational algebra for SPARQL over RDBs that represented in RDF triples. In other words, translating SQL relational algebra operation queries into equivalent graph semantic queries (SPARQL). The proposed approach is demonstrated with examples, validated, implemented and compared with existing approach methods. The effectiveness of the proposed approach is evaluated by experimental results.