SQL Server 2000 databases fall into two categories:
1. System Database
System databases are built-in by SQL Server. They are used for management purposes and cannot be changed or deleted at will.
2. User Database
A user database is generally created by a user, and its use and management are determined by its creator.
Six databases were created during SQL Server 2000 installation
Master, tempdb, model, and MSDB are four system databases; pubs and northwind are two user databases for use as an example. The main functions of the four system databases are as follows:
Master Database
It is used to record the relevant information of the SQL server system, such as the login account and password, system configuration information, database information and user database location. It also includes many system stored procedures used to perform certain system operations.
Tempdb Database
Stores all temporary tables, temporary stored procedures, and other temporary data.
Model Database
Is the template for all newly created databases. The content of each newly created database is the same as that of the template.
MSDB Database
Used by the SQL Server Agent service to automatically perform database-related operations, such as automatic backup, alarms, and replication.
In SQL Server 2000, there are two main types of system tables whose names start with "sys.
One type of system table is located in the master database, used to store system information at the server level; the other type of system table is located in each database, used to record the database-level information of each database.
The system tables in the user database inherit from the model database. Each time a user creates a new database, the structure and quantity of the system tables are consistent with those of the model database.