文章详情

短信预约-IT技能 免费直播动态提醒

请输入下面的图形验证码

提交验证

短信预约提醒成功

liquibase中不同数据库之间的数据类型对应关系是什么

2023-06-26 07:34

关注

今天小编给大家分享一下liquibase中不同数据库之间的数据类型对应关系是什么的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。

数据库设计时,经常会有跨数据库平台的要求。虽然不同数据库的数据类型各不一样,但都可以找到代替的数据库类型。

mysql有tinyint类型,但oracle只有number,这时可以使用number(3)代替tinyint。

MySQL中有boolean类型,但只是TINYINT(1)的别名。为了方便和其它数据库boolean类型对应,liquibase使用BIT(1)作为MySQL的boolean类型。

另外,navicat在对不同数据库进行转换时,varchar2超过1000个字符,就会用clob代替。可以考虑将varchar的最大长度规定为1000。

这里列出数据库管理工具liquibase中不同数据库之间的的数据类型对应关系,作为参考。

booleanMySQLDatabase: BIT(1)SQLiteDatabase: BOOLEANH2Database: BOOLEANPostgresDatabase: BOOLEANUnsupportedDatabase: BOOLEANDB2Database: SMALLINTMSSQLDatabase: [bit]OracleDatabase: NUMBER(1)HsqlDatabase: BOOLEANFirebirdDatabase: SMALLINTDerbyDatabase: SMALLINTInformixDatabase: BOOLEANSybaseDatabase: BITSybaseASADatabase: BITtinyintMySQLDatabase: TINYINTSQLiteDatabase: TINYINTH2Database: TINYINTPostgresDatabase: SMALLINTUnsupportedDatabase: TINYINTDB2Database: SMALLINTMSSQLDatabase: [tinyint]OracleDatabase: NUMBER(3)HsqlDatabase: TINYINTFirebirdDatabase: SMALLINTDerbyDatabase: SMALLINTInformixDatabase: TINYINTSybaseDatabase: TINYINTSybaseASADatabase: TINYINTintMySQLDatabase: INTSQLiteDatabase: INTEGERH2Database: INTPostgresDatabase: INTUnsupportedDatabase: INTDB2Database: INTEGERMSSQLDatabase: [int]OracleDatabase: INTEGERHsqlDatabase: INTFirebirdDatabase: INTDerbyDatabase: INTEGERInformixDatabase: INTSybaseDatabase: INTSybaseASADatabase: INTmediumintMySQLDatabase: MEDIUMINTSQLiteDatabase: MEDIUMINTH2Database: MEDIUMINTPostgresDatabase: MEDIUMINTUnsupportedDatabase: MEDIUMINTDB2Database: MEDIUMINTMSSQLDatabase: [int]OracleDatabase: MEDIUMINTHsqlDatabase: MEDIUMINTFirebirdDatabase: MEDIUMINTDerbyDatabase: MEDIUMINTInformixDatabase: MEDIUMINTSybaseDatabase: MEDIUMINTSybaseASADatabase: MEDIUMINTbigintMySQLDatabase: BIGINTSQLiteDatabase: BIGINTH2Database: BIGINTPostgresDatabase: BIGINTUnsupportedDatabase: BIGINTDB2Database: BIGINTMSSQLDatabase: [bigint]OracleDatabase: NUMBER(38, 0)HsqlDatabase: BIGINTFirebirdDatabase: BIGINTDerbyDatabase: BIGINTInformixDatabase: INT8SybaseDatabase: BIGINTSybaseASADatabase: BIGINTfloatMySQLDatabase: FLOATSQLiteDatabase: FLOATH2Database: FLOATPostgresDatabase: FLOATUnsupportedDatabase: FLOATDB2Database: FLOATMSSQLDatabase: [float](53)OracleDatabase: FLOATHsqlDatabase: FLOATFirebirdDatabase: FLOATDerbyDatabase: FLOATInformixDatabase: FLOATSybaseDatabase: FLOATSybaseASADatabase: FLOATdoubleMySQLDatabase: DOUBLESQLiteDatabase: DOUBLEH2Database: DOUBLEPostgresDatabase: DOUBLE PRECISIONUnsupportedDatabase: DOUBLEDB2Database: DOUBLEMSSQLDatabase: [float](53)OracleDatabase: FLOAT(24)HsqlDatabase: DOUBLEFirebirdDatabase: DOUBLE PRECISIONDerbyDatabase: DOUBLEInformixDatabase: DOUBLE PRECISIONSybaseDatabase: DOUBLESybaseASADatabase: DOUBLEdecimalMySQLDatabase: DECIMALSQLiteDatabase: DECIMALH2Database: DECIMALPostgresDatabase: DECIMALUnsupportedDatabase: DECIMALDB2Database: DECIMALMSSQLDatabase: [decimal](18, 0)OracleDatabase: DECIMALHsqlDatabase: DECIMALFirebirdDatabase: DECIMALDerbyDatabase: DECIMALInformixDatabase: DECIMALSybaseDatabase: DECIMALSybaseASADatabase: DECIMALnumberMySQLDatabase: numericSQLiteDatabase: NUMBERH2Database: NUMBERPostgresDatabase: numericUnsupportedDatabase: NUMBERDB2Database: numericMSSQLDatabase: [numeric](18, 0)OracleDatabase: NUMBERHsqlDatabase: numericFirebirdDatabase: numericDerbyDatabase: numericInformixDatabase: numericSybaseDatabase: numericSybaseASADatabase: numericblobMySQLDatabase: LONGBLOBSQLiteDatabase: BLOBH2Database: BLOBPostgresDatabase: BYTEAUnsupportedDatabase: BLOBDB2Database: BLOBMSSQLDatabase: [varbinary](MAX)OracleDatabase: BLOBHsqlDatabase: BLOBFirebirdDatabase: BLOBDerbyDatabase: BLOBInformixDatabase: BLOBSybaseDatabase: IMAGESybaseASADatabase: LONG BINARYfunctionMySQLDatabase: FUNCTIONSQLiteDatabase: FUNCTIONH2Database: FUNCTIONPostgresDatabase: FUNCTIONUnsupportedDatabase: FUNCTIONDB2Database: FUNCTIONMSSQLDatabase: [function]OracleDatabase: FUNCTIONHsqlDatabase: FUNCTIONFirebirdDatabase: FUNCTIONDerbyDatabase: FUNCTIONInformixDatabase: FUNCTIONSybaseDatabase: FUNCTIONSybaseASADatabase: FUNCTIONUNKNOWNMySQLDatabase: UNKNOWNSQLiteDatabase: UNKNOWNH2Database: UNKNOWNPostgresDatabase: UNKNOWNUnsupportedDatabase: UNKNOWNDB2Database: UNKNOWNMSSQLDatabase: [UNKNOWN]OracleDatabase: UNKNOWNHsqlDatabase: UNKNOWNFirebirdDatabase: UNKNOWNDerbyDatabase: UNKNOWNInformixDatabase: UNKNOWNSybaseDatabase: UNKNOWNSybaseASADatabase: UNKNOWNdatetimeMySQLDatabase: datetimeSQLiteDatabase: TEXTH2Database: TIMESTAMPPostgresDatabase: TIMESTAMP WITHOUT TIME ZONEUnsupportedDatabase: datetimeDB2Database: TIMESTAMPMSSQLDatabase: [datetime]OracleDatabase: TIMESTAMPHsqlDatabase: TIMESTAMPFirebirdDatabase: TIMESTAMPDerbyDatabase: TIMESTAMPInformixDatabase: DATETIME YEAR TO FRACTION(5)SybaseDatabase: datetimeSybaseASADatabase: datetimetimeMySQLDatabase: timeSQLiteDatabase: timeH2Database: timePostgresDatabase: TIME WITHOUT TIME ZONEUnsupportedDatabase: timeDB2Database: timeMSSQLDatabase: [time](7)OracleDatabase: DATEHsqlDatabase: timeFirebirdDatabase: timeDerbyDatabase: timeInformixDatabase: INTERVAL HOUR TO FRACTION(5)SybaseDatabase: timeSybaseASADatabase: timetimestampMySQLDatabase: timestampSQLiteDatabase: TEXTH2Database: TIMESTAMPPostgresDatabase: TIMESTAMP WITHOUT TIME ZONEUnsupportedDatabase: timestampDB2Database: timestampMSSQLDatabase: [datetime]OracleDatabase: TIMESTAMPHsqlDatabase: TIMESTAMPFirebirdDatabase: TIMESTAMPDerbyDatabase: TIMESTAMPInformixDatabase: DATETIME YEAR TO FRACTION(5)SybaseDatabase: datetimeSybaseASADatabase: timestampdateMySQLDatabase: dateSQLiteDatabase: dateH2Database: datePostgresDatabase: dateUnsupportedDatabase: dateDB2Database: dateMSSQLDatabase: [date]OracleDatabase: dateHsqlDatabase: dateFirebirdDatabase: dateDerbyDatabase: dateInformixDatabase: dateSybaseDatabase: dateSybaseASADatabase: datecharMySQLDatabase: CHARSQLiteDatabase: CHARH2Database: CHARPostgresDatabase: CHARUnsupportedDatabase: CHARDB2Database: CHARMSSQLDatabase: [char](1)OracleDatabase: CHARHsqlDatabase: CHARFirebirdDatabase: CHARDerbyDatabase: CHARInformixDatabase: CHARSybaseDatabase: CHARSybaseASADatabase: CHARvarcharMySQLDatabase: VARCHARSQLiteDatabase: VARCHARH2Database: VARCHARPostgresDatabase: VARCHARUnsupportedDatabase: VARCHARDB2Database: VARCHARMSSQLDatabase: [varchar](1)OracleDatabase: VARCHAR2HsqlDatabase: VARCHARFirebirdDatabase: VARCHARDerbyDatabase: VARCHARInformixDatabase: VARCHARSybaseDatabase: VARCHARSybaseASADatabase: VARCHARncharMySQLDatabase: NCHARSQLiteDatabase: NCHARH2Database: NCHARPostgresDatabase: NCHARUnsupportedDatabase: NCHARDB2Database: NCHARMSSQLDatabase: [nchar](1)OracleDatabase: NCHARHsqlDatabase: CHARFirebirdDatabase: NCHARDerbyDatabase: NCHARInformixDatabase: NCHARSybaseDatabase: NCHARSybaseASADatabase: NCHARnvarcharMySQLDatabase: NVARCHARSQLiteDatabase: NVARCHARH2Database: NVARCHARPostgresDatabase: VARCHARUnsupportedDatabase: NVARCHARDB2Database: NVARCHARMSSQLDatabase: [nvarchar](1)OracleDatabase: NVARCHAR2HsqlDatabase: VARCHARFirebirdDatabase: NVARCHARDerbyDatabase: VARCHARInformixDatabase: NVARCHARSybaseDatabase: NVARCHARSybaseASADatabase: NVARCHARclobMySQLDatabase: LONGTEXTSQLiteDatabase: TEXTH2Database: CLOBPostgresDatabase: TEXTUnsupportedDatabase: CLOBDB2Database: CLOBMSSQLDatabase: [varchar](MAX)OracleDatabase: CLOBHsqlDatabase: CLOBFirebirdDatabase: BLOB SUB_TYPE TEXTDerbyDatabase: CLOBInformixDatabase: CLOBSybaseDatabase: TEXTSybaseASADatabase: LONG VARCHARcurrencyMySQLDatabase: DECIMALSQLiteDatabase: REALH2Database: DECIMALPostgresDatabase: DECIMALUnsupportedDatabase: DECIMALDB2Database: DECIMAL(19, 4)MSSQLDatabase: [money]OracleDatabase: NUMBER(15, 2)HsqlDatabase: DECIMALFirebirdDatabase: DECIMAL(18, 4)DerbyDatabase: DECIMALInformixDatabase: MONEYSybaseDatabase: MONEYSybaseASADatabase: MONEYuuidMySQLDatabase: char(36)SQLiteDatabase: TEXTH2Database: UUIDPostgresDatabase: UUIDUnsupportedDatabase: char(36)DB2Database: char(36)MSSQLDatabase: [uniqueidentifier]OracleDatabase: RAW(16)HsqlDatabase: char(36)FirebirdDatabase: char(36)DerbyDatabase: char(36)InformixDatabase: char(36)SybaseDatabase: UNIQUEIDENTIFIERSybaseASADatabase: UNIQUEIDENTIFIER

以上就是“liquibase中不同数据库之间的数据类型对应关系是什么”这篇文章的所有内容,感谢各位的阅读!相信大家阅读完这篇文章都有很大的收获,小编每天都会为大家更新不同的知识,如果还想学习更多的知识,请关注编程网行业资讯频道。

阅读原文内容投诉

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

软考中级精品资料免费领

  • 历年真题答案解析
  • 备考技巧名师总结
  • 高频考点精准押题
  • 2024年上半年信息系统项目管理师第二批次真题及答案解析(完整版)

    难度     801人已做
    查看
  • 【考后总结】2024年5月26日信息系统项目管理师第2批次考情分析

    难度     348人已做
    查看
  • 【考后总结】2024年5月25日信息系统项目管理师第1批次考情分析

    难度     311人已做
    查看
  • 2024年上半年软考高项第一、二批次真题考点汇总(完整版)

    难度     432人已做
    查看
  • 2024年上半年系统架构设计师考试综合知识真题

    难度     220人已做
    查看

相关文章

发现更多好内容

猜你喜欢

AI推送时光机
位置:首页-资讯-后端开发
咦!没有更多了?去看看其它编程学习网 内容吧
首页课程
资料下载
问答资讯