In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
SQL Server is a database management system that runs mainly through Windows services. This article mainly introduces how to operate and manage the database.
Start or stop the database service
After completing the database installation, you need to manually check whether the installation is successful and running, and configure it to start manually or automatically, depending on the actual situation. You can start or stop the database service in three ways:
(1) use the server manager
(2) use SQL Server configuration Manager
(3) use SSMS
System database
Databases in SQL Server can be divided into the following two categories according to their purpose:
System database: the database necessary to manage and maintain SQL Server
User database: a database set up by the user
Master database: record all system-level information of the SQL Server system, record all login accounts and system configuration settings, record all other database information (including the location of database files), record the initialization information of SQL Server
Model database: template for all databases. Modifications to the model database will be applied to all databases created later.
Msdb database: for SQL Server agent scheduling alerts and schedules, where all task scheduling, alarms, and operations are stored, as well as backup history of all databases
Tempdb database: used to save temporary objects or intermediate result sets
SQL Server database file type
The database is stored on disk in units of files, which is composed of data files and transaction files. A database includes at least one data file and one transaction log file.
Master data file: includes the startup information of the database and points to other files of the database. Each database has only one master data file with a .mdf extension
Secondary (secondary) data file: all data files except the primary data file are secondary data files. The database can contain no secondary data files or multiple secondary data files with a .ndf extension
Transaction log file: contains information to recover all transaction logs in the database. The SQL statement that records all transactions. In the event of a data disaster, the database can be restored through the T-SQL statement recorded in the transaction log. Each database has at least one transaction log file with a .ldf extension
Filestream data files: enables SQL Server-based applications to store unstructured data in the file system, such as documents, pictures, audio, video, etc.
Database management
(1) create a database
(2) expand the database
(3) shrink the database
(4) separate the database
(5) attach database
(6) Delete the database
Manipulate datasheets using SSMS
(1) data type
A data type is an attribute of data that specifies the type in which the data is saved. The data types in SQL Server are divided into: exact numbers, approximate numbers, date and time, strings, Unicode strings, binary strings, and other data types. Here are some common data types:
(2) default value
If no value is specified for the column when the row is inserted, the column uses the default value. The default value can be any value that evaluates to a constant
(3) check constraints
By limiting the values acceptable to a column, CHECK constraints can enforce domain integrity, similar to foreign key constraints.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.