Every database has only one primary database file. The location of the primary database file is stored in the
master database (visible via the
filename column in the
sys.master_files view). When SQL Server opens a database, it looks for this file and then reads from the file information on the other files defined for the database.
The file extension for the primary database file defaults to
.mdf. The primary database file always belongs to the default filegroup. It is often sufficient to have only one database file for storing your tables and indexes (the primary database file). The file can, of course, be created on a RAID partition to help spread I/O. However, if you need finer control over placement of your tables across ...