StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.3k stars 1.68k forks source link

JDBC Catalog能否支持达梦数据库? #44004

Open jdzchenxin opened 2 months ago

jdzchenxin commented 2 months ago

官方文档JDBC Catalog中描述:目前 JDBC Catalog 支持 MySQL 和 PostgreSQL。 我关注到目前社区正在进行oracle适配 #43663 考虑到达梦数据库与Oracle非常接近,能否增加达梦数据库的JDBC Catalog支持?

Dshadowzh commented 2 months ago

Can you share some differences between Dameng and Oracle, It's welcome to contribute an optimized JDBC catalog for Dameng.

jdzchenxin commented 2 months ago

Can you share some differences between Dameng and Oracle, It's welcome to contribute an optimized JDBC catalog for Dameng.

Dameng Database is similar to Oracle in many aspects, especially in terms of syntax and function support. Due to the consideration of compatibility with Oracle in the design of the Dream database, it is relatively easy for users with Oracle experience to migrate to the Dream database. Based on my experience, in the vast majority of cases, here are some subtle differences between Damon and ORACLE. 1.JDBC Driver: Dameng officially provides : JDBC driver download for DM8 2.Data type: The numerical data types supported by Oracle include NUMBER (p, s), BINARY-FLOAT, BINARY-DOUBLE, etc. The NUMBER type is very flexible and can specify precision (p) and scale (s). The numerical data types supported by the Dameng database include NUMERIC, DECIMAL, INTEGER, BIGINT, TINYINT, etc. Among them, the NUMERIC and DECIMAL/DEC types are similar to Oracle's NUMBER type. eight thousand nine hundred and eleven Character data type: The character data types in Oracle include CHAR, VARCHAR2, NCHAR, NVARCHAR2, etc. VARCHAR2 can store up to 4000 bytes of information. The character data types in the Da Meng database include CHAR, VARCHAR, etc. The maximum length of the VARCHAR type is determined by the size of the database page. Multimedia data type: Oracle provides large object (LOB) data types such as CLOB, NCLOB, and BLOB for storing large amounts of text or binary data. thirty-four The Da Meng database also supports similar multimedia data types, such as Text/LONGVARCHAR, BLOB, etc., with a maximum string length of 2G-1 for the Text type. Date time data type: Oracle's date and time data types include DATE, TIMESTAMP, TIMESTAMP With TIME ZONE, etc. These types store detailed date and time information. The date and time data types of the Da Meng database include DATE, TIME, TIMESTAMP, etc., and Boolean type date and time data types are also provided. Special data types: Oracle provides some special data types, such as ROWID and UROWID, for storing the physical or logical addresses of rows. The Da Meng database provides complex data types such as record types and array types, which do not have direct corresponding types in Oracle.

For more, please refer to the SQL language user manual in the official documentation.

If Oracle successfully adapts to the JDBC Catalog, it is possible to consider adding a DamengSchemeResolver based on OracleSchemeResolver.