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提交。