SQLServer is a relational database management system. It was initially developed by three companies, Microsoft Sybase and Ashton-Tate. In 1988, it launched the first version of OS2, after the launch of WindowsNT, Microsoft and Sybase split their respective ways in the Development of SQLServer. Microsoft transplanted SQLServer to WindowsNT.
SQL Server is a relational database management system. It was initially developed by Microsoft Sybase and Ashton-Tate, and launched the first OS/2 version in 1988, after the launch of Windows NT, Microsoft and Sybase split their ways in the Development of SQL Server. Microsoft transplanted SQL Server to Windows NT.
SQL Server is a relational management system. It was initially developed by Microsoft Sybase and Ashton-Tate, and launched the first OS/2 version in 1988, after the launch of Windows NT, Microsoft and Sybase split their ways in the Development of SQL Server. Microsoft transplanted SQL Server to Windows NT.
The Windows NT version Sybase, which focuses on the development and promotion of SQL Server, focuses more on the application of SQL Server on UNIX operating systems. This book introduces Microsoft SQL Server or ms SQL Server.
SQL Server 2000 is the latest version of SQL Server database management system released by Microsoft. This version inherits the advantages of SQL Server 7.0 and adds many more advanced functions than SQL Server, which is easy to use and scalable. high degree of integration with related software advantages can be used across a variety of platforms from laptops running Microsoft Windows 98 to large multi-processor running Microsoft Windows 2000.
The SQL Server 2000 database has three types of files:
Main data files
The main data file is the starting point of the database and points to other parts of the file in the database. Each database has a primary data file. The recommended file extension for main data files is. mdf.
Secondary data file
The secondary data file contains all data files except the primary data file. Some databases may have no secondary data files, while some databases have multiple secondary data files. The recommended file extension for secondary data files is. ndf.
Log Files
The log file contains all the log information required to restore the database. Each database must have at least one log file, but more than one. The recommended file extension for log files is. ldf.
SQL Server 2000 does not force the use of. mdf,. ndf, And. ldf file extensions, but we recommend that you use these extensions to help identify the purpose of a file.
Explanations in the help document
Files and file groups
Microsoft®SQL Server™2000 map a database with a set of operating system files. All data and objects (such as tables, stored procedures, triggers, and views) in the database are stored in the following operating system files:
Main
This file contains the database startup information and is used to store data. Each database has a primary data file.
Secondary
These files contain all the data that cannot be placed in the main data file. If the primary file can contain all the data in the database, the database does not need secondary data files. Some databases may be large enough to require multiple secondary data files, or expand data to multiple disks using secondary files located on different disk drives.
Transaction Log
These files contain the log information used to restore the database. Each database must have at least one log file.
For example, when creating a simple database for sales, you can use only one master file containing all data and objects and one log file containing transaction log information. Another scenario is that when creating more complex database orders, you can use a primary file and five secondary files. The data and objects in the database are extended to all six files, there are also four log files containing transaction log information.
File groups allow you to group files for management and data distribution/placement. For example, you can create three files (Data1.ndf, Data2.ndf, and Data3.ndf) on the three hard drive and assign these files to the file group fgroup1. Then, you can explicitly create a table in the file group fgroup1. The query of data in the table is distributed to three disks, thus improving the performance. Creating a single file in a RAID (Redundant Array of Independent Disks) strip can also achieve the same performance improvement. However, files and file groups allow you to easily add new files to a new disk. In addition, if the database exceeds a single Microsoft Windows NT®The maximum file size. secondary data files can be used to allow the database to continue to grow.
File and file group design rules
File and file group design rules include:
Files or file groups cannot be used by more than one database. For example, the sales. mdf and sales. ndf files contain data and objects in the sales database, which cannot be used by any other database.
A file can only be a member of a file group.
Data and transaction log information cannot belong to the same file or file group.
The transaction log file cannot belong to any file group.