OceanBase User Manual and Best Practices
website·Indexed 29 days ago
https://powerfooi.github.io/docs-playground/Comprehensive documentation for OceanBase Database, covering deployment via OBD and ob-operator, cluster operation and maintenance, and data migration using OMS, OBLOADER, and OBDUMPER V4.2.8. Includes guides on tenant creation, connection management with OBProxy, SQL development using OceanBase Developer Center (ODC), and performance benchmarking with obdiag and Sysbench.
What's inside OceanBase
- ob-operator is a Kubernetes Operator framework tool for the declarative management of OceanBase Database clusters. It allows users to manage clusters and tenants via Kubernetes APIs or a GUI Dashboard. Currently, it only supports OceanBase Database Community Edition images.
Overview of Bypass Import
Bypass Import is designed for fast data ingestion by skipping the standard execution path (SQL, transactions, and MemTable modules) and writing data directly to SSTables. Because it is implemented as a type of DDL, using Bypass Import within a transaction will trigger a commit of that transaction. It does not interfere with dumping or merging processes.Overview of Taro mini-program framework
Taro is a cross-platform mini-program framework developed by JD.com's Aotu Lab. It allows developers to write a single codebase that compiles to multiple platforms. As of version 3.x, it supports React, Nerv, Vue, and Vue 3. It provides a structured documentation path (Quick Start, Basic Tutorials, Advanced Guides, and Migration Guides) and offers native UI libraries:taro-uifor React andtaro-ui-vuefor Vue.Overview of OceanBase Diagnostic Tool (obdiag)
OceanBase Diagnostic Tool (obdiag) is an agile diagnostic tool specifically designed for OceanBase. It provides capabilities for collecting diagnostic information, performing analysis, and conducting cluster inspections. It supports one-click execution across various OceanBase deployment modes, including OCP, OBD, and manual deployments.Overview of OBLOADER and OBDUMPER
OceanBase provides two primary Java-based client tools for data migration:
- OBLOADER: Used to import database object definition files and table data files into OceanBase Database. It is compatible with CSV files exported by tools like mysqldump and Mydumper.
- OBDUMPER: Used to export objects and table data from OceanBase to storage media in various formats (CSV, SQL, CUT) or cloud storage (Amazon S3, Alibaba Cloud OSS). It supports data compression, encryption, and desensitization, but does not support incremental backup.
Introduction to MiniOB Database Learning Project
MiniOB is an introductory database learning project developed by the OceanBase team, based on a prototype from Huazhong University of Science and Technology and in collaboration with multiple universities. It is specifically designed for beginners, students, and database enthusiasts to bridge the gap between theoretical knowledge and engineering practice through a hands-on project.# Access the MiniOB project on GitHub https://github.com/oceanbase/miniobOverview of Cursor AI Code Editor features
Cursor is a fork of VS Code that integrates AI capabilities directly into the editor's core. Key features include:
- Intelligent Code Completion: Beyond standard inline completion, Cursor can predict multi-line changes across a file based on recent edits (e.g., updating a function signature after changing its return value).
- Composer Module: A high-level AI orchestration tool that understands the entire project structure. It allows users to reference specific files, directories, or the whole project using the
@symbol to generate code across multiple files, create new files, or delete code. - Diff-based Application: Code generated by the AI is presented as a Diff, allowing the developer to partially or fully accept changes.
- Checkpoints: Cursor records checkpoints after interactions, enabling developers to roll back to a previous state if an AI-generated change introduces bugs.
Overview of Partitioned Tables in OceanBase
Partitioning in OceanBase Database decomposes a large table into smaller, manageable parts called partitions based on specific rules. These partitions are transparent to the application; SQL queries are written as if accessing a single table, and the database automatically routes requests to the nodes where the relevant partitions reside. This architecture improves scalability, availability, and performance by distributing data and access requests across multiple OBServer nodes to prevent hotspots.Overview of the 'Zhangshang Yijiao' (掌上艺教) Mini Program System
Zhangshang Yijiao is a one-stop management system for piano room rentals and course management at the Tsinghua University Arts Education Center. The system consists of a WeChat Mini Program and two dedicated administrative backends (one for piano rooms and one for courses). It serves three primary user groups: students/staff/residents (renters), course instructors, and office administrators.Overview of OceanBase Join Algorithms
OceanBase implements three fundamental join algorithms, each with different cost models and time complexities:
Nested-Loop Join (NLJ): Scans the left table and, for every row, iterates through the right table to find matching rows.
- Cost:
cost(NLJ) = cost(left) + N(left) * cost(right) - Time Complexity: O(m * n)
- Cost:
Merge Join (Sort Merge Join): Sorts both the left and right tables by the join key, then uses pointers to find matching rows.
- Cost:
cost(MJ) = sort(left) + sort(right) + cost(left) + cost(right) - Time Complexity: O(n * log n) (dominated by sorting)
- Cost:
Hash Join (HJ): Scans the left table to build a hash table, then scans the right table to probe the hash table for matches.
- Cost:
cost(HJ) = cost(left) + N(left) * create_hash_cost + cost(right) + N(right) * probe_hash_cost
- Cost:
Overview of YAI (Yet Another Importer) VSCode Extension
YAI (Yet Another Importer) is a VSCode extension designed to help developers import modules without breaking their workflow. The plugin automatically identifies project dependencies, scans local files, and analyzes import patterns and frequency to provide suggestions. It inserts imports using the "native" syntax of the detected programming language (e.g.,import/requirefor JavaScript,importfor Python, and aliased imports for Go). While currently in development, it is fully functional for Go and has planned support for ECMAScript, Python, and C/C++.Overview of OceanBase Cloud-native projects
The Cloud-native organization focuses on utilizing cloud-native technologies to optimize the operation of OceanBase. The goal is to leverage OceanBase's strengths as a distributed database in high availability and scalability to create a secure, reliable, elastic, and efficient infrastructure.