Skip to content

MultiSchemaFeaturesIssues

skomlaebri edited this page Feb 24, 2014 · 2 revisions

Multischema

Some databases have "Schemas" which can be used to separate the database into different namespaces. The schema is used as a prefix to the object name. For example, in postgres, the table "animals" in schema "zoo" can be accessed by the identifier "animals.zoo". The prefix is unnecessary when accessing the current / default schema.

  • For Postgres the default schema is "public", but this can be changed by the SQL command "set search_path to -list of schemas-".
  • In Oracle, the default schema has the same name as the logged in user.
  • In MySQL, schema and database are equivalent. The keyword DATABASE or DATABASES can be replaced with SCHEMA or SCHEMAS wherever it appears.
  • In Microsoft SQL Server if no default schema can be determined for a user, the dbo schema will be used.
  • In H2 the default schema is PUBLIC.
  • In DB2 if a schema or qualifier is not specified as part of the name of the object to be created, that object is assigned to the default schema as indicated in the CURRENT SCHEMA special register. The default value of this special register is the value of the session authorisation ID.
In the multischema setting, the table-name (without schema prefix) is no longer unique. Therefore, the whole name, with prefix, is used as identifier internally in ontop. Moreover, to call the jdbc methods, the schema and table name must be separated into two different string arguments.

We do not support multischema when it is asked to obtain the full metadata from the JDBC connection.

Clone this wiki locally