Comment on page
CREATE DATABASE
CREATE DATABASE database_name;
Similar to other relational databases, a Database is a logical grouping of Schemas in DeltaStream. Databases are the foundation for organizing data in DeltaStream and provide the building block of its namespacing model. Users can create databases for logical groupings for different teams or projects. For instance, you can create a Database for a logging project and another for an ads team.
Name of the Database to create. When a Database is created, it automatically includes a
public
schema in the Database. If the new Database is the only Database in the organization, it will be set as default automatically. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.The following shows how to create a new Database. Note that since we are creating the first Database, it is automatically set as the default for the user account:
<no-db>/demostore# CREATE DATABASE demodb;
demodb.public/demostore# LIST DATABASES;
Name | Default | Owner | Created at | Updated at
---------+---------+----------+----------------------+-----------------------
demodb | ✓ | sysadmin | 2022-08-22T17:01:02Z | 2022-08-22T17:01:02Z
The following shows how to create a new Database. Note that since we are creating the first Database, it is automatically set as the default for the user account:
<no-db>/demostore# CREATE DATABASE "DemoDB!";
demodb.public/demostore# LIST DATABASES;
Name | Default | Owner | Created at | Updated at
----------+---------+----------+----------------------+-----------------------
DemoDB! | ✓ | sysadmin | 2022-08-22T17:01:02Z | 2022-08-22T17:01:02Z
Last modified 1mo ago