An MDF (Master Database File) is the primary data file used by Microsoft SQL Server to store a database’s schema and data. It contains all the essential information, including tables, views, stored procedures, indexes, and database configurations. Each SQL Server database has one MDF file, which serves as the main file for data storage.
In addition to the MDF file, a database may also include NDF (secondary data files) for additional storage and an LDF (log file) for transaction logs. MDF files are critical for database operations, and proper backups are essential to prevent data loss.