Skip to main content

SQL Console (VectorDB)

This article introduces how to use the SQL Console to manage Baidu Cloud Vector Database (VectorDB).

Background Information

With the popularization of AI applications, cloud vector databases VectorDB have become the core infrastructure for processing high-dimensional vector data (such as image, text embeddings). Due to the insufficient support for vector database operations by traditional database management tools and the lack of a unified visualization management interface, a data management tool specifically for vector databases is particularly important.

NineData, as a new generation of cloud-native data management platforms, provides solutions for the following pain points of VectorDB:

  • Operation Complexity: Vector operations need to be performed through CLI or SDK
  • Visualization Absence: Unable to visually view the structure of collections/indexes
  • Permission Scattering: User and role permission management relies on external systems
  • Development Inefficiency: Manually writing JSON parameters, time-consuming debugging

Feature Introduction

For VectorDB databases, NineData's SQL Console covers the full process capabilities from metadata management to advanced vector operations.

Feature
Description
Visual Library Table Object ManagementSupports visual tree access, viewing, and management of VectorDB's libraries, tables, columns, indexes, and other objects.
One-click Request Body GenerationOfficially synchronized VectorDB operation interfaces, supporting 35 operations such as table management, index management, data update, data query, role management, and user management. Selecting automatically generates the corresponding operation's JSON request body sample in the editor.
EditorProvides an editor, after selecting various preset VectorDB operation interfaces, adjust the request body according to needs and execute the operation.
Work Site RecoveryFor scenarios such as unexpected browser exit or sudden crashes, you only need to log in to the NineData console again and open the SQL Console. The previously opened data sources and executed commands will be automatically loaded. Since the page state is saved in the cloud, it is not limited by browsers or hosts, and you can restore the work site anytime, anywhere.

Prerequisites

  • The target database to be managed has been added to NineData. For how to add, please refer to Manage Data Sources.

  • In the organizational mode (DevOps Enterprise), you must have read-only, DML, or DDL permissions for the target data source.

    tip

    Read-only permissions only support query operations.

  • In the commercial versions (DevOps Pro, DevOps Enterprise), please ensure that your monthly/yearly subscription is not expired, as it may result in the inability to use the Database DevOpsservice. You can quickly check the remaining quota and expiration date at the top right corner of the NineData console page.

    check_quota

Operation Steps

  1. Log in to the NineData Console.

  2. Click on DevOps**SQL Console** in the left navigation bar.

    tip

    If you have previously logged in to the data source and have not closed it, you will automatically enter the data source page.

  3. Click on the text box under SQL Console, and available data sources will pop up. Click on the target data source and click Query to jump to the SQL Console.

    tip
    • If you haven't created Data Source before, a blank page will be displayed. In this case, please click on Create Datasource on the page.
    • If there are multiple data sources, you can enter all or part of the keywords in the box for precise or fuzzy search. The following fields are supported for search:

      • Data source name

      • IP address

      search_vdb

  4. After opening the SQL Console, you can perform data development operations on the data source. For detailed usage of the SQL Console, please refer to Interface Description.

Interface Description

vdb_interface

No.
Feature
Introduction
1SQL Console TabRepresents the currently opened data source SQL Console. Multiple SQL Consoles can be switched by clicking on the tabs. Click the X on the right side of the tab to close the SQL Console; double-click the tab to change the tab name; drag the tab to adjust the tab position. The right-click menu supports the following operations:
  • Instance Details: Open the current data source details window.
  • Rename Tab: Change the name of the current tab.
  • Duplicate Query: Open an SQL Console for the current data source.
  • New Query: Open a new data source SQL Console.
  • Close Tab: Close the current SQL Console.
  • Close Others: Close all other SQL Consoles except the current one.
  • Close Tabs to the Left: Close all SQL Consoles to the left of the current SQL Console.
  • Close Tabs to the Right: Close all SQL Consoles to the right of the current SQL Console.
  • Close All: Close all SQL Consoles.
2Open Data SourceSelect and open a new data source SQL Console.
3Data Source InformationDisplays the information of the current SQL Console's data source, including environment, IP address, and port number.
Right-click menu:
  • Instance Details: Display the details of the current data source, including username, connection address, etc.
  • Duplicate Query: Open an SQL Console for the current data source.
  • Refresh: Refresh data source information.
4Favorite | Refresh
  • Favorite: Click the favorite icon to add the current data source to My Favorites, and you can quickly select it when creating a new SQL Console.
  • Refresh: Refresh the data in the current data source.
5Database NameSelect the target database to perform SQL operations.
6API Operation RequestFor management operations of VectorDB, all operations selected here will ultimately be converted into standard calls to the native API of VectorDB. After selection, the system will automatically generate a JSON format request body sample in the editor, and you can directly adjust it on the sample. The supported operations are as follows:
  • Table Management: Create Table, Drop Table, Add Field, Add Table Alias, Remove Table Alias
  • Index Management: Create Index, Modify Index, Rebuild Index, Delete Index, View Index Details
  • Data Update: Insert Record, Update Inserted Record, Update Record, Delete Record
  • Data Query: Query Single Record, Scalar Batch Query, Vector Retrieval, Batch Vector Retrieval, Scalar Filter Query, Multi-Vector Retrieval
  • Role Management: Create Role, Delete, Grant Role Privileges, Revoke Role Privileges, Show Role Privileges, Filter Roles by Privileges
  • User Management: Create User, Delete User, Change User Password, Grant Role to User, Revoke User Role, Grant User Privileges, Revoke User Privileges, Show User Privileges, Filter Users by Privileges
7Function Buttons
  • execute: Execute Execute the selected VectorDB operation.
  • VectorDB Documentation Center: The official documentation link for Baidu Cloud Vector Database VectorDB.
  • expend: Full Screen Display the SQL Console in full-screen mode (browser size). After going full screen, click the top right compress Exit to restore to the original SQL Console size.
8Object TreeDisplays all libraries, tables, columns, and non-table objects in the current VectorDB in a tree format. You can perform the following operations:
  • Create Database: If there are no libraries in VectorDB, click the Create Database button on the page; if there are already databases in VectorDB, right-click any database name and click Create Database. Enter Name in the pop-up window, then click OK.
  • Delete Database: Right-click the target database name, click Delete Database, and then click OK in the confirmation window.
  • Table Details: Right-click the target table name, click Table Details, view the table details, including Desc (table structure description), Alias (table alias information), Stats (table statistical information).
    • Desc: Describes the complete metadata information of the table, including field definitions, index configurations, partition strategies, and other core attributes.
    • Alias: The alias mapping relationship of the table, used to achieve the decoupling of logical table names and physical table names.
    • Stats: Real-time statistical metrics of the table, used for monitoring and performance analysis.
  • Duplicate Query: Right-click any object, click Duplicate Query, and open a new SQL Console tab for the current data source.
  • Refresh: Right-click any object, click Refresh, refresh the index list.
9Editor WindowThe window for executing VectorDB operations, which supports the following functions:
  • Execute VectorDB operations: Conveniently select the operation type to generate a JSON format request body sample, and support direct adjustments on the sample.
  • Syntax Highlighting
  • Right-click menu:
    • Execute: Execute the VectorDB operation at the cursor position.
    • Common operations: Including Cut, Copy, Paste, and Select All.
    • Select Current SQL: Select the command at the cursor position.
10Execution Information, Result SetDisplays the execution information and result set of the command.
  • Execution Information: Includes execution time, execution duration, executed command, execution details, and other information.
  • Result Set: Displays the return results of the command in JSON format. Hover the mouse over the tab of the target result set to display the command corresponding to that result set.