Skip to content
Managing Databases

Managing Databases in the RAI Console

RelationalAI’s RKGS databases contain Rel code and data. Rel code includes everything you use to build Rel applications that reason about your data, including definitions, reasoning, integrity constraints, and logic models.

You can create, overwrite, and clone databases through the Console.

You can use a database with any available engine. Engines are virtual machines of various sizes that process database transactions.

Using the Databases Page

databases-page

Here’s how to navigate the Databases page:

  1. To access the Databases page, click the Databases icon on the left-hand side of the Console. The Databases page lists all previously created databases associated with your RelationalAI account.

  2. To rearrange databases in ascending or descending alphabetical order, click the arrow next to the Name field.

  3. To select a database, click its name in the list. This will automatically take you to the Editor page, and you will see the name of your selected database in the Databases pop-up menu in a newly created worksheet.

  4. To search or filter databases, type text or values into the Quick Filter field. Quick Filter conducts a search on all columns.

  5. To view the state of your database, see the respective information under State.

  6. To view the region in which your database was created, see the respective information under Region. All RAI databases are set to the US-East region by default.

  7. To view the date and time a database was created, see the respective information under Created On. Note that you can see the full details of when the database was created by holding the pointer over the date. To rearrange databases by the date they were created, click Created On.

  8. To clone an existing database:

    1. Click the Clone icon next to the database you want to clone.

    2. In the window that opens, your clone database is named <your_database>_clone by default. You can change the name. The Clone from field displays the name of your selected database by default. To select a different database, click the up-down arrow and choose a database from the list.

    3. Click Create. The name of your clone database then appears in the list.

    You cannot clone from a database until an engine has executed at least one transaction on that database.

    See Cloning Databases for more ways to clone databases.

  9. To create a new database:

    1. Click + Database in the top right-hand corner.
    2. In the window that opens, give your database a name.
    3. Click Create.

    Note that you can also create databases from the Databases pop-up menu in the Editor. See Selecting a Database in the Working With Worksheets guide.

  10. To access RAI notebooks, click the Notebooks icon.

    Notebooks will soon be deprecated. It’s best to use worksheets to run queries in the Console.

  11. To delete a database:

    1. Click X next to the database you want to delete.
    2. In the Confirmation window that opens, click Delete. The database will disappear from the list.

    See Best Practices Before Deleting a Database for more details.

Database States

Databases can be in one of four states:

StateExplanation
CREATINGDatabase is being created.
CREATEDDatabase has been created and can be used.
CREATION FAILEDAn error occured and the database was not created successfully.
DELETEDDatabase has been deleted and no longer appears in the list.

Cloning Databases

In addition to using the Clone icon mentioned above, you can directly create a new clone database from the Databases as well as the Editor pages. Once you clone a database, the new database functions separately from the original database: Any subsequent changes to either database will not affect the other.

You can also clone a database from the Databases page as follows:

  1. Click + Database in the top right-hand corner and give your clone database a name.
  2. In the Clone from field, click the up-down arrow and choose the database you want to clone.
  3. Click Create. The name of your new clone database appears in the list.

To create a new clone database from the Editor page:

  1. Click the Databases pop-up menu in the Editor.
  2. Click Create Database.
  3. Under Name in the window that opens, give your database a name.
  4. Under Clone from, click the up-down arrow to choose the existing database you want to clone.
  5. Click Create. The new clone database appears in your list of databases in the Databases page.

Best Practices Before Deleting a Database

Before deleting a database, it’s best practice to:

  1. Check with other team members to be sure the database can be safely deleted.
  2. Export any output results of worksheets in the database that you want to have available later, saving them as local CSV or Excel files. For more details, see Exporting Results in the Working With Worksheets guide.
  3. Export any models from the database that you want to have available later, saving them as local .rel files. For more details, see Exporting Models in the Working With Models guide.
🔎

Worksheets, base relations, and models from the deleted database are unrecoverable.

Was this doc helpful?