About the author: A cloud computing network operation and maintenance personnel, sharing the technology and dry goods of network and operation and maintenance every day.
Official account: Network Dou
Motto: Keep your head down and hurry on your way, be respectful
Personal homepage: Homepage of Netdou
Table of contents
1. The necessity of using the database
(2) Database and database table
(3) Database system and database management system
3. History of database development
2. Mainstream database introduction
1.SQL server (Microsoft product)
3. DB2 (product of IBM Corporation)
4. MySQL (acquired by Oracle Corporation)
3. Basic concepts of relational database
5. Commonly used management tools and methods of starting and stopping database services
Seven. SQL Server database deployment and installation tutorial
written in front
This series of articles will explain the installation and use of SQL server, and will synchronize the video to explain the installation.
Video tutorial: [windows server 2016 installation sql server tutorial]
introduce
SQL Server is a relational database management system developed by Microsoft, and it is now one of the mainstream databases in the world. It has the advantages of ease of use, good scalability, and a high degree of integration of related software. It can be run from a single laptop or based on a high-power cloud server cluster, or any way in between.
1. Introduction to database
1. The necessity of using the database
- Structured storage of large amounts of data for efficient retrieval and access
- Effectively maintain the consistency and integrity of data information and reduce data redundancy
- Meet data sharing and security requirements
2. Basic concepts of database
(1) data
(2) Database and database table
- Different records are organized together to form a "table"
- A database is a collection of tables
(3) Database system and database management system
Database System ( DBS )
Database system (DBS) refers to the system composition after the database is introduced into the computer system, which is composed of computer hardware, operating system, DBMS, DB, application programs and users, and database development and management personnel. The full English name of DBMS is DataBase Management System, that is, database management system. It can realize the storage, management and retrieval of data.
Database Management System ( DBMS )
A database management system (DBMS) is a large-scale software for manipulating and managing databases, and is used to create, use and maintain databases. It manages and controls the database in a unified way to ensure the security and integrity of the database. Users access the data in the database through the DBMS, and the database administrator also maintains the database through the DBMS.
Database Administrator ( DBA )
A database administrator (DBA) is a professional responsible for administering and maintaining database servers. They are mainly responsible for the full life cycle management of business databases from design, testing to deployment and delivery, including installing and upgrading database servers, application tools, and making future storage demand plans.
3. History of database development
"relational-object" database
4. Data model
- The structure of the presentation data
- Define data manipulation and constraints
(1) Mesh model
The mesh model is a data organization structure in database design, and it is one of the early database models. In the mesh model, data are connected to each other in a mesh manner, forming a complex network structure. Each data element can be directly related to multiple other data elements. many-to-many type
(2) Hierarchical model
Hierarchical model is a tree-structured data model, which is one of the earliest models used in database systems. In a hierarchical model, data is connected to each other in a tree-like fashion, and each data element can be directly related to many other data elements. one-to-many
(3) Relational model
The relational model is a data model based on two-dimensional tables of mathematics. It uses two-dimensional tables to organize data, and this two-dimensional table is called a relationship in a relational database. The relational model consists of three parts: the data structure of the relational model, the set of operations of the relational model, and the integrity constraints of the relational model. These three parts are also called the three elements of the relational model.
2. Mainstream database introduction
1.SQL server (Microsoft product)
SQL Server is a relational database management system developed by Microsoft, and it is now one of the mainstream databases in the world. It is a client/server system that uses Structured Query Language (SQL) as the primary means of manipulating and managing data.
Features:
- For Windows OS
- simple and easy to use
2. Oracle (Oracle products)
Oracle is a relational database management system of Oracle Corporation, which has always been a leading product in the database field. It is a client/server system that uses Structured Query Language (SQL) as the primary means of manipulating and managing data.
Features:
- For all major platforms
- Safe, perfect, complex operation
3.DB2 (IBM product)
DB2 is a relational database management system developed by IBM. Its main operating environments are UNIX (including IBM's own AIX), Linux, IBM i (formerly known as OS/400), z/OS, and Windows server versions. DB2 is mainly used in large-scale application systems, has good scalability, can support from mainframe to single-user environment, and is applied to all common server operating system platforms.
Features:
- For all major platforms
- Large, safe and complete
4. MySQL (acquired by Oracle Corporation)
MySQL is a relational database management system, developed by the Swedish company MySQL AB, which is a product of Oracle. MySQL supports large databases and can handle large databases with tens of millions of records. MySQL uses the standard SQL data language form, can run on multiple systems, and supports multiple languages.
Features:
- Open source, small size, fast speed, stable
3. Basic concepts of relational database
1. Basic structure
2. Primary Key
- Consists of one or more fields to ensure the uniqueness of the entity
- A primary key value corresponds to a row of data
- Empty values ( NULL ) are not allowed
- A table can have only one primary key
3. Candidate keys
- A set of attributes that uniquely identifies a row of a table without redundant attributes
- There can be multiple candidate keys in a table
- Only one candidate key can be selected as the primary key of the table
4. Foreign key (Foreign Key)
- Multiple tables can be related by foreign key
- Add the primary key column in the table to another table, this column is called the foreign key of the second table
4. Data Integrity Rules
1. Entity Integrity
• It is required that the attribute corresponding to the primary key cannot take a null value
2. Domain Integrity
• Specify whether the value of a column is valid and whether null values are allowed
3. User-Defined Integrity
• Constraints for a specific data, determined by the application environment
4. Referential Integrity
• References to non-existent tuples are not allowed if two tables are related
5. Commonly used management tools and methods of starting and stopping database services
1.SSMS
All components used to access, configure, control, manage, and develop SQL Server. For example, editing and executing queries, launching standard wizard tasks
2. SQL Server Configuration Manager
Manage SQL Server services and network configuration
3.SQL Server Data Tools
- Provides Visual Studio integration, including project system support for cloud-based Azure SQL Database, SQL Server database engine Reporting Services, Analysis Services, and Integration Services
4. How to start and stop the database service
Method 1: Use the service manager to start or stop the database service
Method 2: Use the SQL Server configuration manager to start or stop the database service (common)
Method 3: Use SSMS to start or stop the database service
6. Database classification
1. System database
- Master : Records system-level information, such as logged-in users, locations of other database files, etc.
- Model : database template, used when creating a database
- Msdb : Used by SQL Server Agent to schedule alerts and jobs
- Tempdb : save temporary objects or intermediate result sets
2. User database
- user created
Seven. SQL Server database deployment and installation tutorial
Resource: Baidu Netdisk, please enter the extraction code
Extraction code: 6666
1. Preliminary preparation
software and hardware |
Require |
CPU |
Type : x64 processor, AMD Opteron , AMD Athlon 64 , Intel Xeon with Intel EM64T support , Intel Pentium IV with EM64T support Speed: 1.4 GHz or higher |
Memory |
Minimum: 1 GB |
hard disk space |
6GB or more |
operating system and patch |
Windows Server 2016 Windows Server 2012 / 2012 R2 Windows 8/8.1/10 |
2. Install
1. Open a server 2016 and insert the SQL server image installation
2. After the installer finishes loading the installation components, the "Installation Center" interface appears, select the "Install" option, and select the "New installation or add features to the existing installation" option
default next step
3. If the status of each rule is "Passed" or "Warning", it means that the installation can continue, and click "Next". (If there is a problem, you need to check the content of the inspection report and solve the problem according to the prompts)
4. In the "Function Selection" interface, according to the actual needs of the function to be installed now, select the function and click Next
5. Authentication: SQL Server uses information in the Windows operating system to verify user names and passwords; mixed mode: uses SQL Server authentication (sa) and Windows authentication)
6. In the "Ready to Install" interface, you can see the "Summary" information, and then click "Install" to start the installation
Successful installation
Start and stop the database service (set the SQL Server (MSSQLSERVER) service to automatic)
Creation is not easy, please pay attention, like, collect, thank you~