Creating User Defined Databases in SQL Server. As a user we can create a User Defined Database in SQL Server. This database can store tables, views, stored procedures, functions etc. Every database has got two files: a. MDF File This is the main data file in which data is stored. b. LDF File LDF primarily stores all the logs. Logs are nothing but recording of every activity going in the database like inserting, deleting, updating etc. for the purpose of backup and retrieval. The following command can be used to create a Database in SQL Server Management Studio. USE [master] GO CREATE DATABASE Test On Primary ( NAME = N'Test' , FILENAME = N'C:\Temp\Test.mdf' , SIZE = 167872 KB , MAXSIZE = UNLIMITED , FILEGROWTH = 16384 KB ) LOG ON ( NAME = N'Test_Log' , FILENAME = N'C:\Temp\Test_Log.ldf' ,