什么是 MDF 文件?

2021-12-05 00:00:00 file database sql-server mdf

这是否像某种嵌入式"数据库?包含内置数据库的文件?

Is this like an "embedded" database of sorts? A file containing a built in database?

推荐答案

SQL Server 数据库使用两个文件 - 一个 MDF 文件,称为主数据库文件,其中包含架构和数据,以及一个 LDF 文件,其中包含日志.请参阅维基百科.数据库也可以使用辅助数据库文件,通常使用 .ndf 扩展名.

SQL Server databases use two files - an MDF file, known as the primary database file, which contains the schema and data, and a LDF file, which contains the logs. See wikipedia. A database may also use secondary database file, which normally uses a .ndf extension.

正如 John S. 所指出的,这些文件扩展名纯粹是约定俗成的 - 您可以使用任何您想要的,尽管我想不出这样做的充分理由.

As John S. indicates, these file extensions are purely convention - you can use whatever you want, although I can't think of a good reason to do that.

有关 MSDN 的更多信息此处和开始 SQL Server 2005 管理(Google 图书)

More info on MSDN here and in Beginning SQL Server 2005 Administation (Google Books) here.

相关文章