-- TAP_SCHEMA definition 
CREATE SCHEMA TAP_SCHEMA;

CREATE TABLE TAP_SCHEMA.schemas (
  schema_name varchar(128) not null,
  description TEXT,
  utype varchar(128)
);

CREATE TABLE TAP_SCHEMA.tables (
  schema_name varchar(128) not null,
  table_name varchar(128) not null,
  table_type varchar(16),
  description TEXT,
  utype varchar(128)
);

CREATE TABLE TAP_SCHEMA.columns (
  id SERIAL8,
  table_name varchar(128) not null,
  column_name varchar(128) not null,
  description TEXT,
  unit varchar(64),
  ucd varchar(64),
  utype varchar(128),
  datatype varchar(64),
  size integer,
  principal integer,
  indexed integer, -- assume T or F
  std integer, -- assume T or F
  rank integer 
);

CREATE TABLE TAP_SCHEMA.keys (
  key_id varchar(128) not null,
  from_table varchar(128) not null,
  target_table varchar(128) not null,
  utype varchar(128),
  description TEXT
  );

CREATE TABLE TAP_SCHEMA.key_columns (
  id SERIAL8,
  key_id varchar(128) not null,
  from_column varchar(128) not null,
  target_column varchar(128) not null
  );
  


INSERT INTO TAP_SCHEMA.schemas (schema_name,description, utype) VALUES('TAP_SCHEMA','the schema containing the TAP metadata tables',null);

INSERT INTO TAP_SCHEMA.schemas (schema_name,description, utype) VALUES('','the schema containing the data model tables and views metadata tables',null);

INSERT INTO TAP_SCHEMA.tables (schema_name,table_name,table_type,description,utype)VALUES('TAP_SCHEMA','TAP_SCHEMA.schemas','base_table','the table storing metadata about the different schemas in this TAP service',null);
INSERT INTO TAP_SCHEMA.tables (schema_name,table_name,table_type,description,utype)VALUES('TAP_SCHEMA','TAP_SCHEMA.tables','base_table','the table storing metadata about the tables in this TAP service',null);
INSERT INTO TAP_SCHEMA.tables (schema_name,table_name,table_type,description,utype)VALUES('TAP_SCHEMA','TAP_SCHEMA.columns','base_table','the table storing metadata about the columns in this TAP service',null);
INSERT INTO TAP_SCHEMA.tables (schema_name,table_name,table_type,description,utype)VALUES('TAP_SCHEMA','TAP_SCHEMA.keys','base_table','the table storing metadata about the foreign keys in this TAP service',null);
INSERT INTO TAP_SCHEMA.tables (schema_name,table_name,table_type,description,utype)VALUES('TAP_SCHEMA','TAP_SCHEMA.key_columns','base_table','the table storing metadata about the foreign key columns in this TAP service',null);


      INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'schema_name'
,  'TAP_SCHEMA.schemas'
,  'This column stores the name of the schema'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'TAP_SCHEMA.schemas'
,  'This column stores the description of the schema'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  2);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'utype'
,  'TAP_SCHEMA.schemas'
,  'This column stores the utype of the schema'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  3);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'schema_name'
,  'TAP_SCHEMA.tables'
,  'This column stores the name of the schema the table represented by this row belongs to.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'table_name'
,  'TAP_SCHEMA.tables'
,  'This column stores the name of the table represented by the row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  2);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'table_type'
,  'TAP_SCHEMA.tables'
,  'This column stores the type of the table represented by the row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  3);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'TAP_SCHEMA.tables'
,  'This column stores the description of the table represented by the row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  4);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'utype'
,  'TAP_SCHEMA.tables'
,  'This column stores the Utype of the table represented by the row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  5);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'column_name'
,  'TAP_SCHEMA.columns'
,  'This column stores the name of the column represented by this row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'table_name'
,  'TAP_SCHEMA.columns'
,  'This column stores the fully qualified name of the table the column represented by this row belongs to.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  2);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'TAP_SCHEMA.columns'
,  'This column stores the description of the column represented by this row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  3);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'unit'
,  'TAP_SCHEMA.columns'
,  'This column stores the unit of the column represented by this row.'
,  null
,  null
,  null
,  'CLOB'
,  null
,  1
,  0
,  0
,  4);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ucd'
,  'TAP_SCHEMA.columns'
,  'This column stores the UCD of the column represented by this row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  5);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'utype'
,  'TAP_SCHEMA.columns'
,  'This column stores the description of the column represented by this row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  6);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'datatype'
,  'TAP_SCHEMA.columns'
,  'This column stores the datatype of the column represented by this row.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  0
,  0
,  7);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'size'
,  'TAP_SCHEMA.columns'
,  'This column stores the size of the column represented by this row.'
,  null
,  null
,  null
,  'INTEGER'
,  null
,  1
,  0
,  0
,  8);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'principal'
,  'TAP_SCHEMA.columns'
,  'This column stores whether the column represented by this row is primary.'
,  null
,  null
,  null
,  'INTEGER'
,  null
,  1
,  0
,  0
,  9);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'indexed'
,  'TAP_SCHEMA.columns'
,  'This column stores whether the column represented by this row is the first column in an index.'
,  null
,  null
,  null
,  'INTEGER'
,  null
,  1
,  0
,  0
,  10);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'std'
,  'TAP_SCHEMA.columns'
,  'This column stores whether the column represented by this row is standard.'
,  null
,  null
,  null
,  'INTEGER'
,  null
,  1
,  0
,  0
,  11);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'rank'
,  'TAP_SCHEMA.columns'
,  'This column stores the rank of the column represented by this row.'
,  null
,  null
,  null
,  'INTEGER'
,  null
,  1
,  0
,  0
,  12);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'key_id'
,  'TAP_SCHEMA.keys'
,  'This column stores the id of the foreign key represented by this row belongs to.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'from_table'
,  'TAP_SCHEMA.keys'
,  'This column stores the name of the table from which the foreign key points to the target table.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  2);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'target_table'
,  'TAP_SCHEMA.keys'
,  'This column stores the name of the table that is the target of this foreign key.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  3);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'utype'
,  'TAP_SCHEMA.keys'
,  'This column stores the Utype of the foreign key represented by the row.'
,  null
,  null
,  null
,  'VARCHAR'
,  64
,  1
,  0
,  0
,  4);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'TAP_SCHEMA.keys'
,  'This column stores the description of the table represented by the row.'
,  null
,  null
,  null
,  'CLOB'
,  null
,  1
,  0
,  0
,  5);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'key_id'
,  'TAP_SCHEMA.key_columns'
,  'This column stores the id of the foreign key in keys to which this key_columns belongs to.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'from_column'
,  'TAP_SCHEMA.key_columns'
,  'This column stores the name of a column that is doing the pointing.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  2);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'target_column'
,  'TAP_SCHEMA.key_columns'
,  'This column stores the name of the target column.'
,  null
,  null
,  null
,  'VARCHAR'
,  null
,  1
,  1
,  0
,  3);


-- tables and column inserts per objecttype

INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Resource'
,  'view'
,  'This class represents the main resources defined by the Simulation Data Model in the same way as the Registry/Resource class represents resources in registries. It is the base class of specialisations SimDM/Protocol, SimDM/Experiment, SimDM/Project and SimDM/Service.
These resources are the root entities that would get registered in a Simulation Database for example. They are also represented by root element declarations in XML schema serialisations of the model.  
This class is a thin copy of the Registry/Resource and borrows some of its elements. It *is-not-a* Registry Resource in the sense of inheritance. In particular a SimDM/Resource has a more refined and targeted content model. Also, SimDM/Resource-s are in general (much) more fine grained than Registry/Resource-s and would not qualify to be registered in an IVOA Registry.
It will howevere be possible to transform certain SimDM/Resource-s into Registry/Resource-s.'
,  'SimDM:/resource/Resource'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Resource'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Resource'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Resource'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Resource'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'Resource'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'Resource'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'Resource'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'Resource'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Party'
,  'view'
,  'Information that describes a Party, that is a person/individual or possibly an organisation.'
,  'SimDM:/resource/Party'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Party'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Party.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Party'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Party'
,  'the name or title of the contact person.

This can be a person''s name, e.g. "John P. Jones" or a group, "Archive Support Team".'
,  null
,  'TBD'
,  'SimDM:/resource/Party.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'email'
,  'Party'
,  'the contact email address'
,  null
,  'TBD'
,  'SimDM:/resource/Party.email'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'address'
,  'Party'
,  'the contact mailing address

All components of the mailing address are given in one string, e.g. "3700 San Martin Drive, Baltimore, MD 21218 USA".'
,  null
,  'TBD'
,  'SimDM:/resource/Party.address'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'telephone'
,  'Party'
,  'the contact telephone number

Complete international dialing codes should be given, e.g. "+1-410-338-1234".'
,  null
,  'TBD'
,  'SimDM:/resource/Party.telephone'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Project'
,  'view'
,  'A SimDM/Project is an aggregation of SimDM/Resource-s that belong together, for example because they have been produced together in the course of a scientific project. 
Examples are parameter studies where a large number of simulations is run with slightly varying parameter settings. But also a single large simulation with a number of post-processing results can be gathers in this way. 

It is assumed that SimDM/Project are generally "big enough" to qualify to be represented as a full-fledged Registry/Resource in an IVOA Registry. This possibility was on of the reasons to add this concept to the model.'
,  'SimDM:/resource/Project'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Project'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Project'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Project'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Project'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'Project'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'Project'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'Project'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'Project'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ProjectResource'
,  'view'
,  'Associative class between a SimDM/Project and its constitutent SimDM/Resource-s.'
,  'SimDM:/resource/ProjectResource'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ProjectResource'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/ProjectResource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ProjectResource'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'ProjectResource'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/ProjectResource.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ProjectResource_container'
,  'ProjectResource'
,  ''
,  'SimDM:/resource/ProjectResource.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ProjectResource_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'resourceId'
,  'ProjectResource'
,  'Reference to another SimDM/Resource that is included in the containing SimDM/Project.
[This column is part of the foreign key ProjectResource_resource pointing to the object in Resource].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ProjectResource_resource'
,  'ProjectResource'
,  'Resource'
,  'SimDM:/resource/ProjectResource.resource'
,  'Reference to another SimDM/Resource that is included in the containing SimDM/Project.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ProjectResource_resource'
,  'resourceId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Contact'
,  'view'
,  'This class connects a Party to a resource. 
It indicates the role the party plays on the resource, for example creator, owner or publisher.'
,  'SimDM:/resource/Contact'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Contact'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Contact.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Contact'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'Contact'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/Contact.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Contact_container'
,  'Contact'
,  ''
,  'SimDM:/resource/Contact.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Contact_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'role'
,  'Contact'
,  'The role this contact plays in the Resource'
,  null
,  'TBD'
,  'SimDM:/resource/Contact.role'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'partyId'
,  'Contact'
,  'Reference to the  Party that the Contact associates to the Resource.
[This column is part of the foreign key Contact_party pointing to the object in Party].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Contact_party'
,  'Contact'
,  'Party'
,  'SimDM:/resource/Contact.party'
,  'Reference to the  Party that the Contact associates to the Resource.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Contact_party'
,  'partyId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Target'
,  'view'
,  'Represents the scientific goal associated to a SimDM/Resource. This can be the goal of an experiment or project, or the type of object that a particular protocol will always produce. Is made concrete by suclasses representing objects or processes. We model a Target as "being an" ObjectType, which allows one to give a more detailed representation of its properties. The target is important as it represents one of the main questions scientists will ask about an experiment: what kind of astrophysical object or system or process was being simulated or modelled.'
,  'SimDM:/resource/Target'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Target'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Target'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Target'
,  'The name of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.name'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Target'
,  'Short description of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'Target'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/Target.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Target_container'
,  'Target'
,  ''
,  'SimDM:/resource/Target.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Target_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'TargetObjectType'
,  'view'
,  'This class represents the actual system that is being simulated. Instances of this object should correspond to physical objects and/or systems. They should be the answer to queries such as, “what does this simulation simulate?”'
,  'SimDM:/resource/TargetObjectType'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'TargetObjectType'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'TargetObjectType'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'TargetObjectType'
,  'The name of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.name'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'TargetObjectType'
,  'Short description of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'TargetObjectType'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/Target.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'TargetObjectType_container'
,  'TargetObjectType'
,  ''
,  'SimDM:/resource/Target.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'TargetObjectType_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'multiplicity'
,  'TargetObjectType'
,  'Indication on how many objects of this type are being modelled.'
,  null
,  'TBD'
,  'SimDM:/resource/TargetObjectType.multiplicity'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'identityName'
,  'TargetObjectType'
,  'If the target object type referes to a real object, this attribute allows one to indicate which object. This is performed by a URI that should identify the object in the Ontology of SimbadIdentifiedNames
In some cases a real identified object in the universe is being modelled. If that is the case, this attribute allows that object to be identified. We assume a list of such objects may be provided through some means, embodied by the IdentifiedObject data type.
Ex: Galaxy, Antennae, M31.
'
,  null
,  'TBD'
,  'SimDM:/resource/TargetObjectType.identityName'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'TargetObjectType'
,  'Represents a concept in a SKOS vocabulary of astronomical and astrophysical object types.'
,  null
,  'TBD'
,  'SimDM:/resource/TargetObjectType.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'TargetProcess'
,  'view'
,  'This class represents the fact that some simulations are run with the goal (Target) to investigate physical processes, rather than simulation specific objects or systems. Instances of this class can be used to describe this. For example one may study "turbulence", or "gravitational cluster" or "galaxy formation".'
,  'SimDM:/resource/TargetProcess'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'TargetProcess'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'TargetProcess'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'TargetProcess'
,  'The name of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.name'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'TargetProcess'
,  'Short description of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'TargetProcess'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/Target.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'TargetProcess_container'
,  'TargetProcess'
,  ''
,  'SimDM:/resource/Target.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'TargetProcess_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'TargetProcess'
,  'A term from the AstroJournalSubjectKeywords ontology.'
,  null
,  'TBD'
,  'SimDM:/resource/TargetProcess.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Simulation'
,  'view'
,  'This class represents the execution of simulation codes. Its protocol is therefore a SimDM/Simulator iso a general SimDM/Protocol. It extends SimDM/Experiment by adding descriptions of the physical processes that were simulated'
,  'SimDM:/resource/experiment/Simulation'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Simulation'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Simulation'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Simulation'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Simulation'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'Simulation'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'Simulation'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'Simulation'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'Simulation'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'executionTime'
,  'Simulation'
,  'The date/time at which the experiment was completed'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/Experiment.executionTime'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'protocolId'
,  'Simulation'
,  'Reference to the Protocol used in the exeuciton of this Experiment. 
Subclasses of this Experiment will in general override/"subset" this reference to subclasses of Protocol.
[This column is part of the foreign key Simulation_protocol pointing to the object in Protocol].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Simulation_protocol'
,  'Simulation'
,  'Protocol'
,  'SimDM:/resource/experiment/Experiment.protocol'
,  'Reference to the Protocol used in the exeuciton of this Experiment. 
Subclasses of this Experiment will in general override/"subset" this reference to subclasses of Protocol.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Simulation_protocol'
,  'protocolId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'StatisticalSummary'
,  'view'
,  'This class allows users to provide a statistical characterisation of a collection of objects in a specified SimDM/OutputDataset. It represents both ''a priori'' and ''a posteriori'' characterisations. With a priori characterisation we indicate possible and/or nominal [?] values the variable may take, it defines the possible range of values of the SimDM/Property. In contrast, an a posteriori characterisation of a property in an collection provides summarising, likely statistical, information on the values that were actually measured (i.e. observed, simulated) by the objects in the collection.
The a priori characterisation is most similar, in fact a generalisation of the Characterisation model of the IVOA Data Model working group. 
 
In the current model we stick to simple (numerical) quantities for characterising a collection of objects. For example the equivalent value of a support from the CharacterisationDM is absent, as it is not terribly useful for discovery and querying, even more so of course for concepts equivalent to sensitivity. '
,  'SimDM:/resource/experiment/StatisticalSummary'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'StatisticalSummary'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/StatisticalSummary.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'StatisticalSummary'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'StatisticalSummary'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/StatisticalSummary.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'StatisticalSummary_container'
,  'StatisticalSummary'
,  ''
,  'SimDM:/resource/experiment/StatisticalSummary.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'StatisticalSummary_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'statistic'
,  'StatisticalSummary'
,  'This attribute indicates which statistic is used to statistically summarise the referenced SimDM/ObjectType''s SimDM/Property.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/StatisticalSummary.statistic'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'aPriori'
,  'StatisticalSummary'
,  'If ''true'', this attribute indicates that the statistical characterisation of a SimDM/Propertyis aPriori. That is it indicates that the value says something about what the publisher believes are the possible values the SimDM/Property can assume. An "p priori" characterisation is therefore a translation of the effects that the input configuration (SimDM/ParameterSetting, SimDM/InputDataset), the  "provenance-of-the-actual-experiment" therefore) is EXPECTED to have on the final result, represented by the SimDM/OutputDataset-s and the SimDM/Property-s of their constituent objects.

Alternatively, if the value is "false", it indicates that the statistical charecterisation is ''a posteriori'', i.e. it says something about the actual values that were assumed. This requires in general some level of post processing beyond simply storing the result, but in general using simple statistics such as mean and standard deviation that are not modelled as a separate SimDM/Experiment.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/StatisticalSummary.aPriori'
,  'BOOLEAN'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'numericValue_value'
,  'StatisticalSummary'
,  'The numerical value for this quantity.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/StatisticalSummary.numericValue.value'
,  'DOUBLE'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'numericValue_unit'
,  'StatisticalSummary'
,  'The unit (if applicable) for this quantity. Should correspond to a recognised unit, possibly a skosconcept?'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/StatisticalSummary.numericValue.unit'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'stringValue'
,  'StatisticalSummary'
,  'In case a string-typed property is summarised this attribute should be used to give the value. This would likely be applicable to a restricted set of statistics such as nominal value.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/StatisticalSummary.stringValue'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'axisId'
,  'StatisticalSummary'
,  'The SimDM/Property of the SimDM/ObjectType that is being characterised.
In the IVOA DM''s characterisation model this is represented by specified objects, such as spatialaxis, timeaxis etc. Here we do not know in advance which kind of property is characterised, hence this explicit reference.
[This column is part of the foreign key StatisticalSummary_axis pointing to the object in Property].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'StatisticalSummary_axis'
,  'StatisticalSummary'
,  'Property'
,  'SimDM:/resource/experiment/StatisticalSummary.axis'
,  'The SimDM/Property of the SimDM/ObjectType that is being characterised.
In the IVOA DM''s characterisation model this is represented by specified objects, such as spatialaxis, timeaxis etc. Here we do not know in advance which kind of property is characterised, hence this explicit reference.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'StatisticalSummary_axis'
,  'axisId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'OutputDataset'
,  'view'
,  'This class represents 1 or more instances of a single SimDM/OutputDataObjectType-s produced by an SimDM/Experiment. 
No assumption is made how a SimDM/OutputDataset is represented in the real world. It may consist of one or multiple files, or possibly one or more tables in a database, or subsets thereof. The exact storage is not currently modelled.
The class represents an actual collection of objects without (necessarily) listing these all. Instead it is to be used to allow statistical summaries/characterisation of these products.
A special feature is that a SimDM/OutputDataset may define a dependency on another, ''parent'' data set. This reflects to possibility in the SimDM/Protocol to model relationships between different SimDM/OutputDataObjectType-s. 
This is implemented using two references, one to the parent SimDM/OutputDataset, the other to the SimDM/Relationship.'
,  'SimDM:/resource/experiment/OutputDataset'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'OutputDataset'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/OutputDataset.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'OutputDataset'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'OutputDataset'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/OutputDataset.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'OutputDataset_container'
,  'OutputDataset'
,  ''
,  'SimDM:/resource/experiment/OutputDataset.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'OutputDataset_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'numberOfObjects'
,  'OutputDataset'
,  'Gives the number of objects in this SimDM/OutputDataset'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/OutputDataset.numberOfObjects'
,  'INTEGER'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'accessURL'
,  'OutputDataset'
,  'Represents an optional reference to a URL from which the SimDM/OutputDataset can be obtained. No statement is made on whether this should represent a simple file for download, or a link to a web page with information how to obtain it.
'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/OutputDataset.accessURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'objectTypeId'
,  'OutputDataset'
,  'This reference to SimDM/DataObjectType indicates the type of data object stored in this collection.
[This column is part of the foreign key OutputDataset_objectType pointing to the object in ObjectType].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'OutputDataset_objectType'
,  'OutputDataset'
,  'ObjectType'
,  'SimDM:/resource/experiment/OutputDataset.objectType'
,  'This reference to SimDM/DataObjectType indicates the type of data object stored in this collection.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'OutputDataset_objectType'
,  'objectTypeId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Experiment'
,  'view'
,  'The SimDM/Experiment represents the execution of a computer program represented by a SimDM/Protocol. It defines how the program was run by providing values to parameters for example. It describes the goal of the experiment in terms of the physical objects and processes that are being simulated and it contains the collection of results.'
,  'SimDM:/resource/experiment/Experiment'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Experiment'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Experiment'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Experiment'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Experiment'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'Experiment'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'Experiment'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'Experiment'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'Experiment'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'executionTime'
,  'Experiment'
,  'The date/time at which the experiment was completed'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/Experiment.executionTime'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'protocolId'
,  'Experiment'
,  'Reference to the Protocol used in the exeuciton of this Experiment. 
Subclasses of this Experiment will in general override/"subset" this reference to subclasses of Protocol.
[This column is part of the foreign key Experiment_protocol pointing to the object in Protocol].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Experiment_protocol'
,  'Experiment'
,  'Protocol'
,  'SimDM:/resource/experiment/Experiment.protocol'
,  'Reference to the Protocol used in the exeuciton of this Experiment. 
Subclasses of this Experiment will in general override/"subset" this reference to subclasses of Protocol.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Experiment_protocol'
,  'protocolId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'PostProcessing'
,  'view'
,  'Represents an experiment that corresponds to the execution of a PostProcessor protocol. It  manipulates a pre-existing result to produce new results, but without introducing new physics.'
,  'SimDM:/resource/experiment/PostProcessing'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'PostProcessing'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'PostProcessing'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'PostProcessing'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'PostProcessing'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'PostProcessing'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'PostProcessing'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'PostProcessing'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'PostProcessing'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'executionTime'
,  'PostProcessing'
,  'The date/time at which the experiment was completed'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/Experiment.executionTime'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'protocolId'
,  'PostProcessing'
,  'Reference to the Protocol used in the exeuciton of this Experiment. 
Subclasses of this Experiment will in general override/"subset" this reference to subclasses of Protocol.
[This column is part of the foreign key PostProcessing_protocol pointing to the object in Protocol].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'PostProcessing_protocol'
,  'PostProcessing'
,  'Protocol'
,  'SimDM:/resource/experiment/Experiment.protocol'
,  'Reference to the Protocol used in the exeuciton of this Experiment. 
Subclasses of this Experiment will in general override/"subset" this reference to subclasses of Protocol.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'PostProcessing_protocol'
,  'protocolId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'primaryExperimentId'
,  'PostProcessing'
,  'The primary experiment whose results are being post-processed by this PostProcessing step. Simplifies looking up the original experiments, but is in principle redundant with the inputData.
[This column is part of the foreign key PostProcessing_primaryExperiment pointing to the object in Experiment].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'PostProcessing_primaryExperiment'
,  'PostProcessing'
,  'Experiment'
,  'SimDM:/resource/experiment/PostProcessing.primaryExperiment'
,  'The primary experiment whose results are being post-processed by this PostProcessing step. Simplifies looking up the original experiments, but is in principle redundant with the inputData.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'PostProcessing_primaryExperiment'
,  'primaryExperimentId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'InputDataset'
,  'view'
,  'Many experiments require pre-existing data sets for their execution.
This class represents such an association for its parent SimDM/Experiment. 
It is assumed to contain 1 or more objects of a specified SimDM/InputDataObjectType defined on the SimDM/Protocol used by the container SimDM/Experiment.
In those cases where the actual input data set is represented by a SimDM/OutputDataset, for example in a SimDB, we can represent the input data by a corresponding reference.  Whereas that would be optimal, it may not always be practical. In cases where this is not so, this reference is replaced with an accessURL attribute on this class. This would allow a user to find out whether a product exists in the database with that same url, make the link indirect but arguably more correct. 
 '
,  'SimDM:/resource/experiment/InputDataset'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'InputDataset'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/InputDataset.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'InputDataset'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'InputDataset'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/InputDataset.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputDataset_container'
,  'InputDataset'
,  ''
,  'SimDM:/resource/experiment/InputDataset.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputDataset_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'InputDataset'
,  'Describes the role that the input data set plays in the experiment.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/InputDataset.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'url'
,  'InputDataset'
,  'URL by which the input data set can be obtained.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/InputDataset.url'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'productId'
,  'InputDataset'
,  'The SimDM/OutputDataset produced by an earlier SimDM/Experiment that is used as input data for the current one.
[This column is part of the foreign key InputDataset_product pointing to the object in OutputDataset].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputDataset_product'
,  'InputDataset'
,  'OutputDataset'
,  'SimDM:/resource/experiment/InputDataset.product'
,  'The SimDM/OutputDataset produced by an earlier SimDM/Experiment that is used as input data for the current one.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputDataset_product'
,  'productId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'typeId'
,  'InputDataset'
,  'Reference to the type definition for this SimDM/InputDataset. This must refer to a SimDM/InputDataObjectType defined on the SimDM/Protocol according to which the SimDM/Experiment is performed.
[This column is part of the foreign key InputDataset_type pointing to the object in InputDataObjectType].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputDataset_type'
,  'InputDataset'
,  'InputDataObjectType'
,  'SimDM:/resource/experiment/InputDataset.type'
,  'Reference to the type definition for this SimDM/InputDataset. This must refer to a SimDM/InputDataObjectType defined on the SimDM/Protocol according to which the SimDM/Experiment is performed.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputDataset_type'
,  'typeId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ParameterSetting'
,  'view'
,  'To run an Experiment, one usually needs to assign values to parameters defined on the corresponding Protocol. This class makes the association between the Experiment and the parameters, indicating which parameter is given what value. 

Input parameters can be given any datatype from the DataType enumeration and hence it is in principle impossible to assign a single datatype to the value attribute storing the parameter setting in this model. Whereas we might use a generic string data type, this will in many implementations limit the use of query expressions that one might use for numerical values for example. 

As a work around the current design has two attributes, one of type real, one of type string. The former should be used for numerical InputParanmeters, the latter for all others.'
,  'SimDM:/resource/experiment/ParameterSetting'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ParameterSetting'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ParameterSetting.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ParameterSetting'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'ParameterSetting'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ParameterSetting.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ParameterSetting_container'
,  'ParameterSetting'
,  ''
,  'SimDM:/resource/experiment/ParameterSetting.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ParameterSetting_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'stringValue'
,  'ParameterSetting'
,  'Attribute that holds on to the actual parameter value in case the referenced input parameter is not a numerical type.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ParameterSetting.stringValue'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'numericValue_value'
,  'ParameterSetting'
,  'The numerical value for this quantity.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ParameterSetting.numericValue.value'
,  'DOUBLE'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'numericValue_unit'
,  'ParameterSetting'
,  'The unit (if applicable) for this quantity. Should correspond to a recognised unit, possibly a skosconcept?'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ParameterSetting.numericValue.unit'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'inputParameterId'
,  'ParameterSetting'
,  'Reference to the actual input parameter whose value is being set.
[This column is part of the foreign key ParameterSetting_inputParameter pointing to the object in InputParameter].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ParameterSetting_inputParameter'
,  'ParameterSetting'
,  'InputParameter'
,  'SimDM:/resource/experiment/ParameterSetting.inputParameter'
,  'Reference to the actual input parameter whose value is being set.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ParameterSetting_inputParameter'
,  'inputParameterId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'AppliedPhysics'
,  'view'
,  'The AppliedPhysics class represents the association between a physical process on a Simulator and this class'' parent Simulation. 
Many simulation codes allow one to turn on or off modules corresponding to  different physics. For example certain SPH codes allow one to turn off the hydrodynamics, leaving only gravity as the physical process being simulated.'
,  'SimDM:/resource/experiment/AppliedPhysics'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'AppliedPhysics'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/AppliedPhysics.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'AppliedPhysics'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'AppliedPhysics'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/AppliedPhysics.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'AppliedPhysics_container'
,  'AppliedPhysics'
,  ''
,  'SimDM:/resource/experiment/AppliedPhysics.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'AppliedPhysics_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'physicsId'
,  'AppliedPhysics'
,  'Reference to the Simulator''s Physcis module that is used in the Simulation.
[This column is part of the foreign key AppliedPhysics_physics pointing to the object in Physics].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'AppliedPhysics_physics'
,  'AppliedPhysics'
,  'Physics'
,  'SimDM:/resource/experiment/AppliedPhysics.physics'
,  'Reference to the Simulator''s Physcis module that is used in the Simulation.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'AppliedPhysics_physics'
,  'physicsId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'AppliedAlgorithm'
,  'view'
,  'The AppliedAlgorithm class represents the application of a particular algorithm in an experiment.
Some simulation codes allow one to choose between different algorithms for representing a particular process. For example some N-Body codes allow one to choose between Tree-only or Tree+ParticleMesh codes. 
To indicate which algorithms were actually used in an experiment one adds an instance of this AppliedAlgorithm class to the collection on the experiment.'
,  'SimDM:/resource/experiment/AppliedAlgorithm'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'AppliedAlgorithm'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/AppliedAlgorithm.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'AppliedAlgorithm'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'AppliedAlgorithm'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/AppliedAlgorithm.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'AppliedAlgorithm_container'
,  'AppliedAlgorithm'
,  ''
,  'SimDM:/resource/experiment/AppliedAlgorithm.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'AppliedAlgorithm_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'algorithmId'
,  'AppliedAlgorithm'
,  'Reference to the actual algorithm that is applied
[This column is part of the foreign key AppliedAlgorithm_algorithm pointing to the object in Algorithm].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'AppliedAlgorithm_algorithm'
,  'AppliedAlgorithm'
,  'Algorithm'
,  'SimDM:/resource/experiment/AppliedAlgorithm.algorithm'
,  'Reference to the actual algorithm that is applied');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'AppliedAlgorithm_algorithm'
,  'algorithmId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'DataObject'
,  'view'
,  'Represents an individual object of a given object type produced by an experiment. Is required if we want to represent object-object collection hierarchies. NB the name DataObject is used iso Object, as the latter may lead to name clashes in serialisations.

In this model any artefact produced by a Protocol can be represented by an appropriate ObjectType and relations can exist between them. Some of these relations are many-to-one, i.e. between object collections and parent ojects. If such relations must also be represented in the output of an Experiment, it must be possible to represent individual objects.

A typical example is a cosmological simulation produccing N > 1 snapshots. We may want to represent each individual snapshot in the result, together with statistical information about the collections of particles contained in each.

The object can give values to properties related to objects of its type.

In principlpe this model now would allow one to describe an experiment in all details, with each individual object listed. This is as should be for a conceptual model, but in particular applications we envision that limits be put on the size of results. For example it does not make sense to store the complete results of a large cosmolgical simulation in this way, as the storage of property values is inefficient. 
'
,  'SimDM:/resource/experiment/DataObject'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'DataObject'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/DataObject.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'DataObject'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'DataObject'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/DataObject.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'DataObject_container'
,  'DataObject'
,  ''
,  'SimDM:/resource/experiment/DataObject.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'DataObject_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'InputDataObject'
,  'view'
,  'Associates an individual Object to an InputDataSet.
Thus if for example only 3 individual snapshots out of a collection of N snapshots produced by a cosmological simulation are post-processed, the actual snapshots used can be indicated using this associative object.'
,  'SimDM:/resource/experiment/InputDataObject'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'InputDataObject'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/InputDataObject.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'InputDataObject'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'InputDataObject'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/InputDataObject.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputDataObject_container'
,  'InputDataObject'
,  ''
,  'SimDM:/resource/experiment/InputDataObject.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputDataObject_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'objectId'
,  'InputDataObject'
,  'Reference to an actual object that is being used in an experiment.
[This column is part of the foreign key InputDataObject_object pointing to the object in DataObject].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputDataObject_object'
,  'InputDataObject'
,  'DataObject'
,  'SimDM:/resource/experiment/InputDataObject.object'
,  'Reference to an actual object that is being used in an experiment.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputDataObject_object'
,  'objectId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'PropertyValue'
,  'view'
,  'Assign a value to a property of a data object.'
,  'SimDM:/resource/experiment/PropertyValue'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'PropertyValue'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/PropertyValue.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'PropertyValue'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'PropertyValue'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/PropertyValue.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'PropertyValue_container'
,  'PropertyValue'
,  ''
,  'SimDM:/resource/experiment/PropertyValue.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'PropertyValue_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'stringValue'
,  'PropertyValue'
,  'If the Property to which this value is assigned is not numeric, this attribute should be used to represent the value.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/PropertyValue.stringValue'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'numericValue_value'
,  'PropertyValue'
,  'The numerical value for this quantity.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/PropertyValue.numericValue.value'
,  'DOUBLE'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'numericValue_unit'
,  'PropertyValue'
,  'The unit (if applicable) for this quantity. Should correspond to a recognised unit, possibly a skosconcept?'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/PropertyValue.numericValue.unit'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'propertyId'
,  'PropertyValue'
,  'The property to which the value is assigned.
[This column is part of the foreign key PropertyValue_property pointing to the object in Property].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'PropertyValue_property'
,  'PropertyValue'
,  'Property'
,  'SimDM:/resource/experiment/PropertyValue.property'
,  'The property to which the value is assigned.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'PropertyValue_property'
,  'propertyId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ObjectCollection'
,  'view'
,  'Instance of a composition Relationship between an ObjectType and a collection of objects. '
,  'SimDM:/resource/experiment/ObjectCollection'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ObjectCollection'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ObjectCollection.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ObjectCollection'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'ObjectCollection'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ObjectCollection.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ObjectCollection_container'
,  'ObjectCollection'
,  ''
,  'SimDM:/resource/experiment/ObjectCollection.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ObjectCollection_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'collectionId'
,  'ObjectCollection'
,  '
					TODO : Missing description : please, update your UML model asap.
				
[This column is part of the foreign key ObjectCollection_collection pointing to the object in OutputDataset].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ObjectCollection_collection'
,  'ObjectCollection'
,  'OutputDataset'
,  'SimDM:/resource/experiment/ObjectCollection.collection'
,  '
					TODO : Missing description : please, update your UML model asap.
				');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ObjectCollection_collection'
,  'collectionId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'collectionDefinitionId'
,  'ObjectCollection'
,  'reference to the relationship definition on the ObjectType that is represented by the ObjectCollection. The referenced Relationship MUST have relationshipType=''composition''.
[This column is part of the foreign key ObjectCollection_collectionDefinition pointing to the object in Relationship].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ObjectCollection_collectionDefinition'
,  'ObjectCollection'
,  'Relationship'
,  'SimDM:/resource/experiment/ObjectCollection.collectionDefinition'
,  'reference to the relationship definition on the ObjectType that is represented by the ObjectCollection. The referenced Relationship MUST have relationshipType=''composition''.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ObjectCollection_collectionDefinition'
,  'collectionDefinitionId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ObjectReference'
,  'view'
,  'Instance of a reference Relationship between two ObjectType-s. '
,  'SimDM:/resource/experiment/ObjectReference'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ObjectReference'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ObjectReference.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ObjectReference'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'ObjectReference'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/experiment/ObjectReference.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ObjectReference_container'
,  'ObjectReference'
,  ''
,  'SimDM:/resource/experiment/ObjectReference.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ObjectReference_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'objectId'
,  'ObjectReference'
,  'The object referenced by the ObjectReference''s parent DataObject. 
[This column is part of the foreign key ObjectReference_object pointing to the object in DataObject].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ObjectReference_object'
,  'ObjectReference'
,  'DataObject'
,  'SimDM:/resource/experiment/ObjectReference.object'
,  'The object referenced by the ObjectReference''s parent DataObject. ');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ObjectReference_object'
,  'objectId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceDefinitionId'
,  'ObjectReference'
,  'Reference to the relationship definition on the ObjectType that is represented by the ObjectReference. The referenced Relationship MUST have relationshipType=''reference''.
[This column is part of the foreign key ObjectReference_referenceDefinition pointing to the object in Relationship].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ObjectReference_referenceDefinition'
,  'ObjectReference'
,  'Relationship'
,  'SimDM:/resource/experiment/ObjectReference.referenceDefinition'
,  'Reference to the relationship definition on the ObjectType that is represented by the ObjectReference. The referenced Relationship MUST have relationshipType=''reference''.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ObjectReference_referenceDefinition'
,  'referenceDefinitionId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Physics'
,  'view'
,  'This class represents a physical processes that is modelled in a simulation code.
Simulating a physical process generally corresponds to solving equations of motion numerically, evolving the simulated system from one state to the next.'
,  'SimDM:/resource/protocol/Physics'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Physics'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Physics.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Physics'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'Physics'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Physics.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Physics_container'
,  'Physics'
,  ''
,  'SimDM:/resource/protocol/Physics.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Physics_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Physics'
,  'Name by which this physical process is represented  in the simulator code'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Physics.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Physics'
,  'Short description of the physical process represented by this class.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Physics.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'Physics'
,  'The SKOS concept identifying this process in a standardised SKOS vocabulary.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Physics.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Simulator'
,  'view'
,  'This class represents the simulation software that one uses to run a simulation. It is a special case of a SimDM/Protocol.
It is different from other SimDM/Protocols in that it explicitly defines the physical processes that are (can be) simulated. This indeed is the defining characteristic of the SimDM/Simulator: it simulates/models physical processes. This in contrast to a "mere" SimDM/PostProcessor which takes the input data and analyses it without adding new physics. It does not imply that simulators can not use existing results. For example consider semi-analytical galaxy formation routines which work on existing halo (merger) catalogues. 

'
,  'SimDM:/resource/protocol/Simulator'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Simulator'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Simulator'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Simulator'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Simulator'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'Simulator'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'Simulator'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'Simulator'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'Simulator'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'code'
,  'Simulator'
,  'link where the code can be downloaded, if available
'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Protocol.code'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'version'
,  'Simulator'
,  'the version of the simulator code that was used'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Protocol.version'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Protocol'
,  'view'
,  'A SimDM/Protocol represents software code that can be used to run astrophysical simulations or to post-process simulation results. A SimDM/Protocol defines the method by which SimDM/Experiment-s can be performed, like a blue-print, or template.  The SimDM/Protocol concept is separated out from the execution of its code in SimDM/Experiment, which allows us to reuse it for all experiments using the same code.
The concept is a direct gemeralisation of the concept by the same name in Martin Fowler''s book "Analysis Patterns: Reusable Object Models" (Addison-Wesley Professional, 1996).'
,  'SimDM:/resource/protocol/Protocol'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Protocol'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Protocol'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Protocol'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Protocol'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'Protocol'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'Protocol'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'Protocol'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'Protocol'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'code'
,  'Protocol'
,  'link where the code can be downloaded, if available
'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Protocol.code'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'version'
,  'Protocol'
,  'the version of the simulator code that was used'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Protocol.version'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'PostProcessor'
,  'view'
,  'This concrete subclass of SimDM/Protocol represents protocols that deal with post-processing results of earlier experiments. We do not specify the details of this type much further. Main difference with eg the SimDM/Simulator type is that NO new physical processes are introduced/simulated in the processing of the previous results. Examples are cluster finders, visualisation tools etc. '
,  'SimDM:/resource/protocol/PostProcessor'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'PostProcessor'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'PostProcessor'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'PostProcessor'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'PostProcessor'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'PostProcessor'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'PostProcessor'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'PostProcessor'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'PostProcessor'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'code'
,  'PostProcessor'
,  'link where the code can be downloaded, if available
'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Protocol.code'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'version'
,  'PostProcessor'
,  'the version of the simulator code that was used'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Protocol.version'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ParameterGroup'
,  'view'
,  'Represents a (natural) grouping of SimDM/InputParameters.
Especially in protocols with large numbers of parameters it may be useful to group these
for browsing purposes for example. As browsing is likely an important mode of access to  SimDM/Resource-s stored in a SimDB for example, this possibility was introduced.
But the main use should be reserved for semantic groupings. For example all parameters together defining the cosmology a certain simulation is run in. Or the parameters setting "merely" numerical properties such as smoothing lengths.'
,  'SimDM:/resource/protocol/ParameterGroup'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ParameterGroup'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/ParameterGroup.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ParameterGroup'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'ParameterGroup'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/protocol/ParameterGroup.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ParameterGroup_container'
,  'ParameterGroup'
,  ''
,  'SimDM:/resource/protocol/ParameterGroup.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ParameterGroup_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'ParameterGroup'
,  'Name given to this group.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/ParameterGroup.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'ParameterGroup'
,  'Short description of the purpose of this group.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/ParameterGroup.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ParameterGroupMember'
,  'view'
,  'Associative class, representing a selection of a parameter in a parameter grouping.'
,  'SimDM:/resource/protocol/ParameterGroupMember'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ParameterGroupMember'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/ParameterGroupMember.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ParameterGroupMember'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'ParameterGroupMember'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/protocol/ParameterGroupMember.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ParameterGroupMember_container'
,  'ParameterGroupMember'
,  ''
,  'SimDM:/resource/protocol/ParameterGroupMember.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ParameterGroupMember_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'parameterId'
,  'ParameterGroupMember'
,  'Reference to the selected input parameter.
[This column is part of the foreign key ParameterGroupMember_parameter pointing to the object in InputParameter].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ParameterGroupMember_parameter'
,  'ParameterGroupMember'
,  'InputParameter'
,  'SimDM:/resource/protocol/ParameterGroupMember.parameter'
,  'Reference to the selected input parameter.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ParameterGroupMember_parameter'
,  'parameterId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'OutputDataObjectType'
,  'view'
,  'This class represents the type of data object that the container SimDM/Protocol can produce. 
This concept includes any type of data object the protocol deals with.
It can range from the smallest data units such as individual N-Body particles or pixels in a synthetic spectrum, up to the largest which may be a collection of snapshots in an N-body simulation ,each of them containing collections of particles.
It defines also the actual SimDM/OutputDataset-s that a SimDM/Experiment''s has produced. 
Since a SimDM/OutputDataObjectType is-a SimDM/ObjectType, it can be related to other objects using SimDM/Relationship-s.
 In this way a hierarchy of data types can be described.
For example a spectrum can be a such a data object and will be composed of pixels. A FOF group catalogue will be composed of FOF groups which are aggregations of particles. '
,  'SimDM:/resource/protocol/OutputDataObjectType'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'OutputDataObjectType'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'OutputDataObjectType'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'OutputDataObjectType'
,  'The name of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.name'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'OutputDataObjectType'
,  'Short description of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'OutputDataObjectType'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/protocol/OutputDataObjectType.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'OutputDataObjectType_container'
,  'OutputDataObjectType'
,  ''
,  'SimDM:/resource/protocol/OutputDataObjectType.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'OutputDataObjectType_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'OutputDataObjectType'
,  'Name that this type of particle is given in an appropriate SKOS vocabulary.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/OutputDataObjectType.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'InputParameter'
,  'view'
,  'This class represent an input parameter on a protocol.
In general,a simulation codes needs the user to set values to parameters that govern the running of the code. These may be parameters describing the physics in a simulation, or they may be numerical parameters governing the approximation of the process by a particular algorithm. '
,  'SimDM:/resource/protocol/InputParameter'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'InputParameter'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/Field.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'InputParameter'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'InputParameter'
,  'the name of this parameter or property.
Ex: omegaLambda, particleMass, linking length
'
,  null
,  'TBD'
,  'SimDM:/object/Field.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'datatype'
,  'InputParameter'
,  'the data type of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.datatype'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'cardinality'
,  'InputParameter'
,  'The cardinality of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.cardinality'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'InputParameter'
,  'Short description of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'isEnumerated'
,  'InputParameter'
,  'indicates if this parameter or property only accept values coming from a list of valid values defined by the validValue collection'
,  null
,  'TBD'
,  'SimDM:/object/Field.isEnumerated'
,  'BOOLEAN'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'InputParameter'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/protocol/InputParameter.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputParameter_container'
,  'InputParameter'
,  ''
,  'SimDM:/resource/protocol/InputParameter.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputParameter_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'InputParameter'
,  'A label to be given to this input parameter from an appropriate SKOS vocabulary.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/InputParameter.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Algorithm'
,  'view'
,  'This class represents numerical algorithms available in a SimDM/Protocol. 
In Simulators an algorithm may approximate a physical process. Examples from cosmological simulations are different algorithms to implement gravity: direct particle-particle interaction, particle-mesh, or various types of tree based algorithms.
In post-processors such as cluster finder this class can represent a partiular cluster definition such as friends-of-friends or spherical overdensity.
'
,  'SimDM:/resource/protocol/Algorithm'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Algorithm'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Algorithm.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Algorithm'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'Algorithm'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Algorithm.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Algorithm_container'
,  'Algorithm'
,  ''
,  'SimDM:/resource/protocol/Algorithm.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Algorithm_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Algorithm'
,  'A common name given to this algorithm.
'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Algorithm.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Algorithm'
,  'Short description of this algorithm.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Algorithm.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'Algorithm'
,  'Short name by which this algorithm is known in the SKOS vocabulary of numerical algorithms.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/Algorithm.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'InputDataObjectType'
,  'view'
,  'Type of data objects that the protocol needs in its execution.'
,  'SimDM:/resource/protocol/InputDataObjectType'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'InputDataObjectType'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'InputDataObjectType'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'InputDataObjectType'
,  'The name of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.name'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'InputDataObjectType'
,  'Short description of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'InputDataObjectType'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/protocol/InputDataObjectType.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputDataObjectType_container'
,  'InputDataObjectType'
,  ''
,  'SimDM:/resource/protocol/InputDataObjectType.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputDataObjectType_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'InputDataObjectType'
,  'Label indicating the type of data object represented by this InputDataObjectType through reference to a SKOS concept.'
,  null
,  'TBD'
,  'SimDM:/resource/protocol/InputDataObjectType.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'definitionId'
,  'InputDataObjectType'
,  'If not null, this reference provides the definition of the input data object type as being a predefined SimDM/OutputDataObjectType of another SimDM/Protocol.
It''s implication is that the current SimDm/Protocol requires the results of another SimDM/Protocol for its execution.
If this reference is null the input data object type must be defined using the properties inherited from the base object type.
[This column is part of the foreign key InputDataObjectType_definition pointing to the object in OutputDataObjectType].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'InputDataObjectType_definition'
,  'InputDataObjectType'
,  'OutputDataObjectType'
,  'SimDM:/resource/protocol/InputDataObjectType.definition'
,  'If not null, this reference provides the definition of the input data object type as being a predefined SimDM/OutputDataObjectType of another SimDM/Protocol.
It''s implication is that the current SimDm/Protocol requires the results of another SimDM/Protocol for its execution.
If this reference is null the input data object type must be defined using the properties inherited from the base object type.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'InputDataObjectType_definition'
,  'definitionId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Service'
,  'view'
,  'This class represents a web service that can be used to access SimDM/Resource-s registered in for example a SimDB. The precise way in which the web service gives access to these results not specified in detail. It includes simple downloads, and services implementing standards such as SimDAL. 
SimDM/Service is related to SimDM/Resource and can be used for more general purposes than simply giving access to results of a single experiment. It may be a web service that can handle results of any experiment performed by a particular SimDM/Protocol, or give access to all resources in a SimDM/Project.

The main goal of introducing SimDM/Service in the model is so that users can find web services based on requests for specific tyes of simulations etc. For example users may wish to find web services giving access to hydro simulations of clusters of galaxies with particular properties.
.
It is assumed that web services registerd in a SimDB are also registered in a Registry which will store the more detailed capbilitieis and other service metadata. Therefore such details are not introduced here.'
,  'SimDM:/resource/dal/Service'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Service'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Service'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Service'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Service'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'Service'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'Service'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'Service'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'Service'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'baseURL'
,  'Service'
,  'The base URL of this SimDM/Service.
In case the web service implements a standard IVOA protocol such as SimDAL, this base URL can be used in the same way as other typical IVOA S*AP services. Parameters defined by the standard  may be added to the base URL so that a proper HTTP GET request can be created for accessing the web service directly.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/Service.baseURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'registryId'
,  'Service'
,  'The IVO identifier by which this service is registered in an IVOA Resource Registry. Each SimDM/Service should be registered in such a registry and this identifier allows one to obtain the full description of this service as defined by the Registry standard.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/Service.registryId'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'AccessibleResource'
,  'view'
,  'The AccessibleResource class represents an association between the containing SimDM/Service and the SimDM/Resource-s that are being made accessible by that  service.'
,  'SimDM:/resource/dal/AccessibleResource'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'AccessibleResource'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/AccessibleResource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'AccessibleResource'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'AccessibleResource'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/resource/dal/AccessibleResource.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'AccessibleResource_container'
,  'AccessibleResource'
,  ''
,  'SimDM:/resource/dal/AccessibleResource.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'AccessibleResource_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'AccessibleResource'
,  'Description of how the particular SimDM/Resource referenced by this object is made available by the parent SimDM/Service.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/AccessibleResource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'accessURI'
,  'AccessibleResource'
,  'Direct URI for accessing the referenced SimDM/Resource using the parent service.
The parent service has a baseURL through which one can access the service interface. From there one may be able to browse through all SimDM/Resource-s that are made available, but a specific (data access) protocol to reach a given SimDM/Resource or how to browse these SimDM/Resource-s is not defined by this model. IF it is possible to access the SimDM/Resource directly through the SimDM/Service, for example to download or browse its contents, this attribute gives the corresponding URI.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/AccessibleResource.accessURI'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'resourceId'
,  'AccessibleResource'
,  'This reference points to the SimDM/Resource that this SimDM/AccessibleResource class associates to the SimDM/Service. The end point can be any SimDM/Resource.
[This column is part of the foreign key AccessibleResource_resource pointing to the object in Resource].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'AccessibleResource_resource'
,  'AccessibleResource'
,  'Resource'
,  'SimDM:/resource/dal/AccessibleResource.resource'
,  'This reference points to the SimDM/Resource that this SimDM/AccessibleResource class associates to the SimDM/Service. The end point can be any SimDM/Resource.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'AccessibleResource_resource'
,  'resourceId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'SimDALService'
,  'view'
,  'Represents a SimDM/Service conforming to a SimDAL protocol.
This is a place holder class that may in future version of the model be defined in more detail when SimDAL services themselves have been fully specified.'
,  'SimDM:/resource/dal/SimDALService'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'SimDALService'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'SimDALService'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'SimDALService'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'SimDALService'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'SimDALService'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'SimDALService'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'SimDALService'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'SimDALService'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'baseURL'
,  'SimDALService'
,  'The base URL of this SimDM/Service.
In case the web service implements a standard IVOA protocol such as SimDAL, this base URL can be used in the same way as other typical IVOA S*AP services. Parameters defined by the standard  may be added to the base URL so that a proper HTTP GET request can be created for accessing the web service directly.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/Service.baseURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'registryId'
,  'SimDALService'
,  'The IVO identifier by which this service is registered in an IVOA Resource Registry. Each SimDM/Service should be registered in such a registry and this identifier allows one to obtain the full description of this service as defined by the Registry standard.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/Service.registryId'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'CustomService'
,  'view'
,  'The CustomService class represents a custom SimDM/Service for accessing SimDM/Resource-s. It is not assumed that a predefined protocol is implemented. Its main role is to distinnguish it from SimDAL and other services implementing potential, future IVOA standards. 
But many interesting custom services giving access to simulation results exist and can be reistered and discovered through this class.'
,  'SimDM:/resource/dal/CustomService'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'CustomService'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'CustomService'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'CustomService'
,  'For Protocol :
The name by which this simulator is commonly known. 
Ex: Gadget, Flash

For Project :
the name of the project

For Experiment :
the name of this experiment
'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'CustomService'
,  'A description of this resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'referenceURL'
,  'CustomService'
,  'a URL to a web page describing the resource.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.referenceURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'created'
,  'CustomService'
,  'The UTC date and time this resource was created in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.created'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'updated'
,  'CustomService'
,  'The UTC date and time this resource was updated in the real world.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.updated'
,  'TIMESTAMP'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'status'
,  'CustomService'
,  'a tag indicating whether this resource is believed to be still actively maintained.'
,  null
,  'TBD'
,  'SimDM:/resource/Resource.status'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'baseURL'
,  'CustomService'
,  'The base URL of this SimDM/Service.
In case the web service implements a standard IVOA protocol such as SimDAL, this base URL can be used in the same way as other typical IVOA S*AP services. Parameters defined by the standard  may be added to the base URL so that a proper HTTP GET request can be created for accessing the web service directly.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/Service.baseURL'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'registryId'
,  'CustomService'
,  'The IVO identifier by which this service is registered in an IVOA Resource Registry. Each SimDM/Service should be registered in such a registry and this identifier allows one to obtain the full description of this service as defined by the Registry standard.'
,  null
,  'TBD'
,  'SimDM:/resource/dal/Service.registryId'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Relationship'
,  'view'
,  'This class assists in the definition of an object hierarchy by associating different objects. The type of relationship is borrowed loosely from UML, and can represent a composition, aggregation or reference, as defined by the relationshipType attribute.
An example is the composition relationship between a image and its pixels, or the aggregation of a FOF group and its constituent particles. '
,  'SimDM:/object/Relationship'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Relationship'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/Relationship.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Relationship'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'Relationship'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/object/Relationship.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Relationship_container'
,  'Relationship'
,  ''
,  'SimDM:/object/Relationship.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Relationship_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Relationship'
,  'Name of the variable representing the relationship on the containing parent object type.'
,  null
,  'TBD'
,  'SimDM:/object/Relationship.name'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Relationship'
,  'Describes the relation between the parent and child object type.'
,  null
,  'TBD'
,  'SimDM:/object/Relationship.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'relationshipType'
,  'Relationship'
,  'This attributes indicates the type of relaion between the parent and the related object.'
,  null
,  'TBD'
,  'SimDM:/object/Relationship.relationshipType'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'cardinality'
,  'Relationship'
,  'The cardinality/multiplicity of the child object in the containing object.'
,  null
,  'TBD'
,  'SimDM:/object/Relationship.cardinality'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'relatedObjectTypeId'
,  'Relationship'
,  'Reference to the ObjectType that is the child in the hierarchical parent-child relation.
[This column is part of the foreign key Relationship_relatedObjectType pointing to the object in ObjectType].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Relationship_relatedObjectType'
,  'Relationship'
,  'ObjectType'
,  'SimDM:/object/Relationship.relatedObjectType'
,  'Reference to the ObjectType that is the child in the hierarchical parent-child relation.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Relationship_relatedObjectType'
,  'relatedObjectTypeId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'PropertyGroupMember'
,  'view'
,  'Assocuiative object that represents a member in a property group.'
,  'SimDM:/object/PropertyGroupMember'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'PropertyGroupMember'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/PropertyGroupMember.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'PropertyGroupMember'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'PropertyGroupMember'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/object/PropertyGroupMember.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'PropertyGroupMember_container'
,  'PropertyGroupMember'
,  ''
,  'SimDM:/object/PropertyGroupMember.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'PropertyGroupMember_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'propertyId'
,  'PropertyGroupMember'
,  'Reference to the actual property this class associates to a property group.
[This column is part of the foreign key PropertyGroupMember_property pointing to the object in Property].'
,  null
,  'TBD'
,  'TBD'
,  'long'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'PropertyGroupMember_property'
,  'PropertyGroupMember'
,  'Property'
,  'SimDM:/object/PropertyGroupMember.property'
,  'Reference to the actual property this class associates to a property group.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'PropertyGroupMember_property'
,  'propertyId'
,  'ID');
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'PropertyGroup'
,  'view'
,  'This class represents a naturla grouping of properties on the object type.
Is used for presentation purposes in a browsing environment.'
,  'SimDM:/object/PropertyGroup'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'PropertyGroup'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/PropertyGroup.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'PropertyGroup'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'PropertyGroup'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/object/PropertyGroup.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'PropertyGroup_container'
,  'PropertyGroup'
,  ''
,  'SimDM:/object/PropertyGroup.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'PropertyGroup_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'PropertyGroup'
,  'Name of this paarameter grouping.'
,  null
,  'TBD'
,  'SimDM:/object/PropertyGroup.name'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'PropertyGroup'
,  'Description of this group.'
,  null
,  'TBD'
,  'SimDM:/object/PropertyGroup.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Property'
,  'view'
,  'The properties of an object. Similar to the FIELD in a VOTable'
,  'SimDM:/object/Property'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Property'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/Field.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Property'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Property'
,  'the name of this parameter or property.
Ex: omegaLambda, particleMass, linking length
'
,  null
,  'TBD'
,  'SimDM:/object/Field.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'datatype'
,  'Property'
,  'the data type of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.datatype'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'cardinality'
,  'Property'
,  'The cardinality of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.cardinality'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Property'
,  'Short description of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'isEnumerated'
,  'Property'
,  'indicates if this parameter or property only accept values coming from a list of valid values defined by the validValue collection'
,  null
,  'TBD'
,  'SimDM:/object/Field.isEnumerated'
,  'BOOLEAN'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'Property'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/object/Property.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'Property_container'
,  'Property'
,  ''
,  'SimDM:/object/Property.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'Property_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'label'
,  'Property'
,  'The concept represented by this property. This concept should be narrower than the broadestSKOSConcept.'
,  null
,  'TBD'
,  'SimDM:/object/Property.label'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ObjectType'
,  'view'
,  'This class represents and abstract object type, and can thus be seen as a meta-modelling construct.
It allows model instances that represent complex object definitions.'
,  'SimDM:/object/ObjectType'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ObjectType'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ObjectType'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'ObjectType'
,  'The name of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.name'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'ObjectType'
,  'Short description of this object type.'
,  null
,  'TBD'
,  'SimDM:/object/ObjectType.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'Field'
,  'view'
,  'Represents a generic field like object.'
,  'SimDM:/object/Field'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'Field'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/Field.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'Field'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'name'
,  'Field'
,  'the name of this parameter or property.
Ex: omegaLambda, particleMass, linking length
'
,  null
,  'TBD'
,  'SimDM:/object/Field.name'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'datatype'
,  'Field'
,  'the data type of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.datatype'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'cardinality'
,  'Field'
,  'The cardinality of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.cardinality'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'Field'
,  'Short description of this parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/Field.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'isEnumerated'
,  'Field'
,  'indicates if this parameter or property only accept values coming from a list of valid values defined by the validValue collection'
,  null
,  'TBD'
,  'SimDM:/object/Field.isEnumerated'
,  'BOOLEAN'
,  1
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.tables(schema_name, table_name,table_type,description,utype) values(
   ''
,  'ValidValue'
,  'view'
,  'This represents a value for an enumerated parameter or property'
,  'SimDM:/object/ValidValue'
);

    INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'ID'
,  'ValidValue'
,  'The unique, primary key column on this table.'
,  null
,  'TBD'
,  'SimDM:/object/ValidValue.ID'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'DTYPE'
,  'ValidValue'
,  'This column stores the name of the object type from the data model stored in the row.'
,  null
,  'TBD'
,  'TBD'
,  'VARCHAR'
,  32
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'containerId'
,  'ValidValue'
,  'This column is a foreign key pointing to the containing object in '
,  null
,  'TBD'
,  'SimDM:/object/ValidValue.CONTAINER'
,  'BIGINT'
,  null
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.keys(key_id,from_table, target_table,utype,description)values(
   'ValidValue_container'
,  'ValidValue'
,  ''
,  'SimDM:/object/ValidValue.CONTAINER'
,  'Foreign key to the container of the table.');
INSERT INTO TAP_SCHEMA.key_columns(key_id,from_column, target_column)values(
   'ValidValue_container'
,  'containerId'
,  'ID');
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'value'
,  'ValidValue'
,  'the value as string : can be converted to the correct datatype of the asociated parameter or property'
,  null
,  'TBD'
,  'SimDM:/object/ValidValue.value'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'description'
,  'ValidValue'
,  'A description of this value.'
,  null
,  'TBD'
,  'SimDM:/object/ValidValue.description'
,  'VARCHAR'
,  NULL
,  1
,  0
,  0
,  -1);
INSERT INTO TAP_SCHEMA.Columns(column_name,table_name,description,unit,ucd,utype,datatype,size,principal,indexed,std,rank) values(
   'title'
,  'ValidValue'
,  'Short name / alias for this value (useful in GUI)'
,  null
,  'TBD'
,  'SimDM:/object/ValidValue.title'
,  'VARCHAR'
,  255
,  1
,  0
,  0
,  -1);
