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.
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.
More info on MSDN here and in Beginning SQL Server 2005 Administation (Google Books) here.
发布评论
评论(2)
SQL Server 数据库使用两个文件 - 一个 MDF 文件(称为主数据库文件),其中包含架构和数据;以及一个 LDF 文件(包含日志)。 请参阅维基百科。 数据库还可以使用辅助数据库文件,该文件通常使用 .ndf 扩展名。
正如 John S. 所指出的,这些文件扩展名纯粹是约定俗成的 - 您可以使用任何您想要的扩展名,尽管我想不出这样做的充分理由。
有关 MSDN 的详细信息此处以及《Beginning SQL Server》 2005 管理(Google 图书)此处。
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.
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.
More info on MSDN here and in Beginning SQL Server 2005 Administation (Google Books) here.
只是为了让所有人都清楚这一点:
.MDF 文件“通常”是 SQL Server 数据文件,但重要的是要注意,它不一定是。
这是因为 .MDF 只是推荐/首选符号,但扩展名本身并不实际指示文件类型。
为了说明这一点,如果有人想要创建扩展名为 .gbn 的主数据文件,他们可以继续这样做,不会出现任何问题。
要限定首选命名约定:
非主要。
Just to make this absolutely clear for all:
A .MDF file is “typically” a SQL Server data file however it is important to note that it does NOT have to be.
This is because .MDF is nothing more than a recommended/preferred notation but the extension itself does not actually dictate the file type.
To illustrate this, if someone wanted to create their primary data file with an extension of .gbn they could go ahead and do so without issue.
To qualify the preferred naming conventions:
non Primary.