Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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)
Posted

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.
 
Share this answer
 
v2
Comments
Member 8233601 6-Apr-12 1:58am    
connection string for .sdf database
Member 8233601 6-Apr-12 2:18am    
how do i create connection with local database(.sdf),i mean connection string
uspatel 6-Apr-12 2:30am    
http://www.connectionstrings.com/sql-server-2005-ce
Member 8233601 6-Apr-12 2:37am    
while establishing connection with local database(.sdf) i am getting this error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

plz help..
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.[^]
 
Share this answer
 
Comments
Member 8233601 6-Apr-12 1:47am    
how would i knw which edition i have?i m working on visual studio 2008 and i dont want to create database on sql server 2005.
uspatel 6-Apr-12 2:04am    
try this link
http://support.microsoft.com/kb/321185
Member 8233601 6-Apr-12 2:10am    
how do i create connection with local database(.sdf)
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
C#
Data Source=10.0.0.28;Initial Catalog=omxintranet_DEV;Integrated Security=true

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

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


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

See
SQL Express .VS. Compact edition
 
Share this answer
 
Local data base:

contain information in your local machine.

Server data base;
u can access through your machine.but data contain in commom location (server)
 
Share this answer
 
v2
Comments
Member 8233601 6-Apr-12 2:23am    
how do i create connection with local database(.sdf),i mean connection string

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900