难以置信!这个国产数据库跟Oracle的兼容性高达99%.....

2024-06-11 16:44

本文主要是介绍难以置信!这个国产数据库跟Oracle的兼容性高达99%.....,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

前面写了两篇关于国产数据库的文章,没想到引起了很多网友的热议,其中大部分网友是表示认可、肯定;在此我表示感谢。当然其中也有个别网友朋友提出了质疑和疑问,甚至抵制,这类朋友大致的观点总结一下就是:

1、你们MogDB是基于openGauss数据库的二次开发增强,既然openGauss我用起来感觉不好用,自然MogDB也不好用。 2、openGauss是基于开源PostgreSQL9.2,还是停留在9这个版本,太老了。 3、直接干脆从PostgreSQL不香吗?

针对这几个疑问,我正式回复一下:

1、开源openGauss迭代速度比较快,同时确实存在不少Bug,另外在针对Oracle、MySQL、PostgreSQL方面的兼容性相对要差很多,目前各家DBV厂商都做了很多兼容性增强,包括一些Bug修复,因此稳定性是可以得到保障的。 至于说好不好用,我想大家试试就知道了吧!

2、openGauss是基于PostgreSQL 9.2.4版本没错,但是已经被魔改的很厉害了,架构都完全不同了,而且实事求是的说,现在最新版PostgreSQL17 还有一些没解决的痛点,openGauss 1.0 都解决了,那么,您能说openGauss还停留在PostgreSQL9.2 时代么?

3、我其实在公众号留言也回复过了,如果用户运维能力跟得上,用开源PG也完全没有问题,毕竟确实有很多互联网公司都在用PG,比如去哪儿网、探探、中国平安、苏宁等等。 但是如果用户是要进行数据库国产化改造,那么我想用PostgreSQL来替代Oracle或者DB2又或者是MySQL,应该就不太适合了吧。我想原因就不需要过多解释了。

我们再回到这个主题上来,为什么企业用户选择MogDB来做国产化改造,而不是用开源的openGauss或者PostgreSQL呢?我想大概有如下几个原因:

数据库稳定性、性能、安全等都是经得起考验的,毕竟现在每一个客户投产之前都要经过很长的测试;其次那就是MogDB对于其他数据库的兼容性真的做的还不错,至少是达到用户的预期了吧。

因此我打算用3-5篇系列文章来给大家分享分享MogDB在针对Oracle、MySQL、PostgreSQL等数据库方面的兼容性增强和改进。

实际上兼容性我们做的非常多了,一些场景的数据库类型,SQL写法就不说了,大家可以参考MogDB官网 www.mogdb.io。 这里我简单提几个兼容性的大类。

MogDB 兼容Oracle的函数有哪些?

#字符函数
regexp_substr
regexp_instr
regexp_replace
regexp_count
replace
instrb
soundex
asciistr
unistr
convert
......# 时间函数months_between
trunc
round
numtoyminterval
systimestamp
sys_extract_utc
new_time
......# 数字函数
nanvl
bitor
bitxor
bin_to_num
sinh
cosh
tanh
remainder
round_ties_to_even
.....# 聚合函数wm_concat
listagg
bit_and_agg
bit_or_agg
bit_xor_agg
any_value
kurtosis_pop
kurtosis_samp
skewness_pop
skewness_samp
......# NULL值相关函数nullif
nvl2
lnnvl# 其他函数
sys_guid
ora_hash
dump
vsize
to_blob
empty_clob()
nls_charset_name
nls_charset_id
sys_context
userenv
instrb
nls_charset_id
nls_charset_name
nls_lower
nls_upper
ora_hash 
remainder
replace
show
show_parameter
to_timestamp, 
to_yminterval
tz_offset,
nullif
ratio_to_report
pivot
unpivot

实际上兼容的函数还有很多,我这里就写这么多。 比如Oracle listagg、pivot、unpivot这些都是Oracle 11g才新增加的函数;甚至Oracle 21c新增的分析函数也支持了。

MogDB 兼容Oracle的DBMS包?

实际上很多toB客户都是Oracle的重度使用者,大量使用Oracle内置dbms package、存储过程等等,因此如果我们要进行快速替换、低成本替换,就必须要去兼容一些Oracle dbms内置包,比如如下就是我们已经兼容并支持的部分:

dbms_random
dbms_output
dbms_lock
dbms_lob
dbms_application_info
dbms_metadata
dbms_job
dbms_utility
dbms_stat
dbms_obfuscation_toolkit
dbms_utility
dbms_snapshot
utl_url
utl_raw
utl_match
utl_encode
utl_recomp
.....

MogDB 兼容Oracle DBA_XXX视图和数据字典有哪些?

DBA_CATALOG                                                                                    
DBA_CONS_COLUMNS                                                                               
DBA_CONSTRAINTS                                                                                
DBA_DATA_FILES                                                                                 
DBA_DEPENDENCIES                                                                               
DBA_IND_COLUMNS                                                                                
DBA_IND_EXPRESSIONS                                                                            
DBA_IND_PARTITIONS                                                                             
DBA_IND_STATISTICS                                                                             
DBA_INDEX_USAGE                                                                                
DBA_INDEXES                                                                                    
DBA_OBJECTS                                                                                    
DBA_PART_INDEXES                                                                               
DBA_PART_TABLES                                                                                
DBA_PROCEDURES                                                                                 
DBA_SEGMENTS                                                                                   
DBA_SEQUENCES                                                                                  
DBA_SOURCE                                                                                     
DBA_SYNONYMS                                                                                   
DBA_TAB_COL_STATISTICS                                                                         
DBA_TAB_COLS                                                                                   
DBA_TAB_COLUMNS                                                                                
DBA_TAB_COMMENTS                                                                               
DBA_COL_COMMENTS                                                                               
DBA_TAB_MODIFICATIONS                                                                          
DBA_TAB_PARTITIONS                                                                             
DBA_TAB_SUBPARTITIONS                                                                          
DBA_PART_KEY_COLUMNS                                                                           
DBA_SUBPART_KEY_COLUMNS                                                                        
DBA_TAB_STATISTICS                                                                             
DBA_TABLES                                                                                     
DBA_TABLESPACES                                                                                
DBA_TRIGGER_COLS                                                                               
DBA_TRIGGERS                                                                                   
DBA_TYPES                                                                                      
DBA_VIEWS                                                                                      
DBA_JOBS                                                                                       
DBA_JOBS_RUNNING                                                                               
DBA_MVIEWS                                                                                     
DBA_MVIEW_LOGS                                                                                 
DBA_MVIEW_COMMENTS                                                                             
DBA_USERS     
DBA_DETAIL_PRIVILEGES
DBA_ALL_PRIVILEGES
DBA_ALL_PRIVILEGES_SQL                                                                                 
ALL_CATALOG                                                                                    
ALL_CONS_COLUMNS                                                                               
ALL_CONSTRAINTS                                                                                
ALL_DATA_FILES                                                                                 
ALL_DEPENDENCIES                                                                               
ALL_IND_COLUMNS                                                                                
ALL_IND_EXPRESSIONS                                                                            
ALL_IND_PARTITIONS                                                                             
ALL_IND_STATISTICS                                                                             
ALL_INDEX_USAGE                                                                                
ALL_INDEXES                                                                                    
ALL_OBJECTS                                                                                    
ALL_PART_INDEXES                                                                               
ALL_PART_TABLES                                                                                
ALL_PROCEDURES                                                                                 
ALL_SEGMENTS                                                                                   
ALL_SEQUENCES                                                                                  
ALL_SOURCE                                                                                     
ALL_SYNONYMS                                                                                   
ALL_TAB_COL_STATISTICS                                                                         
ALL_TAB_COLS                                                                                   
ALL_TAB_COLUMNS                                                                                
ALL_TAB_COMMENTS                                                                               
ALL_COL_COMMENTS                                                                               
ALL_TAB_MODIFICATIONS                                                                          
ALL_TAB_PARTITIONS                                                                             
ALL_TAB_SUBPARTITIONS                                                                          
ALL_PART_KEY_COLUMNS                                                                           
ALL_SUBPART_KEY_COLUMNS                                                                        
ALL_TAB_STATISTICS                                                                             
ALL_TABLES                                                                                     
ALL_TABLESPACES                                                                                
ALL_TRIGGER_COLS                                                                               
ALL_TRIGGERS                                                                                   
ALL_TYPES                                                                                      
ALL_VIEWS                                                                                      
ALL_JOBS                                                                                       
ALL_JOBS_RUNNING                                                                               
ALL_MVIEWS                                                                                     
ALL_MVIEW_LOGS                                                                                 
ALL_MVIEW_COMMENTS                                                                             
ALL_USERS                                                                                      
USER_CATALOG                                                                                   
USER_CONS_COLUMNS                                                                              
USER_CONSTRAINTS                                                                               
USER_DATA_FILES                                                                                
USER_DEPENDENCIES                                                                              
USER_IND_COLUMNS                                                                               
USER_IND_EXPRESSIONS                                                                           
USER_IND_PARTITIONS                                                                            
USER_IND_STATISTICS                                                                            
USER_INDEX_USAGE                                                                               
USER_INDEXES                                                                                   
USER_OBJECTS                                                                                   
USER_PART_INDEXES                                                                              
USER_PART_TABLES                                                                               
USER_PROCEDURES                                                                                
USER_SEGMENTS                                                                                  
USER_SEQUENCES                                                                                 
USER_SOURCE                                                                                    
USER_SYNONYMS                                                                                  
USER_TAB_COL_STATISTICS                                                                        
USER_TAB_COLS                                                                                  
USER_TAB_COLUMNS                                                                               
USER_TAB_COMMENTS                                                                              
USER_COL_COMMENTS                                                                              
USER_TAB_MODIFICATIONS                                                                         
USER_TAB_PARTITIONS                                                                            
USER_TAB_SUBPARTITIONS                                                                         
USER_PART_KEY_COLUMNS                                                                          
USER_SUBPART_KEY_COLUMNS                                                                       
USER_TAB_STATISTICS                                                                            
USER_TABLES                                                                                    
USER_TABLESPACES                                                                               
USER_TRIGGER_COLS                                                                              
USER_TRIGGERS                                                                                  
USER_TYPES                                                                                     
USER_VIEWS                                                                                     
USER_JOBS                                                                                      
USER_JOBS_RUNNING                                                                              
USER_MVIEWS                                                                                    
USER_MVIEW_LOGS                                                                                
USER_MVIEW_COMMENTS                                                                            
USER_USERS                                                                                     
DBA_DIRECTORIES
ALL_DIRECTORIES
DBA_ROLES
DBA_ROLE_PRIVS
USER_ROLE_PRIVS
PRODUCT_COMPONENT_VERSION
PLAN_TABLE
DBA_SOURCE_ALL
NLS_DATABASE_PARAMETERS
NLS_INSTANCE_PARAMETERS
NLS_SESSION_PARAMETERS
DICTIONARY
DICT
COLS
IND
OBJ
TAB
DUAL

我想大家比较意外的是,我们居然支持了dict。其实之前做Oracle DBA的时候,就给同事分享过一个小技巧。很多小伙伴之前记不住Oracle这么多的视图名称,要去翻文档,实际上完全可以模糊查询dict 就行了。简直不要太方便。这里我给大家举个例子:

[omm@mogdb1 compat-tools-master]$ gsql -r -d test
gsql ((MogDB 5.0.5 build b77f1a82) compiled at 2023-12-08 03:11:47 commit 0 last mr 1804 )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.test=# \dtList of relationsSchema |        Name        | Type  | Owner |                       Storage                        
--------+--------------------+-------+-------+------------------------------------------------------public | mogdb_sql_bypass_1 | table | omm   | {orientation=row,compression=no}public | t1                 | table | omm   | {orientation=row,compression=no,storage_type=USTORE}public | t2                 | table | omm   | {orientation=row,compression=no}public | test_incresort_1   | table | omm   | {orientation=row,compression=no}public | tt                 | table | omm   | {orientation=row,compression=no}
(5 rows)test=# select table_name from dict where table_name like '%PRIVILEGE%';table_name           
-------------------------------GS_AUDITING_PRIVILEGEGS_DB_PRIVILEGESCOLUMN_PRIVILEGESROUTINE_PRIVILEGESTABLE_PRIVILEGESUDT_PRIVILEGESUSAGE_PRIVILEGESDATA_TYPE_PRIVILEGESGS_DB_PRIVILEGEGS_AUDITING_POLICY_PRIVILEGES
(10 rows)test=# test=# select* from compat_tools.dba_segments where segment_name=upper('tt');owner  | segment_name | partition_name | segment_type | tablespace_name |   bytes   | blocks 
--------+--------------+----------------+--------------+-----------------+-----------+--------PUBLIC | TT           |                | TABLE        | DEFAULT         | 352329728 |  43009
(1 row)test=# select file_name,tablespace_name,file_id,relative_fno,blocks,status,online_status from compat_tools.dba_data_files limit 10;file_name             | tablespace_name | file_id | relative_fno | blocks |  status   | online_status 
-----------------------------------+-----------------+---------+--------------+--------+-----------+---------------/opt/mogdb/data/base/273133/15354 | PG_DEFAULT      |    1247 |         1247 |     27 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15468 | PG_DEFAULT      |    1259 |         1259 |     52 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15448 | PG_DEFAULT      |    1249 |         1249 |    185 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15452 | PG_DEFAULT      |    1255 |         1255 |    196 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15461 | PG_DEFAULT      |    7815 |         7815 |      0 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15356 | PG_DEFAULT      |    2703 |         2703 |      6 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15357 | PG_DEFAULT      |    2704 |         2704 |     10 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15450 | PG_DEFAULT      |    2658 |         2658 |     55 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15451 | PG_DEFAULT      |    2659 |         2659 |     36 | AVAILABLE | ONLINE/opt/mogdb/data/base/273133/15454 | PG_DEFAULT      |    2836 |         2836 |      8 | AVAILABLE | ONLINE
(10 rows)test=# 

这样大家用起来,是不是感觉就比较符合Oracle DBA的日常习惯了?

MogDB 兼容Oracle gv的动态性能视图有哪些?

Oracle动态性能视图对我们分析故障、优化数据库性能无疑是利器,就我个人目前所了解的近10种数据库来讲,Oracle在这方面的强大,仍然是无出其右。

本质像Oracle学习的态度,我们也兼容了部分性能视图,希望能够让DBA们能快速去定位和发现问题。

GV$DATABASE 
GV$INSTANCE
GV$DATAFILE
GV$LOCK
GV$PARAMETER
GV$PARAMETER_VALID_VALUES
GV$SESSION
GV$SESSTAT
GV$SPPARAMETER
GV$SYSSTAT
GV$TABLESPACE
GV$VERSION
GV$NLS_PARAMETERS
GV$NLS_VALID_VALUES
GV$SYSTEM_WAIT_CLASS
GV$SQL
GV$OPTION
GV$LICENSE
GV$STATNAME
GV$MYSTAT
V$DATABASE 
V$INSTANCE                                       
V$DATAFILE                                       
V$LOCK                                           
V$PARAMETER                                      
V$PARAMETER_VALID_VALUES                         
V$SESSION                                        
V$SESSTAT                                        
V$SPPARAMETER                                    
V$SYSSTAT                                        
V$TABLESPACE                                     
V$VERSION                                        
V$NLS_PARAMETERS                                 
V$NLS_VALID_VALUES                               
V$SYSTEM_WAIT_CLASS                              
V$SQL                                            
V$OPTION                                         
V$LICENSE                                        
V$STATNAME                                       
V$MYSTAT 

当然,目前我们兼容还在不断增强,如果大家在使用过程中发现一些问题或者有新的需求想法,都可以告诉我们。 实际上上述的一些视图中,我认为可能最常用的就是vLock,v$sql等几个视图了。

test=# select sid,serial#,username,status,machine,program,logon_time,blocking_session_status,event from compat_tools.v$session limit 10;sid       | serial# | username | status | machine |        program         |          logon_time           | blocking_session_status | event 
-----------------+---------+----------+--------+---------+------------------------+-------------------------------+-------------------------+-------139629065926400 |       0 | omm      | active |         | gsql                   | 2024-06-11 18:25:12.472399+08 | NOT IN WAIT             | none139633275959040 |       0 | omm      | idle   |         | WLMArbiter             | 2024-06-05 22:05:22.69227+08  | NOT IN WAIT             | none139633304270592 |       0 | omm      | idle   |         | WorkloadMonitor        | 2024-06-05 22:05:22.686512+08 | NOT IN WAIT             | none139633329436416 |       0 | omm      | active |         | workload               | 2024-06-05 22:05:22.685468+08 | NOT IN WAIT             | none139633633523456 |       0 | omm      | active |         | PercentileJob          | 2024-06-05 22:05:22.620672+08 | NOT IN WAIT             | none139633590531840 |       0 | omm      | active |         | Asp                    | 2024-06-05 22:05:22.61905+08  | NOT IN WAIT             | none139633729992448 |       0 | omm      | idle   |         | TxnSnapCapturer        | 2024-06-05 22:05:22.577808+08 | NOT IN WAIT             | none139633567397632 |       0 | omm      | idle   |         | statement flush thread | 2024-06-05 22:05:22.617195+08 | NOT IN WAIT             | none139633656067840 |       0 | omm      | idle   |         | WDRSnapshot            | 2024-06-05 22:05:22.625884+08 | NOT IN WAIT             | none139633702205184 |       0 | omm      | idle   |         | CfsShrinker            | 2024-06-05 22:05:22.576739+08 | NOT IN WAIT             | none
(10 rows)test=# 
test=# select sql_id,parsing_schema_name,cpu_time,db_time,executions,buffer_gets,disk_reads,rows_processed from compat_tools.v$sql limit 10;sql_id   | parsing_schema_name | cpu_time  |  db_time  | executions | buffer_gets | disk_reads | rows_processed 
------------+---------------------+-----------+-----------+------------+-------------+------------+----------------2550485021 | omm                 |  43771320 |  48290679 |        846 |     1726791 |         33 |         1766713733824374 | omm                 |      2303 |      2339 |         24 |          24 |          0 |              01281210063 | omm                 |      7339 |   1007397 |          1 |           0 |          0 |              03078959359 | omm                 | 322706803 | 322999653 |          1 |    81185207 |     537114 |              0547100316 | omm                 |         0 |         0 |          0 |           0 |          0 |              0521895001 | omm                 |     18059 |     19092 |          2 |           0 |          0 |              02576472348 | omm                 |      2176 |      2564 |          3 |         162 |          1 |              31219338790 | omm                 |       921 |      1279 |          1 |          28 |          4 |              02118969015 | omm                 |     40492 |     41153 |         55 |         159 |          6 |           1320332229841 | omm                 |   9649810 |  13303484 |        846 |      402132 |       1804 |              0
(10 rows)

MogDB 兼容Oracle的SQL语法有哪些?

MogDB对于Oracle 的兼容,我认为最为主要的就是这部分内容,实际上也是做的比较多的部分,内容太多,但是又不太好分类,这里我就简单罗列一下:

MogDB 支持 Oracle 的 insert all语法.
MogDB 支持 Oracle游标 CURRENT OF cursor语法
MogDB 支持 INSERT ON CONFLICT DO UPDATE/DO NOTHING语法及其功能
MogDB 支持 Oracle PL/SQL中的subtype 语法
MogDB 支持 对存储过程中扩展数组的extend语法的参数传入数组的count属性
MogDB 支持 聚合函数+KEEP子句
MogDB 支持 创建自定义type数组
MogDB 兼容Oracle ORDER BY +DISTINCT
MogDB 兼容Oracle ORDER BY +使用数字代替投影列
MogDB 兼容Oracle ORDER BY +使用常量字符串
MogDB 兼容Oracle ORDER BY + 多列、表达式、聚集函数
MogDB 兼容Oracle GROUP BY 中含空字符串
MogDB 兼容Oracle GROUP BY中使用整数常量
MogDB 兼容Oracle GROUP BY字符串和表达式
.....

实际上还有很多兼容性功能,就不再一一列举了,更多详细情况可以参考官方文档。

企业客户异构迁移实战分享

最后给大家分享前段时间部门同事所做的一个Oracle to MogDB异构迁移改造实战的案例吧。总的来讲我认为这个难度不大。

如果要单纯的去看兼容度,老实说,从这个例子来看,应该99%了。说自家数据库兼容性很高,很多人一定会跳出来质疑,你这个系统是不是也太简单了点? 因此我又找同事分享了一个例子,xxx金融行业的,这里我就打码了。

这个可能是今年见过最为复杂的系统了,Oracle存储过程和包居多,真的是Oracle超级重度使用用户。有人可能会说,你这里看上去兼容性大概也就80%不到呀。开始看这个数据我也有疑惑,后面同事反馈之前迁移数据时漏掉了一个schema,因此很多依赖失效,导致不少失败了。最终版本报告没有拿到,但是据反馈能到存储过程和package的兼容度能达到 90%左右。

其次我要说明一下的是,兼容性实际上跟系统复杂度有关,我们需要建立这个一个认知。

当然上面提到的一些迁移工具比如MTK、MDB等大家都可以去www.mogdb.io上面下载使用。

这篇关于难以置信!这个国产数据库跟Oracle的兼容性高达99%.....的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1051723

相关文章

Spring Security基于数据库验证流程详解

Spring Security 校验流程图 相关解释说明(认真看哦) AbstractAuthenticationProcessingFilter 抽象类 /*** 调用 #requiresAuthentication(HttpServletRequest, HttpServletResponse) 决定是否需要进行验证操作。* 如果需要验证,则会调用 #attemptAuthentica

MySQL数据库宕机,启动不起来,教你一招搞定!

作者介绍:老苏,10余年DBA工作运维经验,擅长Oracle、MySQL、PG、Mongodb数据库运维(如安装迁移,性能优化、故障应急处理等)公众号:老苏畅谈运维欢迎关注本人公众号,更多精彩与您分享。 MySQL数据库宕机,数据页损坏问题,启动不起来,该如何排查和解决,本文将为你说明具体的排查过程。 查看MySQL error日志 查看 MySQL error日志,排查哪个表(表空间

国产游戏崛起:技术革新与文化自信的双重推动

近年来,国产游戏行业发展迅猛,技术水平和作品质量均得到了显著提升。特别是以《黑神话:悟空》为代表的一系列优秀作品,成功打破了过去中国游戏市场以手游和网游为主的局限,向全球玩家展示了中国在单机游戏领域的实力与潜力。随着中国开发者在画面渲染、物理引擎、AI 技术和服务器架构等方面取得了显著进展,国产游戏正逐步赢得国际市场的认可。然而,面对全球游戏行业的激烈竞争,国产游戏技术依然面临诸多挑战,未来的

深入理解数据库的 4NF:多值依赖与消除数据异常

在数据库设计中, "范式" 是一个常常被提到的重要概念。许多初学者在学习数据库设计时,经常听到第一范式(1NF)、第二范式(2NF)、第三范式(3NF)以及 BCNF(Boyce-Codd范式)。这些范式都旨在通过消除数据冗余和异常来优化数据库结构。然而,当我们谈到 4NF(第四范式)时,事情变得更加复杂。本文将带你深入了解 多值依赖 和 4NF,帮助你在数据库设计中消除更高级别的异常。 什么是

DM8数据库安装后配置

1 前言 在上篇文章中,我们已经成功将库装好。在安装完成后,为了能够更好地满足应用需求和保障系统的安全稳定运行,通常需要进行一些基本的配置。下面是一些常见的配置项: 数据库服务注册:默认包含14个功能模块,将这些模块注册成服务后,可以更好的启动和管理这些功能;基本的实例参数配置:契合应用场景和发挥系统的最大性能;备份:有备无患;… 2 注册实例服务 注册了实例服务后,可以使用系统服务管理,

速了解MySQL 数据库不同存储引擎

快速了解MySQL 数据库不同存储引擎 MySQL 提供了多种存储引擎,每种存储引擎都有其特定的特性和适用场景。了解这些存储引擎的特性,有助于在设计数据库时做出合理的选择。以下是 MySQL 中几种常用存储引擎的详细介绍。 1. InnoDB 特点: 事务支持:InnoDB 是一个支持 ACID(原子性、一致性、隔离性、持久性)事务的存储引擎。行级锁:使用行级锁来提高并发性,减少锁竞争

Oracle type (自定义类型的使用)

oracle - type   type定义: oracle中自定义数据类型 oracle中有基本的数据类型,如number,varchar2,date,numeric,float....但有时候我们需要特殊的格式, 如将name定义为(firstname,lastname)的形式,我们想把这个作为一个表的一列看待,这时候就要我们自己定义一个数据类型 格式 :create or repla

开源分布式数据库中间件

转自:https://www.csdn.net/article/2015-07-16/2825228 MyCat:开源分布式数据库中间件 为什么需要MyCat? 虽然云计算时代,传统数据库存在着先天性的弊端,但是NoSQL数据库又无法将其替代。如果传统数据易于扩展,可切分,就可以避免单机(单库)的性能缺陷。 MyCat的目标就是:低成本地将现有的单机数据库和应用平滑迁移到“云”端

ORACLE 11g 创建数据库时 Enterprise Manager配置失败的解决办法 无法打开OEM的解决办法

在win7 64位系统下安装oracle11g,在使用Database configuration Assistant创建数据库时,在创建到85%的时候报错,错误如下: 解决办法: 在listener.ora中增加对BlueAeri-PC或ip地址的侦听,具体步骤如下: 1.启动Net Manager,在“监听程序”--Listener下添加一个地址,主机名写计

Oracle Start With关键字

Oracle Start With关键字 前言 旨在记录一些Oracle使用中遇到的各种各样的问题. 同时希望能帮到和我遇到同样问题的人. Start With (树查询) 问题描述: 在数据库中, 有一种比较常见得 设计模式, 层级结构 设计模式, 具体到 Oracle table中, 字段特点如下: ID, DSC, PID; 三个字段, 分别表示 当前标识的 ID(主键), DSC 当