的Windows 8和; MySQL的?我有什么选择? [英] Windows 8 & MySQL? What are my options?

查看:170
本文介绍了的Windows 8和; MySQL的?我有什么选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在写一个Metro应用,我想通过连接到我的网络SQL数据库集成管理SQL中我的应用程序处理。

I am currently writing a Metro application and I want to integrate managed SQL handling within my app by connecting it to my web SQL DB.

我有哪些选择.NET 4.5?

What are my options for .NET 4.5?

另外,如果你downvote,请解释原因,我知道有对.NET 4的一些MySQL的连接器,但它是明显的不兼容4.5

Also, if you downvote, please explain why, I know there is some MySQL connector for .NET 4, but it is obviously incompatible with 4.5

推荐答案

我强烈建议不要直接连接到数据库服务器在互联网上,由于以下原因,客户端程序:

I strongly advise against client programs connecting directly to a database server over the Internet, for the following reasons:

  • 在客户端库设计和周围的假设数据库是在几毫秒为单位了,尤其是非常健谈的协议(MSSQL是在这些)建成。短期操作可能需要相当长的时间作为一个结果。
  • 这是一个安全的责任,不仅是你公开你的数据库服务器到互联网,但你也嵌入在应用程序连接的详细信息(如密码)。
  • 在它不适合自己的可扩展性。如果你引入多个负载平衡或故障转移数据库服务器,你不得不重写你的客户端。
  • 它还假定不会有任何连接问题。许多网络(尤其是移动网络)限制活动端口80/443外prevent其网络的滥用(如僵尸用户发起攻击)。

在这种情况下,理想的解决办法是建立一个Web服务前端数据库;您的应用程序然后将接口与网络服务,而不是你的数据库。这具有其他优点。

The ideal solution in these cases is to develop a web-service frontend for your database; your application would then interface with the web-service instead of your database. This has other advantages.

当然,客户(尤其是移动客户端),应使用一个数据高速缓存,因此应用程序将继续工作,当下线。

Of course, clients (especially mobile clients) should use a data cache so the application will continue to work when offline.

返回上话题:假设你还想去直接连接的话,我不明白为什么MySQL客户端库将不能在4.5工作。您可以修改程序集的清单/配置,使其运行在.NET CLR的未来版本(你只遇到的问题,如果说库使用,因为除去类型和成员或依赖于更改的行为,在.NET框架有为了向后和向前兼容了良好的信誉)。

Back on-topic: assuming you still want to go with a direct connection, then I don't see why the MySQL client library won't work on 4.5. You can modify an assembly's manifest/configuration so that it will run on future versions of the .NET CLR (you'll only run into problems if said library uses since-removed types and members or relies on changed behavior. The .NET framework has a good reputation for backwards and forwards compatibility).

这篇关于的Windows 8和; MySQL的?我有什么选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆