数据库之间的差异 [英] difference between database

查看:82
本文介绍了数据库之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

plz告诉我本地数据库和服务器数据库有什么区别.
实际上,在我之前的项目中,我已经在sql server2005上创建了数据库,但是现在我需要创建本地数据库.我还想知道什么是本地数据库(.sdf)和基于服务的数据库(.mdf)

plz tell me what is the difference between local database and server database.
Actually in my previous project i have created database on sql server2005 and but now i need to create local database.I also want to know what is local database(.sdf) and service based database(.mdf)

推荐答案

基于服务的数据库是只能通过服务器访问的数据库.它使用MDF数据文件,该文件是SQL Server格式.为了能够连接到SQL Server数据库,SQL Server服务必须正在运行,因为它可以处理您的请求并访问数据文件.

本地数据库是仅在您的应用程序本地的数据库.它使用SDF数据文件,该文件是SQL Server CE(精简版)格式.无需安装服务器即可访问SDF数据库.您只需将构成SSCE的DLL与您的应用程序一起分发,然后直接访问数据文件.

通常,仅当您的应用仅访问数据并且数据量相对较小时,才使用SSCE.对于您的项目,您将使用SQL Server.出于测试目的,您可以使用免费的Express Edition.部署后,您可能仍使用SSEE或使用完整版本的SQL Server.请注意,Microsoft将SSEE包含在其自己的RMS POS软件中.不过,SSEE限于4GB的数据库,因此,即使您从使用SSEE开始并且可以处理负载,您将来仍可能必须根据数据容量进行升级.
A service-based database is a database that is only accessed through a server. It uses an MDF data file, which is SQL Server format. To be able to connect to a SQL Server database the SQL Server service must be running, because it''s that that processes your requests and access the data file.

A local database is one that is local to your application only. It uses an SDF data file, which is SQL Server CE (Compact Edition) format. There is no need to install a server to access an SDF database. You simply distribute the DLLs that constitute SSCE along with your app and access the data file directly.

You''d normally only use SSCE if the data was to be accessed by your app only and there was a relatively small amount of data. For your project you would use SQL Server. For testing purposes you can use the free Express Edition. When deployed you might still use SSEE or you might use a full version of SQL Server. Note that Microsoft include SSEE with their own RMS POS software. SSEE is limited to databases of 4GB though, so even if you start out with SSEE and it can handle the load, you may still have to upgrade at some point in the future based on data capacity.


SDF文件用于SQL Server Compact Edition(过去是SQL CE或SQL Mobile),

MDF文件适用于SQL Server Express或更高版本(常规SQL Server)

Compact Edition是用于嵌入移动和桌面应用程序的紧凑型数据库.我将SQL Express用于桌面应用程序,因为它提供了更多的功能,并且每个数据访问最多可提供10 GB的数据存储.

以下白皮书对两者进行了很好的比较,同样要根据您的要求选择.

http://download.microsoft.com/download/A /4/7/A47B7B0E-976D-4F49-B15D-F02ADE638EBE/Compact_Express_Comparison. [ ^ ]
SDF files are for SQL Server Compact Edition (SQL CE or SQL Mobile in past),

MDF file is for SQL Server Express or higher editions (Regular SQL Server)

Compact Edition is a compact database for embedding in mobile and desktop applications. I would use SQL express for desktop application since it offers more features and upto 10 GB of data storage per dataabse.

The following white paper provides an excellent comparision between both of them, again which one to choose depends on your requirements.

http://download.microsoft.com/download/A/4/7/A47B7B0E-976D-4F49-B15D-F02ADE638EBE/Compact_Express_Comparison.[^]


如果是远程数据库,客户端不需要在计算机上安装SQL实例.您可以创建与远程服务器的连接.并创建连接字符串,例如
In case of Remote database Clients do not need to install SQL instance on machine. You can create a connection with remote server.and make connection string like
Data Source=10.0.0.28;Initial Catalog=omxintranet_DEV;Integrated Security=true


如果是本地数据库,则需要在客户端计算机上安装SQL Server实例,并使用该实例创建连接字符串.


In case of local database ,You need to install SQL Server instance on client Machine.and use that instance to create connection string.

报价:

什么是本地数据库(.sdf)和基于服务的数据库(.mdf)

what is local database(.sdf) and service based database(.mdf)



.SDF文件用于SQL Server Compact Edition,而.MDF文件用于SQL Server数据库引擎数据文件.

参见
SQL Express .VS.精简版



.SDF file is for SQL Server Compact edition while .MDF is for SQL Server database engine data file.

See
SQL Express .VS. Compact edition


这篇关于数据库之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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