您的位置:首页 > Web前端

Beginning ASP.NET 3.5 in C# 2008 From Novice to Professional Second Edition(ASP.NET 3.5(C#2008)入门 )翻译-第十章(2)

2008-10-29 11:01 676 查看

Configuring Your Database

Before you can run any data access code, you need a database server to take your command. Although there are dozens of good options, all of which work equally well with ADO.NET(and require essentially the same code), a significant majority of ASP.NET applications use Microsoft SQL Server.
配置您的数据库
在您可以运行任何数据访问代码之前,您需要一个数据库服务器以执行你的命令。 虽然有几十个好办法,但这里边做的最好的是使用ADO.NET (和要求基本相同的代码),有相当多数的ASP.NET应用程序使用微软的SQL Server 。
This chapter includes code that works with SQL Server 7 or later, although you can easily adapt the code to work with other database products. Ideally you’ll use SQL Server 2005 (with Service Pack 2) or SQL Server 2008. Microsoft is phasing out older versions, and they don’t have support for Windows Vista and Windows Server 2008.
本章包括的代码,运行在SQL Server 7或更高版本,但您可以很容易地改写代码运行在与其他数据库产品上。理想情况下您可以使用SQL Server 2005的(Service Pack 2中)或SQL Server 2008。微软正在逐步淘汰旧版本,因为他们不再支持Windows Vista和Windows Server 2008 。
If you don’t have a full version of SQL Server, there’s no need to worry—you can simply install the free SQL Server Express Edition (as described in the next section). It includes all the database features you need to develop and test a web application.
如果您没有完整版本的SQL Server ,没有必要担心,您只需安装免费的SQL Server Express版(如本文的下一节描述的) 。它包括所有的你需要开发和测试一个web应用程序的数据库功能。

Note:This chapter (and the following two chapters) use examples drawn from the pubs and Northwind databases, which are sample databases included with some versions of Microsoft SQL Server. These databases aren’t preinstalled in all versions of SQL Server, and they’re noticeably absent from SQL Server 2005. However, you can easily install them using the scripts provided with the online samples. See the readme.txt file for full instructions.
注:本章(和下面的两章)使用的例子取自pubs 和Northwind数据库,这是示例数据库,包含在微软的SQL Server某些版本中。这些数据库没有预装在所有版本的SQL Server中 ,他们明显不在SQL Server 2005中。

然而,您可以用网上提供的样品脚本轻松地安装使用。见Readme.txt 文件的说明。

SQL Server Express

If you don’t have a test database server handy, you may want to use SQL Server 2005 Express Edition, the free data engine included with some versions of Visual Studio and downloadable separately.
如果你手边没有一个测试数据库服务器,您可能要使用SQL Server 2005 Express 版,免费数据引擎包括Visual Studio某些版本的和单独的可下载的版本。
SQL Server Express is a scaled-down version of SQL Server 2005 that’s free to distribute. SQL Server Express has certain limitations—for example, it can use only one CPU and a maximum of 1GB of RAM; databases can’t be larger than 4GB; and graphical tools aren’t included. However, it’s still remarkably powerful and suitable for many midscale websites. Even better, you can easily upgrade from SQL Server Express to a paid version of SQL Server if you need more features later. For more information about SQL Server 2005 Express or to download it,
refer to http://www.microsoft.com/sql/editions/express. SQL Server Express的是一个缩小版本的SQL Server 2005的免费分发。SQL Server Express的具有一定的局限性,例如,它可以只使用一个CPU和一个最高1GB的RAM ;数据库不能大于4GB;和图形工具不包括在内。 但是,它仍然非常强大,适合许多中等网站。更好的是,如果您需要后者更多的功能,您可以轻松地升级到SQL Server Express的一个付费版本的SQL Server。如需有关SQL Server 2005 Express的更多信息或下载,请参考http://www.microsoft.com/sql/editions/express 。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐