Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SQLServer file type

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

SQLServer database file type

The database is stored on disk in units of files and consists of data files and transaction log files. A database should contain at least one data file and one transaction log file.

The database is created on one or more files in the NTFS partition of the physical media, such as the hard disk, or on the FAT partition, which pre-allocates the physical storage space to be used by the data and transaction logs. The file in which data is stored is called a data file, which contains data and objects, such as tables and indexes. The file that stores the transaction log is called a transaction log file (also known as a log file). When you create a new database, you simply create an "empty shell" in which you must create objects (such as tables, etc.) before you can use the database.

SQLServer2008 databases have the following four types of files

Master data file: the master data file contains the startup information of the database, pointing to other files in the database, each database has a master data file, and the file extension of the master data file is .MDF.

Secondary (secondary) data files: all data files except the primary data file are secondary data files, some databases may not contain any secondary data files, while others contain multiple secondary data files with the file extension .ndf.

Transaction log file: contains information to recover all transaction logs in the database. Each database must have at least one transaction log file, and of course there can be more than one, and the recommended file extension for transaction log files is .ldf.

File stream (Filestream): it enables SQLServer-based applications to store unstructured data, such as documents, pictures, audio, etc., in the file system. File stream mainly integrates the SQLServer database engine and the new technology file system (NTFS). It mainly stores data in the varbinary (max) data type.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report