Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

KingbaseES Database: Installation, Management, and Core Operations

Tech 3

KingbaseES is a relational database management system (RDBMS) developed by China's Renmin University Golden Warehouse Information Technology. Designed for the domestic market, it serves critical sectors including government, finance, energy, and telecommunications. As a representative of domestic databases, it emphasizes high security, availability, and performance, aligning with China's strategic needs for technological autonomy.

Key Features

  1. Autonomous Control: Fully independent intellectual property ensures compliance with national security and technology sovereignty requirements.
  2. Security: Implements three-privilege separation (system administrator, security administrator, audit administrator), autonomous access control, mandatory access control, and database auditing, meeting national information security standards.
  3. High Availability: Supports master-slave disaster recovery, dual-machine hot standby, data replication, and other high-availability architectures to ensure service continuity and stability.
  4. High Performance: Optimized query engine, intelligent cache management, and parallel processing technologies enhance data processing speed for large-scale concurrent access.
  5. Cross-Platform Compatibility: Runs on multiple operating systems including Windows, Linux (e.g., Kylin, Red Hat), and UNIX, facilitating deployment and migration.
  6. Big Data Processing: Capable of handling massive data storage and processing, suitable for big data enalytics and data warehousing scenarios.
  7. Compatibility and Standardization: Adheres to SQL standards and offers compatibility with mainstream databases like Oracle and MySQL, simplifying migration and application development.
  8. Usability and Management: Provides graphical management tools for installation, configuration, monitoring, and maintenance, reducing administrative overhead.
  9. Technical Support and Services: Offers professional support including training, custom development, and technical assistance to ensure smooth deployment and usage.

Application Scenarios

  • Government Informasion Systems: Suitable for e-government and smart city projects, meeting high demands for data security and autonomous control.
  • Financial Industry: Used in banking, insurance, and securities for core trading systems and data warehouses.
  • Energy and Telecommunications: Handles large-scale real-time and historical data in power, petroleum, and communications sectors.
  • Enterprise Applicatinos: Serves as backend databases for ERP, CRM, and BI systems.

Installation and Connection

For Linux installation, refer to online resources such as community blogs for step-by-step guides on setting up KingbaseES and configuring user inputs like SM4 and RC4 encryption.

Management Tools

While KingbaseES provides its own management tools, DBeaver is a recommended alternative for database operations. To connect DBeaver to KingbaseES V8, manually add the driver and configure the connection settings as detailed in online tutorials.

Database Operations

  • Import Database:
./ksql -h IP_ADDRESS -U USERNAME -d DATABASE_NAME -f DATABASE_FILE
  • Login to Database:
./ksql -p PORT_NUMBER -U USERNAME DATABASE_NAME
  • Create Database:
CREATE DATABASE DATABASE_NAME;
  • Delete Data base:
DROP DATABASE DATABASE_NAME;
  • Export Database:
./sys_dump -p PORT_NUMBER -d "DATABASE_NAME" -U USERNAME -f OUTPUT_FILE

Table Operations

  • Delete Table:
DROP TABLE TABLE_NAME;
  • Create Table:
CREATE TABLE TABLE_NAME (
    COLUMN1 DATA_TYPE CONSTRAINTS,
    COLUMN2 DATA_TYPE CONSTRAINTS,
    ...
);

Example:

CREATE TABLE anon.suggested_server_doc (
    record_id int4 NOT NULL,
    key_field varchar(100),
    condition_desc varchar(100),
    value_field varchar(500)
);
  • Delete Table Data:
DELETE FROM TABLE_NAME WHERE CONDITION;
  • Query Tablle:
SELECT * FROM TABLE_NAME;
  • Insert Data:
INSERT INTO TABLE_NAME (COLUMN1, COLUMN2) VALUES(VALUE1, VALUE2);
  • Update Data:
UPDATE TABLE_NAME SET FIELD = NEW_VALUE WHERE CONDITION;
  • Add Table Description:
COMMENT ON TABLE TABLE_NAME IS 'TABLE_DESCRIPTION';
  • Add Column Description:
COMMENT ON COLUMN TABLE_NAME.COLUMN_NAME IS 'COLUMN_DESCRIPTION';
  • Modify Column Type:
ALTER TABLE TABLE_NAME ALTER COLUMN COLUMN_NAME TYPE NEW_TYPE;
  • Query License Validity:
SELECT GET_LICENSE_VALIDDAYS();
  • Modify Character Encoding:
ALTER TABLE SCHEMA_NAME.TABLE_NAME CHARACTER SET utf8 COLLATE utf8_general_ci;

Queries and Views

  • View Databases:
SELECT * FROM sys_database;
  • View All System Tables:
SELECT * FROM sys_tables;

Related Articles

Understanding Strong and Weak References in Java

Strong References Strong reference are the most prevalent type of object referencing in Java. When an object has a strong reference pointing to it, the garbage collector will not reclaim its memory. F...

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.