In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
I. the necessity of using databases
The use of the database can store data efficiently and clearly, so that the staff can manage the data more quickly and conveniently. The database has the following characteristics:
A large amount of data and information can be stored structurally, which is convenient for users to retrieve and access effectively.
It can effectively maintain the consistency and integrity of data information and reduce data redundancy.
Can meet the sharing and security requirements of the application
Common databases are: SQL Server, MySQL, Oracle and so on. SQL Server runs in the Windows operating environment and has a relatively friendly graphical interface.
2. Basic concepts of database 1. Data
The symbolic records that describe things are called data, and data not only includes numbers, words, graphics, images, sounds, archives, etc., but also data. In the database, the data is stored in a uniform format in the form of "records" rather than disorganized.
2. Database and database tables
Different records are organized together to form a "table" of the database. It can also be said that tables are used to store specific data. To put it simply, a database is a collection of tables, which is a collection of interrelated data stored in a certain organizational way. Usually, the database does not simply store the data, but also represents the relationship between them, so the description of the relationship is also part of the database.
3. Database management system and database system
Database management system (Database Management System,DBMS) is a system software that realizes the effective organization, management and access of database resources. DBMS mainly includes the following functions:
Establishment and maintenance function of database
Data definition function
Data manipulation function
Operation and management function of database
Communication function
Database system (Database SysSystem,DBS) is a man-machine system, which is generally composed of hardware, operating system, database, DBMS, application software and database users. Users can operate the database through DBMS or through applications.
Database administrator (Database AdmAdministrator DBA) is responsible for database update and backup, database system maintenance, user management and other work to ensure the normal operation of the database system.
Third, the development history and model of database 1. The development history of database
Primary stage-the first Generation Database: database system based on hierarchical Model and mesh Model
Intermediate stage-second generation database: relational database
Advanced stage-the third generation database: new database for different fields, object-oriented database, "relational-object" database
2. Classical data model
Data is the abstraction of "quantity" in the real world, while data model is the abstraction of data features. In the database system, the data model is its core and foundation, and the data model represents the structure of the data, the operations and constraints defined on it.
1) mesh model:
The mesh model uses a many-to-many, many-to-one relationship. Such a complex data relationship can be well supported on the mesh model. The mesh model is suitable for the implementation of complex data relationships, and can also reduce data redundancy to a minimum.
2) hierarchical model:
The data structure is analyzed and represented abstractly by tree structure, which is suitable for one-to-many relation model. Many-to-many and many-to-one relationships are prohibited. Data constraint is not easy to implement, IMS database system developed by IBM Company.
3) Relational model:
The data structure uses a two-dimensional data table that is easy to understand, which can be directly represented by a simple "entity-relation" diagram, which contains three elements: entities (data objects), relations and attributes. In the figure: rectangle: entity; ellipse: attribute.
IV. Basic concepts of relational database
Relational database system is a database system based on relational model, and it is an instantiation of the application of relational model to database field.
1. The basic structure of relational database.
In each two-dimensional table, each row is called a record, which is used to describe the information of an object; each column is called a field, which is used to describe an attribute of the object. There is a corresponding association between the data table and the database, which is used to query the relevant data, as shown in the following figure.
A relational database consists of associations between data tables. Where:
A data table is usually a two-dimensional table consisting of rows and columns, each of which describes the objects and their properties of a particular aspect or part of the database.
A row in a data table is usually called a record or tuple, which represents one of many objects with the same properties
The columns in the data table are usually called fields or attributes, which represent the common properties of the objects stored in the corresponding database; 2, primary key and foreign key 1) primary key
Each row of records in the data table must be unique, and identical records are not allowed. The uniqueness of records (entities) can be guaranteed by defining primary keys (primary keys, Primary Key).
The primary key uniquely identifies the row data in the table, with a primary key value corresponding to a row of data. A primary key consists of one or more fields whose values are unique, null values are not allowed (NULL), and a table can have only one primary key.
2) Foreign key
A relational database usually contains multiple tables, which can be associated with foreign keys (Foreign Key). A foreign key is one or more columns used to establish and strengthen a link between two table data. You can create a link between two tables by adding one or more columns of primary key values in a table to another table. This column is called the foreign key of the second table.
3. Data integrity rules 1) entity integrity rules
Entity integrity rules require that tuples in a relationship cannot have null values on the attributes of the primary key. If a null value occurs, the primary key value does not uniquely identify the tuple.
2) Domain integrity rules
Domain integrity rules, also known as column integrity, specify whether a dataset is valid for a column or determine whether null values are allowed.
3) referential integrity rules
If two tables are related to each other, the referential integrity rule requires that references to tuples that do not exist are not allowed.
4) user-defined integrity rules
User-defined integrity rules are constraints for a specific data, which are determined by the application environment. It reflects the semantic requirements that the data involved in a specific application must meet.
Installation and use of SQL Server 2016
SQL Server 2016 development version can be installed on Windows8/8.1/10, but the enterprise version does not support it, and the features are the same. However, the development version cannot be deployed to the actual production environment.
For SQL Server 2016 images, please visit [https://pan.baidu.com/s/1p17J4yhJE6UrvDkodgRzLg]
Extraction code: pydi]
1. Security considerations for secure SQL Server:
Enhance physical security
Quarantine service
Use the firewall
Configure a secure file system
Disable unnecessary protocols (for example, sharing)
2. Hardware requirements for installing SQL Server 2016
CPUx64
Memory cannot be lower than 1GB. 4GB~6GB is recommended.
Hard disk free space 6GB
3. Install SQL Server 2016
1) Open DVD and run the setup application
2) Click the installation option, and select permission SQL Server to install independently or add features to an existing installation.
3) keep the product key by default, click next
4) accept the license terms and click next
5) do not choose to check for updates, keep the default and click next.
6) ignore product update and report an error, and click next
7) the warning of the installation rule can be ignored. Click next.
8) functional options: database engine service, SQL Server replication and Data Quality Services.
9) just keep the default instance in the instance configuration
10) keep the server configuration by default, click next
11) Select mixed default for authentication mode, configure your own password, add the current user, and click next
12) start installation
13) installation completed
14) check the service console to verify that the installation is successful
4. Install SQL Server MManagement
SSMS package extraction link: [https://pan.baidu.com/s/1zFhXc3b7Ym-ZSLsYXL2yPg
Extraction code: d5yj]
1) copy SSMS to your computer to start installation
2) installation completed
3) Open SQL Server MManagement
4. Connect, start, and stop database services
1) use windows authentication to connect to the database
2) use SQL Server authentication to connect to the database
3) right-click the database name to start, stop and restart the database
4) start or stop the database through the service manager
5) manage SQL Server services through SQL Server configuration Manager
5. Register the server
1) register the server (two instances will be installed on the same server)
2) browse the local server
3) Select a server to add.
4) Test database
6. System database
-this is the end of this article. Thank you for reading-
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.