-4

Why and when to use .mdf file in asp.net c#.

What is the advantages and disadvantages of .mdf file and What is difference between .mdf file and orignal sqlserver database?

Waqas Ali
  • 1
  • 3

1 Answers1

2

Each database created in MSSQL Server (Whatever version, Express, Enterprise etc.) consists of two files. On that holds the definition of the tables and the data and the other that holds the activity of the users used the database. The mdf file is associated with the data and the definition of tables.

Hence there isn't any disadvantage or advantage. mdf files are core part of a database in the environment of MSSQL server.

Christos
  • 53,228
  • 8
  • 76
  • 108
  • why and when use this .mdf file – Waqas Ali Oct 22 '14 at 08:20
  • One use of the mdf files is to restore a database intially created on one server to another server. – Christos Oct 22 '14 at 08:22
  • when we deploy our project to server then sqlserver required for .mdf file? – Waqas Ali Oct 22 '14 at 08:23
  • If you are going to use the database that you have created in your development environment, yup, you have to use the mdf file in order to restore the database in your production environment. However. there are also other ways. Personally, in this case I would take a backup of the development database and then I would restore it in the production enviroment. – Christos Oct 22 '14 at 08:26