Sybase SQL Server is an RDBMS of a multiple-library architecture, which is broadly structured as follows:
1. Database
A database used by the server itself, or a database of Management servers and user databases. Sybase created four system databases automatically when it was installed:
Master, model, tempdb, Sybsystemprocs
(1) Master database
It is the core database to manage and control the user database and maintain the normal operation of the server, which saves a lot of system information, such as server configuration, user, equipment, etc.
In the master database, normal users are not allowed to create database objects in them, or the transaction log of the master database will soon become full. If the transaction log is exhausted, you cannot use the DUMP TRANSACTION command to free space in the master database.
(2) Model database
It is a template provided for creating a user database. Whenever a new database is created, SQL Server automatically creates a copy of the model database and expands it to the size required by the user as a new user database.
The model database contains the system tables required by each user database. The model database can be modified to customize the newly created.
(3) tempdb database
It is a staging database that provides a shared storage area for server operations and processing, such as the intermediate results of group by and order by. The space for tempdb is shared by all users of all databases in the server.
Each time you restart SQL Server, an automated process for the server copies the model database to the tempdb database and clears the original contents of tempdb. Therefore, the user tables in tempdb are temporary. Temporary tables are divided into two categories: shareable and not shared. A temporary table that is not shared is created before the table name in the CREATE table, and a temporary table that can be shared is specified by the table name prefix tempdb in the CREATE table. and created. Non-shared temporary table SQL Server automatically adds a numeric suffix name to it, and it exists only in the current session.
(4) Sybsystemprocs Database master database
It is a database that is designed to hold system commands (stored procedures), such as sp_help, sp_configure, sp_helpdevice, and so on. When any database user runs a stored procedure that starts with SP_, SQL Server looks in the following order: the current database, the Sybsystemprocs database, and the master database.
2. User Database
The user database is our real purpose for using Sybase servers. To manage user data, you must create your own database in Sybase, which refers to a database created with the CREATE DATABASE command. Users who cannot access the master database are not authorized to create a new database.
Primary content in a database-database objects:
Tables, views, temporary tables
Index, primary key, foreign key
Default values, rules
Stored procedures, triggers, etc.