Tuesday, February 15, 2011

Installation of Oracle Semantic Technologies

Oracle semantic capability requires three technologies:

  1. Oracle Enterprise Edition
  2. Spatial Option
  3. Partitioning
In this article, we will show you how to install Oracle Database 11g R2 with the required options and how to verify the installation is successful. However, before you start, read this sister article Overview of Oracle Database Semantic Technologies first.

Oracle Database Software Downloads

You can download Oracle Database 11 g Release 2 from here. Before you proceed, you need to determine which one to download from based on your platform. For example, I'll download "Linux x86-64" because I'm using a Linux system with 64 bit. To check out which Linux version of your system is, type the following command:
>uname -mrsn
Linux aec6465414 2.6.18- x86_64
There are two zip files. Make sure to download and unzip both files to the same directory.

Installing Oracle Database

Some important notes before we begin:
  1. Do not install Oracle Database 11g Release 2 (11.2) software into an existing Oracle home.
  2. You may need to shut down existing Oracle processes before you start the database installation. Refer to "Stopping Existing Oracle Processes" for more information.
  3. Take notes of any locations (i.e., "Oracle base", "Software location", etc.) or information (i.e., OSDBA Group, SID, etc) reported in the installation steps. You may need them later for debugging. Or, if you choose to save response file at the end of installation, all these information will be recorded in it (i.e., /scratch/oradba/db.rsp; you need to login as oradba to view it)
  4. Choose Enterprise Edition option in the installation.
  5. You may want to have MDSYS account unlocked in the installation.

My system is Linux. So, I'm following this installation guide. In most cases, you use the graphical user interface (GUI) provided by Oracle Universal Installer to install Oracle Database. The instructions in this section explain how to run the Oracle Universal Installer GUI:
  1. Check preinstallation requirements
  2. Change directory to the directory where you have downloaded zip files (i.e., /scratch/xxx/oracle11)
  3. Unzip both files
  4. cd /scratch/xxx/oracle11/database
  5. Run Oracle Universal Installer
    • ./runInstaller
  6. At the "Prerequisite Checks" step, you may see some checks with failed status. Some of these are fixable. Click "Fix & Check Again" button to get the instructions. For example, I have to do these steps:
    • Login as "root"
    • cd /tmp/CVU_11.
    • ./runfixup.sh
  7. After the fixes, I do have one remaining issue related to swap space. However, I simply ignore it and the installation still finish without issue. If not, you need to increase your swap space.
  8. Save Response File (i.e., /scratch/oradba/db.rsp)
    • This file holds all the information your have chosen for the installation.
  9. Execute Root Scripts to setup environment
    • cd /scratch/oradba/app/oraInventory/
    • ./orainstRoot.sh

Verifying the Installation

There are two options to be verified:
  1. Spatial option
  2. Partitioning option
Verification of Oracle Spatial Installation

The RDF and OWL support are features of Oracle Spatial, which must be installed for these features to be used. However, the use of RDF and OWL is not restricted to spatial data.

To be able to do a successful Spatial 11g installation you need to have the following products already installed:

* JServer JAVA Virtual Machine
* Oracle interMedia
* Oracle XML Database

To verify if the products are installed and valid run:

SQL> select comp_id,version,status from dba_registry
where comp_id in ('JAVAVM','ORDIM','XDB');

The result should be similar to this:

-------------------- ------------------------ -----------------

After verifying the dependent products of Spatial are installed correctly, you can execute the following steps to verify if Spatial is installed correctly:

SQL> connect / as sysdba
SQL> set serveroutput on
SQL> execute validate_sdo;
SQL> select comp_id, control, schema, version, status, comp_name from dba_registry where comp_id='SDO';
SQL> select object_name, object_type, status from dba_objects where owner='MDSYS' and status <> 'VALID' order by object_name;

For example,

select object_name, object_type, status from dba_objects where owner='MDSYS' and status <> 'VALID' order by object_name;

Should return 0 entries and

select comp_id, control, schema, version, status, comp_name from dba_registry where comp_id='SDO';

Should return:

If you should have found that Spatial component was not installed, you can follow the instructions here.

Verification of Oracle Partitioning Option

Partitioning comes with EE (enterprise edition) as an option on top of enterprise edition, not with SE (standard edition) or XE (express edition). To see if your Oracle has Partitioning, do:
select * from v$option;
---------------------------------------------------------------- -------------------------------
Partitioning TRUE
You should see the above result.

Read More

If you want to start using semantic technology to store, manage, and query semantic data in the database, read Oracle Database Semantic Technologies Developer's Guide.

This guide
provides complete usage and reference information about Oracle Database Enterprise Edition support for semantic technologies, including storage, inference, and query capabilities for data and ontologies based on Resource Description Framework (RDF), RDF Schema (RDFS), and Web Ontology Language (OWL).

If you need extra adapters or plugin's, look here.


  1. Oracle Database Software Downloads
  2. Oracle Semantic Technologies Downloads
  3. Oracle® Database Installation Guide 11g Release 2 (11.2) for Linux
  4. Oracle® Database Semantic Technologies Developer's Guide 11g Release 2 (11.2)
  5. Overview of Oracle Database Semantic Technologies

Overview of Oracle Database Semantic Technologies

Oracle 11g is the leading database with native RDF /OWL  semantics capability and is well positioned for supporting Semantic-based application (for example, Social Network Analysis or Text Mining). For different use cases, read slide 8 and 9 on this presentation. Oracle 11g provides the following capabilities:

  • Can readily scale to ultra-large repositories (e.g., up to 10 billion)
  • Has growing ecosystem of 3rd party tool partners (see slide 11 on this presentation)
  • Combines SQL query of relational data with RDF graphs and ontologies
  • Leverages Oracle Partitioning and Page compression
  • Supports RAC and Exadata platforms

It also enables you to:

  • Store semantic data and ontologies
  • Query semantic data
  • Perform ontology-assisted query of enterprise relational data
  • Use supplied or user-defined inferencing to expand the power of querying on semantic data

The Figure below shows how these capabilities interact.

The RDF triples, the basic data model for semantic web, is what makes semantic technologies different from relational technologies. It's self-describing . There is no need for schema. The schema is built into the triples itself. All triples are parsed and stored in the system as entries in tables under the MDSYS schema in Oracle. Note that duplicate triples are not stored in the database. But, canonically equivalent text values having different lexical representations are stored in the database.

RDF Triples

RDF triples is used to create a knowledgebase (vs. a database). It is defined as:

  • Things in the world are resources like:
    Employee, Manager, Department
  • Resources have properties (they are resources too) such as:
    first_name, employee_id, salary
  • Properties have values like:
    "John", "16530", "80,000"

A resource-property-value statement (or subject-predicate-object) is called a triple. We can generate triples from either underlying relational database data or other sources.

Subject PredicateObject
Employee16530 employee_id "16530"
Employee16530 first_name "John"
Employee16530 salary "80,000"

Triples can be linked to form a graph that describes concepts (for example, Person and Organization). Properties also link resources together (for example, "works_for" in the figure).

This graphical data model represents the schema which can dynamically evolve over time. For example, after appending Dept20, the new graph looks like:

Inferencing Based on Transitivity

Inferencing is the ability to make logical deductions based on rules. Inferencing enables you to construct queries that perform semantic matching based on meaningful relationships among pieces of data, as opposed to just syntactic matching based on string or other values. Inferencing involves the use of rules, either supplied by Oracle or user-defined, placed in rulebases. The inferencing capability that Oracle 11g supports is defined by W3C:
  • Native inferencing in the database for
    • RDF, RDFS, OWL subset
    • User-defined rules
  • New relationships/triples are inferred (or entailed) and stored ahead of query time
    • Forward Chaining
    • Entailment stored persistently to minimize on-the-fly computation, thus speeding query execution
  • Automatic identification of new relationships (triples) as shown in the figure below

Vocabulary Support in Oracle 11g R2

Oracle 11g R2 supports different Domain Ontologies which are the taxonomies that represent particular vertical domains:
  • W3C Simple Knowledge Organization System (SKOS)
    • New rulebase supporting the emerging SKOS standard on RDF
    • Enables easy sharing of controlled / structured vocabularies (thesauri, taxonomies, classification schemes)
    • Enforces integrity constraints
  • Dublin Core (for media and library)
  • SNOWMED (for medical communities)
  • NCI (National Cancer Institute, Gene Ontology)
  • FOAF (Friend of a Friend)
  • GeoRSS
  • SIOC (Semantically-Interlinked Online Communities)
  • GoodRelations (eCommerce Product Ontology)
  • Others

Read More

  1. Oracle Database Semantic Technologies
  2. Oracle Semantic Technologies Downloads
  3. Oracle Semantic Technologies Inference Best Practices with RDFS/OWL
  4. Oracle Database Semantic Technologies Developer's Guide (11.2)
  5. SEM_APIS package
  6. Installation of Oracle Semantic Technologies
  7. Oracle Database Semantic Technologies: Understanding How to Install, Load, Query and Inference
  8. Oracle Database Semantic Technologies Tutorial
  9. A Scalable RDBMS-Based Inference Engine for RDFS/OWL
  10. Oracle Database Semantic Technologies - Product Performance
  11. Semantic Technologies & Triplestores for BI