SQL Server file types

Source: Internet
Author: User
SQL Server database File types
The database is stored on disk as a file, consisting of data files and transaction log files, and a database should contain at least one data file and one transaction log file.
The database is created on the NTFS partition of a physical medium (such as a hard disk) or on one or more files of a FAT partition, which pre-allocates the physical storage space that will be used by the data and transaction logs. The file that stores the data is called a data file, and the data file 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 creating a new database, you simply create a "shell," you must create an object (such as a table) in this "shell" before you can use the database.
The SQLSERVER2008 database has the following four types of files
• Master data file: The master data file contains the startup information of the database, points to other files in the database, each database has a master data file, and the file name extension of the master data file is. mdf.
• Secondary (secondary) data files: All other data files except the master data file are secondary data files, some databases may not contain any secondary data files, and some databases contain multiple secondary data files, and the file name extension for secondary data files is. ndf.
• Transaction log file: Contains information that restores all transaction logs for the database. Each database must have at least one transaction log file and, of course, more than one, and the recommended file name extension for the transaction log file is. ldf.
• File Stream (Filestream): Enables SQL Server-based applications to store unstructured data, such as documents, pictures, audio, etc., in a file system, which mainly integrates the SQL Server database engine with the new technology file System (NTFS). It stores data primarily in the varbinary (max) data type.

SQL Server file types

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.