简体   繁体   中英

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. I am trying to use ASP.Net dynamic data website. Should I change this database to SQL Server Express or something else to make it easier or should this work from with MS Access.

Pick SQL Express for these reasons:

  1. Scaling : MS Access will never scale. Once you get over about 10 concurrent connections you will start to see trouble. SQL Express will scale. You can always move SQL Express up to a full-blow SQL Server installation. While this is somewhat true of Access, some of your SQL statements and data types may not transfer cleanly.
  2. Security : SQL Server has a much better security model than 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.
  4. Tools : Tools and libraries like LINQ are always going to be targeted at 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. 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.

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.

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. 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). All the website databases I have ever done use MySQL for the back end.

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. 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.

You can use LINQ to DataSets to use Linq against an Access .mdb or .accdb database.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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