MindsDB allows you to create and manage a variety of entities within its ecosystem. All MindsDB objects follow the same naming conventions to ensure consistency and compatibility across the platform.

MindsDB Entities

The following entities can be created in MindsDB:

General Naming Rules

When creating these entities, the following conventions apply:
  • Case-insensitive names Object names are not sensitive to letter casing. For example:
    CREATE VIEW my_view (...);   -- creates "my_view"
    CREATE VIEW My_View (...);   -- also creates "my_view"
    CREATE VIEW MY_VIEW (...);   -- also creates "my_view"
    
    All names are automatically converted to lowercase.
  • Allowed characters Lowercase letters (a–z) Numbers (0–9) Underscores (_) Example:
    CREATE AGENT my_agent345 (...);   -- creates "my_agent345"
    
  • Special characters If you need special characters or spaces in object names, enclose them in backticks.
    CREATE VIEW `my view` (...);   -- creates “my view”
    CREATE VIEW `my-view!` (...);  -- creates “my-view!”
    
    However, names inside backticks must be lowercase. Using uppercase letters will result in an error because all object names must be in lowercase letters.
    CREATE VIEW `My View` (...);   -- error
    
When working with entities from a data source connected to MindsDB, their original names are preserved and are not subject to MindsDB naming rules.For example, if you connect a Snowflake data source that contains a table named ANALYTICS_101 with a column named Date_Time, you must reference them exactly as they appear in the source, utilizing backticks, as shown below:
SELECT `Date_Time`
FROM snowflake_data.`ANALYTICS_101`;

Backward Compatibility

Older objects created with uppercase letters are still supported for backward compatibility. To reference them, wrap the name in backticks.
SELECT * FROM `MyView`;   -- selects from “MyView”
DROP VIEW `MyView`;   -- deletes “MyView”
You cannot create new objects with uppercase letters. For example:
CREATE VIEW `MyView` (...);   -- error

Examples

Here are some practical examples:
  • Views
CREATE VIEW my_view (...);   -- creates "my_view"
CREATE VIEW My_View (...);   -- also creates "my_view"
CREATE VIEW `my view` (...);   -- creates "my view"
CREATE VIEW `My_View` (...);   -- error
If an older object named My_View exists, you can still use it:
SELECT * FROM `My_View`;   -- selects from “My_View”
DROP VIEW `My_View`;   -- deletes “My_View”
  • Databases
CREATE DATABASE my_database WITH …;   -- creates "my_database"
CREATE DATABASE MY_DATABASE WITH …;   -- also creates "my_database"
CREATE DATABASE `my-database` WITH …;   -- creates "my-database"
CREATE DATABASE `MY_DATABASE` WITH …;   -- error
If an older object named MY_DATABASE exists, you can still use it:
SELECT * FROM `MY_DATABASE`.table_name;   -- selects from “MY_DATABASE”
DROP DATABASE `MY_DATABASE`;   -- deletes “MY_DATABASE”
  • Agents
CREATE AGENT my_agent USING ...;   -- creates "my_agent"
CREATE AGENT My_Agent USING ...;   -- also creates "my_agent"
CREATE AGENT `my agent 1` USING ...;   -- creates "my agent 1"
CREATE AGENT `My agent 1` USING ...;   -- error
If an older object named My agent 1 exists, you can still use it:
SELECT * FROM `My agent 1`;   -- selects from “My agent 1”
DROP AGENT `My agent 1`;   -- deletes “My agent 1”