Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What .sdf files. How it is different from .mdf files. Does it work with linq to Sql?

Tags:

sql-server

wpf

I am playing with wpf and when i have created database it is created with the .sdf files. I want to know details of .sdf files. How it is different then the standard .mdf files and will they support linq to sql? Because i am not able to use it with linq files.

like image 767
Jalpesh Vadgama Avatar asked May 03 '09 19:05

Jalpesh Vadgama


People also ask

What is the difference between SDF and MDF?

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

What are SDF files used for?

sdf”, “SD File”, or just an “SDF” • SD Files have an “. sdf” file extension SD Files encode chemical structure data using the molfile connection table format. This format depicts chemical structures using a block of text that lists the atoms, bonds, connectivity, and coordinates.

What is SDF file in SQL Server?

An SDF file contains a compact relational database saved in the SQL Server Compact (SQL CE) format, which is developed by Microsoft. It is designed for applications that run on mobile devices and desktops and contains the complete database contents, which may be up to 4GB in size.


1 Answers

An SDF file is a Sql Server Mobile file. It is also referred to as Sql Server compact. It is predominantly used in mobile development but recently more and more common in single user desktop developments as well.

Visual Studio 2008 does not support Linq to Sql for Sql Server Mobile but the Framework does. You can find out more on implementing this here

You can find more on Sql Server Mobile here. The link will also help explain the differences between this and Mdf's, used by Sql Server.

There is also an article on building a Linq to Sql model for Wpf using Sql Mobile/Compact here

One of the main differences between a Sdf and Mdf is that until recently an Mdf could not be opened and treated like a normal file, whereas an Sdf is accessed as a file. However in Visual Studio this concept was reproduced by allowing Sql Server Data files which dynamically attaches the Mdf to a Sql Server Express session.

like image 63
BinaryMisfit Avatar answered Sep 22 '22 15:09

BinaryMisfit