将构建使用SQL Server数据库文件(MDF)是一个可怕的想法的应用程序? [英] Would building an application using a Sql Server Database File (mdf) be a terrible idea?

查看:126
本文介绍了将构建使用SQL Server数据库文件(MDF)是一个可怕的想法的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的辅助项目,这将是一个简单的Web应用程序,以保持类和他们即将推出的时间表列表。

I'm working on a side project that would be a simple web application to maintain a list of classes and their upcoming schedules.

我真的想使用LINQ to SQL的这个项目,但不幸的是我开发仅用于服务器环境有MySQL的使用。我和亚音速短暂涉足,但它只是不把工作做好。

I would really like to use Linq to SQL for this project, but unfortunately the server environment I'm developing for only has MySql available. I've dabbled briefly with Subsonic but it just doesn't get the job done.

此应用程序的数据库的要求是不是很大,虽然如此,我很好奇,如果在使用的App_Data一个MDF文件将是一个可行的解决方案。否则,它显示我将不得不手工,我要不惜一切代价避免code SQL查询。

The database requirements for this application aren't that great, though, so I'm curious if using an MDF file in App_Data would be a workable solution. Otherwise, it appears I'm going to have to hand-code sql queries which I want to avoid at all costs.

推荐答案

我早已完成这促使这个问题,但最近我有另一个项目具有非常小的数据需求来沿线的项目,所以我花了一些更多的时间尝试用这个。

I've long since completed the project which prompted this question, but recently I've had another project come along with very minor data requirements, so I spent some more time experimenting with this.

我曾以为,Sql Server的前preSS要求授权费用部署,但这不是事实也确实如此。据微软的网站上,你可以自由地与一定的限制使用它:

I had assumed that Sql Server Express required licensing fees to deploy, but this is not in fact the case. According to Microsoft's website, you are free to use it with certain restrictions:


  • 最大数据库大小:4 GB

  • 使用的最大内存:1 GB

  • 使用
  • 最大的CPU:1(完整的特效,而不是核心)

SQL Server精简是Web应用程序是一个坏主意,因为它需要一个黑客攻击,使其工作,它不是专为你需要为网络的并发访问。但是,如果你的应用程序可以在SQL Server防爆preSS的适度限制区中,它的工作原理pretty好。而且,由于它经常讲的T-SQL像其较大的兄弟姐妹,你可以使用LINQ与它的SQL。

Sql Server Compact is a bad idea for web applications because it requires a hack to make it work, and it isn't built for the concurrent access you'd need for the web. But if your application can fit within the modest limitations of Sql Server Express, it works pretty well. And since it speaks regular T-SQL like its larger siblings, you can use Linq to SQL with it.

我听说 LINQ到SQL支持,现在在2.6版本Mono的树干,所以L2S紧耦合到SQL Server可能会在不久的将来,一个有争议的问题。我将在最后端起我的code使用Mono的优越LINQ到SQL实现我选择的数据库,或者去另一条路线完全(因为我去年尝试了亚音速已经突飞猛进的提高)。但暂且时,SQL Server防爆preSS是非常小的数据库驱动的应用程序的有效选择。

I hear that Linq to Sql support is now in the Mono trunk for the 2.6 release, so L2S' tight-coupling to Sql Server will likely be a moot point in the near future. I will either end up porting my code to use Mono's superior Linq to Sql implementation on the db of my choice, or go another route entirely (SubSonic has improved by leaps and bounds since I last tried it). But for the time being, Sql Server Express is a valid choice for very small database-driven apps.

这篇关于将构建使用SQL Server数据库文件(MDF)是一个可怕的想法的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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