简体   繁体   English

SQL Server Express / MS Access LINQ功能,要使用哪一个?

[英]SQL Server Express / MS Access LINQ Features, Which One to Use?

I have a few ASP.Net database front-end websites where MS Access is the back-end. 我有一些ASP.Net数据库前端网站,其中MS Access是后端。 I am trying to use ASP.Net dynamic data website. 我正在尝试使用ASP.Net动态数据网站。 Should I change this database to SQL Server Express or something else to make it easier or should this work from with MS Access. 我是否应该将此数据库更改为SQL Server Express或其他使其更容易使用的数据库,或者应通过MS Access来使用。

Pick SQL Express for these reasons: 选择SQL Express的原因如下:

  1. Scaling : MS Access will never scale. 缩放 :MS Access将永远不会缩放。 Once you get over about 10 concurrent connections you will start to see trouble. 一旦超过10个并发连接,您将开始遇到麻烦。 SQL Express will scale. SQL Express将扩展。 You can always move SQL Express up to a full-blow SQL Server installation. 您始终可以将SQL Express升级到完整功能的SQL Server安装。 While this is somewhat true of Access, some of your SQL statements and data types may not transfer cleanly. 尽管Access确实如此,但是某些SQL语句和数据类型可能无法干净地传输。
  2. Security : SQL Server has a much better security model than Access. 安全性 :SQL Server具有比Access更好的安全模型。 You can lock down the schema in your db per user. 您可以在每个用户的数据库中锁定模式。 You can also better administrate user access (think dev user vs test user vs production user). 您还可以更好地管理用户访问权限(例如,开发用户,测试用户与生产用户)。
  3. Performance : This is similar to scaling. 性能 :这类似于缩放。 If you see a traffic spike to your web site, Access may not handle it while SQL Server Express probably will. 如果您看到网站的流量激增,则Access可能不会处理它,而SQL Server Express可能会处理。
  4. Tools : Tools and libraries like LINQ are always going to be targeted at SQL Server. 工具 :诸如LINQ之类的工具和库始终将针对SQL Server。 You will get better support and better documentation using them this way. 通过这种方式,您将获得更好的支持和更好的文档。

A Jet back end will work fine for mostly read-only websites, even ones with decent traffic. Jet后端对于大多数只读网站(即使是流量不错的网站)也能正常工作。 Michael Kaplan's old website, http://trigeminal.com , uses a Jet database as the back end, and back when it was his primary site (he's since been hired by Microsoft), he said it was getting over 100K hits per day, and was holding up just fine. 迈克尔·卡普兰(Michael Kaplan)的旧网站http://trigeminal.com使用Jet数据库作为后端,而当它是他的主要网站(自从他被Microsoft聘用)回来时,他说每天的访问量超过10万,并保持良好。

For read/write operations, Jet will begin to bog down on a website about the same place it would bog down in a multi-user LAN application, at somewhere between 20 and 50 simultaneous connections, depending on your app's design. 对于读/写操作,Jet将开始在网站上停留与在多用户LAN应用程序中停留相同的位置,具体取决于您应用程序的设计,同时连接20到50个之间。

For what it's worth, even though I'm a professional Access developer and know Jet very, very well, I don't use Jet as a back end for any of my websites. 就其价值而言,即使我是一名专业的Access开发人员并且非常非常了解Jet,但我并没有将Jet用作我的任何网站的后端。 That's not so much because I don't like Jet for websites, but because I don't like Windows for a web server -- I'm an Apache supporter (and PHP developer), and host all my websites (and my clients' as well) on non-Windows hosting services (presently all of them are Linux, but that wasn't always the case). 并不是因为我不喜欢Jet用于网站,而是因为我不喜欢Windows用于网络服务器-我是Apache支持者(和PHP开发人员),并且托管我所有的网站(和我的客户)以及在非Windows托管服务上(目前所有服务都是Linux,但并非总是如此)。 All the website databases I have ever done use MySQL for the back end. 我曾经做过的所有网站数据库都使用MySQL作为后端。

In short, find out what your host offers in terms of database back ends and choose the best one. 简而言之,找出主机在数据库后端方面提供的内容,然后选择最佳的主机。 I can't imagine a host that provides ASP.NET that would not offer SQL Server, and that's definitely what I'd go with in that situation. 我无法想象提供不提供SQL Server的ASP.NET主机,这绝对是我在这种情况下需要使用的主机。 It would be easy enough to upsize your Jet back end to SQL Server on your local PC, and then do a backup that you could import to your website. 将您的Jet后端升级到本地PC上的SQL Server,然后进行备份以导入到您的网站就足够了。

You can use LINQ to DataSets to use Linq against an Access .mdb or .accdb database. 您可以使用LINQ to DataSet来对Access .mdb或.accdb数据库使用Linq。

You can read more at http://msdn.microsoft.com/en-us/library/bb386977.aspx and http://blogs.msdn.com/adonet/archive/2007/01/26/querying-datasets-introduction-to-linq-to-dataset.aspx 您可以在http://msdn.microsoft.com/zh-cn/library/bb386977.aspxhttp://blogs.msdn.com/adonet/archive/2007/01/26/querying-datasets-introduction中了解更多信息到linq到dataset.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM