Fastdb 几个模式之间的共用

FastDb 打开是一共有4个模式,分别是dbAllAccess,dbReadOnly,dbConcurrentUpdate,dbConcurrentRead

现假设有两个进程同时打开同一数据库,分别是A进程,B进程。(A用于操作,B用于查询)

其中如果A是dbAllAccess,B也是dbAllAccess:

1、可以同时打开

2、如果A先打开进行修改数据库操作,则B不能打开,直到A进行提交为止。

3、如果同时打开之后,A不能进行修改数据库操作,直到B关闭。


其中如果A是dbAllAccess,B是dbReadOnly:

1、可以同时打开

2、如果A先进行修改数据库操作,则B不能进行查询,直到A进行提交为止。

3、如果B先进行查询,则B不能进行更新,直到B关闭为止。


其中如果A是dbConcurrentUpdate,B是dbConcurrentRead:

1、可以同时打开

2、如果A先进行修改数据库操作,则B可以进行查询,不过查询的是原数据,除非A已提交。

3、如果B先进行查询,则A可以修改数据库操作,但是不能提交,直到B提交。

Title: The core of the big data solutions -- Map. Author: pengwenwei address: No.17-18 of XiangGangbatang Community, Xiangtan City of Hunan Province, China. Language: c++ Platform: Windows, linux Technology: Perfect hash algorithm Level: Advanced Description: A high performance map algorithm Section MFC c++ map stl SubSection c++ algorithm License: (GPLv3) Map is widely used in c++ programs. Its performance is critical to programs' performance. Especially in big data and the scenarios which can't realize data distribution and parallel processing. I have been working on big data analysis for many years in telecommunition and information security industry. The data analysis is so complicated that they can't work without map. Especially in information security industry, the data is much more complicated than others. For example, ip table, mac table, telephone numbers table, dns table etc. Currently, the STL map and Google's hash map are the most popular maps. But they have some disadvantages. The STL map is based on binary chop, which causes a bad performance. Google Hash map has the best performance at present, but it has probability of collision. For big data analysis, the collision probability is unacceptable. Now I would like to publish pwwMap. It includes three different maps for different scenarios: 1. Memory Map(memMap): It has a good access speed. But its size is limited by memory size. 2. Harddisk Map(diskMap): It utilizes hard disk to store data. So it could accept much more data than memory map. 3. Hashmap(hashMap): It has the best performance and a great lookup speed, but it doesn't have 'insert' and 'delete' functionality. MemMap and diskMap could be converted to hashMap by function memMap2HashMap and diskMap2HashMap. According to the test result, my algorithms' collision probability is zero. About performance, memMap has a comparable performance with google, and hashMap's performance is 100 times better than Google's hashmap. In summary, pwwhash are perfect hash algorithms with zero collision probability. You can refer to following artical to find the key index and compress algorithm theory: http://blog.csdn.net/chixinmuzi/article/details/1727195 Source code and documents: https://sourceforge.net/projects/pwwhashmap/files/?source=navbar
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值