Posted By : Josmy Thomas
Posted On : 15 December 2014
Keywords : Code4Beginner,Beginner,Creation of database and MDF files in SQL,database and MDF files,MDF files in SQL

Creation Of Database And MDF Files In SQL

In This Article , We Will Give You A Brief Idea About Creation Of Database And MDF Files Using Visual Studio



Step 1: Open the Microsoft Visual Studio Express Edition .
Click on file and select 'New Project' from that window.



Step 2: Now we are creating a web application , choose 'web' and ASP.NET Web Application from the corresponding window.Type the name and choose the location and finally click on 'OK'.



Step 3: Select 'Web API' as template and choose 'No Authentication' then click 'OK' to create.



Step 4: From the solution explorer , right click on the App_Data and choose 'Add' from that and again choose the 'New item' from that window.



Step 5: Now we are going to create new database, For that select 'Data' from the left side and SQL Server Database from the window and click on 'Add' button.



Step 6: Now the database is created as student.mdf and adding tables in to it by right clicking on the 'Table'.



Step 7: We can then add the feilds in to the table and kept the Is Identity as true.



Step 8: After adding all the feilds click on 'update'and then click on 'update database'.



Step 9: LikeWise we can add any no. of tables.



Step 10: Refresh the tables , we can see the tables that we created.





Josmy Thomas

I am a Software Developer at Leedhar Technologies