none
.SDF VS .MDF

    Question

  • Hi,

    I need detailed comparison of .mdf and .sdf. When  should I use .mdf and when .sdf ?

     

    Thanks, Bilal

    Sunday, June 26, 2011 9:30 AM

Answers

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

     

    >>I need detailed comparison of .mdf and .sdf

    I would rephrase your question as when should you use SQL Server Compact (Embedded editon) vs SQL Server Express etc.

    SQL Server Compact 4.0
    Individual Database file size is limited to 4 GB.
    Run in-process (Embedded) with an application.
    No FileStream support
    Limited to 256 concurrent connection.

    SQL Express 2008 R2

    Individual Database File size is limited to 10 GB
    Excluding user instance scenario it can be used as a standalone database
    Filestream and CLR Support.
    No limit on number of simultaneous connection.

     Also, SQL Server Compact has certain T-SQL related limitation, MSDN has detail comparision

    Usage:

    SQL Server Compact edition it targeted to be used for mobile phones, PDA's,
    Tablet PCs and Desktop applications.


    SQL Server Express edition can be used for both Web (Limited to 1 GB of RAM and Single CPU)  and Windows Desktop applications. Latest edition of SQL express  individual database file is limited to 10 GB.



    Sunday, June 26, 2011 11:42 AM

All replies

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

     

    >>I need detailed comparison of .mdf and .sdf

    I would rephrase your question as when should you use SQL Server Compact (Embedded editon) vs SQL Server Express etc.

    SQL Server Compact 4.0
    Individual Database file size is limited to 4 GB.
    Run in-process (Embedded) with an application.
    No FileStream support
    Limited to 256 concurrent connection.

    SQL Express 2008 R2

    Individual Database File size is limited to 10 GB
    Excluding user instance scenario it can be used as a standalone database
    Filestream and CLR Support.
    No limit on number of simultaneous connection.

     Also, SQL Server Compact has certain T-SQL related limitation, MSDN has detail comparision

    Usage:

    SQL Server Compact edition it targeted to be used for mobile phones, PDA's,
    Tablet PCs and Desktop applications.


    SQL Server Express edition can be used for both Web (Limited to 1 GB of RAM and Single CPU)  and Windows Desktop applications. Latest edition of SQL express  individual database file is limited to 10 GB.



    Sunday, June 26, 2011 11:42 AM
  • Which one is faster? I am more concerned about the performance.What If I use a multiple .sdf files in a small web application instead of using a single .mdf? Which one will be more faster for CRUD operations against a small web application?
    Monday, June 27, 2011 6:32 AM