# --------------------------------------------------------------------------
#
# Document:         UserML 2.1 / SQL - CreateRepository  
# For Database:     MySQL
# Creator:          Dominik Heckmann
# Creation Time:    15.10.2006
# Information:      http://ubisworld.org/documents
# Source:           http://ubisworld.org/documents/UserML/2.1/CreateRepository.sql
# Typ:              A specialized RDF Database for UserML 2.1
# --------------------------------------------------------------------------
#
# Description:  
# ============
# The DB table 'report' has the function to collect 'SituationalStatements' 
# A SituationalStatement is devided into five levels of information
# On purpose, the types of the fields are underspecified by using general 'text'.
# The intended filling will be URI pointers to ontologies, 
# especially to the GUMO ontology at http://www.gumo.org/ 
#
# Relation to RDF: 
# ================
# rdf:subject      is always an statement-URI like "http://u2m.org/statement/eu4j32jwseffwe395ek90345
# rdf:predicate    is always an UserMLTerm-URI like "http://u2m.org/2.0/UserML/Term/auxiliary" 
# rdf:object       can be anything (Text)
#
#
# DB Fields (with Level Grouping):
# ================================
# 
#
# Mainpart (Information Level):
#    subject    =  the subject in the mainpart (i.e. a user for user modeling)
#    auxiliary  =  an auxiliary verb like hasProperty or hasInsterest or hasKnowledge
#    predicate  =  any concept that is defined in any ontology, especialy in UbisWorldOntology 2.0  
#    range      =  a datatype of the object or objects
#    object    =  the REST of the mainpart, it could be one object or an XML Structure or anything else.
#
# Situation (Meta Level 1):
#    start      =  point of time, when the statement was given
#    durability =  estimated qualitative duration for the validity of the statement (calculated expirica)
#    location   =  the location, where the mainpart took place
#    position   =  the coordinates within the location, where the mainpart took place 
#    context    =  the relating and contextual conditions that classify the statement
#
# Explanation (Meta Level 2): 
#    source     =  the original database or repository 
#    creator    =  the creator of the statement    
#    method     =  the method that was used for the mainpart
#    evidence   =  an evidence list for the mainpart
#    confidence =  a number between 0.00 and 100.00 to express the creators confidence
#
# Privacy (Meta Level 3):
#    key        =  for security checking
#    owner      =  the owner of the statement
#    access     =  the group, to which access is granted
#    purpose    =  the purpose for which the statement can be used for
#    retention  =  the timespan for when the statement must be deleted
#
# Administration (Administration Level):
#    id         =  internal counter for the database
#    unique     =  globally unique identifier
#    replaces   =  reference to an existing statement
#    group      =  used for partitioning the table into UserModel, UsageModel, ...
#    notes      =  to attach general remarks to the statement


# -------------------------------------------------------------------------
#  Table structure for `report`:
# -------------------------------------------------------------------------

CREATE TABLE `repository` (
  `id` int(11) NOT NULL auto_increment,
  `subject` text,
  `auxiliary` text,
  `predicate` text,
  `range` text,
  `object` text,
  `start` text,
  `durability` text,
  `location` text,
  `position` text,
  `context` text,  
  `source` text,
  `creator` text,
  `method` text,
  `evidence` text,
  `confidence` text,
  `key` text,
  `owner` text,
  `access` text,
  `purpose` text,
  `retention` text,
  `unique` text,
  `replaces` text,
  `group` text,
  `notes` text,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM;


