CREATE DATABASE

CREATE DATABASE#

Creates a virtual database backed by the connection to the system handling physical objects.

Syntax#

CREATE DATABASE database name WITH CONNECTION = connection name SOURCE DATABASE = source database name

Arguments#

database_name

Is the name of the new database. Database names must be unique within an instance of Querona and comply with the rules for identifiers.

connection_name

Is the name of the connection that virtual database will use to import metadata and materialize views if possible.

source_database_name

Is the name of the source database that will be used to import metadata from during database creation.

Examples#

  1. Create an empty virtual database using an existing connection.

CREATE DATABASE [MyDb] WITH CONNECTION = [myConnection];
  1. Create a virtual database using an existing connection and import metadata from existing virtual database.

CREATE DATABASE [MyNewSparkVdb]
  WITH CONNECTION = [Local Spark 3.0]
SOURCE DATABASE = [mysqlConnection]

See also#