要为事务功能考虑哪个数据库 [英] Which database to consider for transactional functions
问题描述
我正在设计会计业务软件。起初我以为我打算使用MySql作为后端。但是,经过几天的工作,我发现很难处理MySql的交易。
Ado.net的MySql连接器没有很好地实现此目的(我可以看到,个人经验)。它们甚至没有打开或关闭自动提交功能。这是我看到的最大缺点。您必须在查询本身启动事务以关闭事务的自动提交,而不是从前端处理事务。
这对我来说是一个开销。
我使用MySql,因为它是开源的,我有很好的使用经验。
现在,请让我知道我对MySql的关注是否错误,或者我应该切换到其他RDBMS。
我尝试过:
尝试使用谷歌搜索一个好帖子但没找到一个。
I am designing an accounting business software. At first thought I planned to use MySql as backend. But, after a few days of work, I found that its really tough to deal with MySql for transactions.
MySql connector for Ado.net is not implemented well for this purpose (as I can see, personal experience). They do not even have a function to set autocommit on or off. Which is the biggest drawback I see. You got to start the transaction in the query itself to turn off autocommit for transactions instead of handling transactions from frontend.
It is becoming an overhead for me.
I used MySql as it is open source and I had good experience with it.
Now, please let me know if I am wrong in my concerns about MySql or I should switch to other RDBMS.
What I have tried:
Tried googling for a good post but havent found one.
推荐答案
我有点偏见但我会建议研究SQL Server。
I'm a little biased but I would suggest looking into SQL Server.
- 从免费到所有铃声和口哨的几个版本
- 完全支持交易
- 完整.Net库支持
- 2016版本性能与Oracle相当
- T-SQL更易于使用 纯粹意见
使用事务的例子wi SQL Server和.Net
Example of using transactions with SQL Server and .Net
SqlConnection conn = new SqlConnection(_connectionString);
try
{
conn.Open();
SqlTransaction trans = conn.BeginTransaction(); // BEGIN TRANSACTION
SqlCommand = new SqlCommand() { Connectin = conn, CommandType = SqlCommandType.StoredProcedure };
// assign command parameters and execute the statement....
trans.Commit(); // COMMIT TRANSACTION
}
catch(SqlException)
{
trans.Rollback(); //ROLLBACK TRANSACTION
}
这篇关于要为事务功能考虑哪个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!