Okay, I have been learning SPARQL to query dbpedia and I can't seem to find clear and practical tutorials related to SPARQL and the Semantic Web. If I say that an ontology is analogous to an SQL table definition or maybe a specification of an object's members should I be slapped?
Most basically, the term "ontology" is roughly equivalent to the "domain model". It is the set of all objects that represent real world objects or concepts, including all defined relationships, rules, attributes and other metadata that is known or must be assumed as true about these objects within the bounds of this domain.
In the Semantic Web, the "ontology" being discussed is the definition of the information available from a Semantic Web data store. It's contained in documents that conform to a standard called RDF (Resource Description Framework), which can be implemented or serialized as an XML document. Think of these definitions as having a similar purpose for Web 3.0 as WSDL or JSDL documents have for web services; they contain the metadata needed for a computer to generate the DTOs and make the calls to obtain the data.
A semantic web ontology is defined in OWL (Web Ontology Language). It has limited support for developer tooling and is primarily an input to an inference engine. Such an engine works deductively to conclude new facts for inclusion in the store (or, conversely, to expand the results of queries).
For example if:
ex:object1 ex:hasAncestor ex:object2 . ex:object2 ex:hasAncestor ex:object3
then in OWL you can declare that that ex:hasAncestor is transitive and the inference engine will add a new fact to your store:
ex:object1 ex:hasAncestor ex:object3 .
This is just one example of a new category of facts that can be inferred using OWL reasoning. OWL is often used to build mappings between similar vocabularies, or to declare that two partial records of an object should be merged (even/especially if they have different identities). You you might declare that email address fields are unique identifiers and the store will merge records for you according to the email address.
OWL has no unique business value compared to other technology, as the same logic can be always re-implemented in queries fairly trivially, but offers an interesting implementation strategy suitable for a range of use cases.