# stonedb **Repository Path**: MapLover/stonedb ## Basic Information - **Project Name**: stonedb - **Description**: StoneDB是国内首款MySQL原生一体化HTAP实时开源数据库。对标MySQL HeatWave,是下一代MySQL分析加速器。 - **Primary Language**: C/C++ - **License**: GPL-2.0 - **Default Branch**: stonedb-5.7-dev - **Homepage**: https://stonedb.io/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 12 - **Created**: 2023-01-18 - **Last Updated**: 2023-01-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Overview
[](https://stonedb.io/docs/about-stonedb/intro)Architecture 2.0
[](https://stonedb.io/docs/about-stonedb/architecture) For more information about StoneDB, see [stonedb.io](https://stonedb.io/). # Contribution StoneDB welcomes all kinds of contributions, such as contributing code to the code base, sharing your experience on how to use StoneDB, and providing insights in the community on the Forums, or contributing to projects that make StoneDB a better project. For more specifics, see the [contributing guide](https://github.com/stoneatom/stonedb/blob/stonedb-5.7-dev/CONTRIBUTING.md) for more specifics. # Getting Started The Getting Started part provides information about StoneDB supported platforms, installation (including creating your first table), and migrating from the running MySQL databases to StoneDB. ## Supported Platform The officially supported subsets of platforms are: - CentOS 7.x or higher - Ubuntu 20.04 or higher - Red Hat Enterprise Linux 7 (RHEL 7.x) Compiler toolsets we verify our builds with: - GCC 7.3 or higher The following packages we verify our builds with: - Make 3.82 or later - CMake 3.7.2 or later - marisa 0.77 - RocksDB 6.12.6 - Boost 1.66 ## Build StoneDB from the Source Code ### On Ubuntu 20.04 For more information, see [Compile StoneDB on Ubuntu 20.04](https://stonedb.io/docs/developer-guide/compiling-methods/compile-using-ubuntu2004/compile-using-ubuntu20.04-for-57/). ### On CentOS 7.X For more information, see [Compile StoneDB on CentOS 7.x](https://stonedb.io/docs/developer-guide/compiling-methods/compile-using-centos7/compile-using-centos7-for-57). ### On RedHat 7.X For more information, see [Compile StoneDB on RedHat 7.x](https://stonedb.io/docs/developer-guide/compiling-methods/compile-using-redhat7/compile-using-redhat7-for-57/). ## Build StoneDB from Source Code in a Docker Container For more information, see [Compile StoneDB in a Docker Container](https://stonedb.io/docs/developer-guide/compiling-methods/compile-using-docker). ## Configure StoneDB After StoneDB is installed, you need to configure at least the following parameters in the **my.cnf** file: ```shell #the stonedb configuration options are listed as following. #for an example. [mysqld] # For version 5.7 or later, the engine should be set to tianmu default-storage-engine=tianmu # For version 5.6, the engine should be set to stonedb # default-storage-engine=stonedb default-tmp-storage-engine=MyISAM binlog-format=STATEMENT ``` ## Initialize the Database ```bash # For version 5.6 cd /path/to/your/path/bin && ./mysql_install_db --basedir=/stonedb/install/ --datadir=/stonedb/install/data/ --user=mysql # For version 5.7 or later cd /path/to/your/path/bin && ./mysqld --initialize --basedir=/stonedb/install/ --datadir=/stonedb/install/data/ --user=mysql ``` ## Start the Database Instance ```bash mysqld_safe --defaults-file=/path/to/my.cnf --user=mysql & ``` ## Create a StoneDB Table ```sql --The example code for creating a table with 'tianmu' engine.(For version 5.7 or later) CREATE TABLE `example_table` ( `id1` bigint(20) NOT NULL DEFAULT '0', `id1_type` int(10) NOT NULL DEFAULT '0', `id2` bigint(20) NOT NULL DEFAULT '0', `id2_type` int(10) NOT NULL DEFAULT '0', `data` varchar(255) NOT NULL DEFAULT '', `time` bigint(20) NOT NULL DEFAULT '0', `version` int(11) NOT NULL DEFAULT '0', ) ENGINE=tianmu; -- For version 5.6, the engine should be set to 'stonedb' ``` The example shows some important features and limitations in StoneDB. For more information about limitations, please see [StoneDB Limitations](https://stonedb.io/docs/about-stonedb/limits). - StoneDB data is stored in Column format and persist to RocksDB. All data is compressed, and the compression ratio can be 10:1 to 40:1. - StoneDB can achieve a competitive performance when processing ad-hoc queries, even without any indexes created. For more details, click [here.](https://stonedb.io/docs/about-stonedb/architecture) ---
# Code of Conduct
When participating in the StoneDB project, please ensure all your behavior complies with the [Code of Conduct](https://github.com/stoneatom/stonedb/blob/stonedb-5.7-dev/CODE_OF_CONDUCT.md).