Basic knowledge of database, operation

Source: Internet
Author: User
Tags idf

A: The database (datebase) is divided into three levels:

1. library file, used to store data:

2. Service, a service program, running in the background, the database engine, the operation of the database need to complete the service,SQL Server (MSSQLSERVER) is the database service.

3. Management interface, can invoke the service to manipulate the data files, can be installed separately, you can also install the database files and services, do not install the management interface, only in the program interface to invoke the service, so as to avoid mis-operation in the management interface database is changed to destroy.

Second: Some database small knowledge points

1.DB: Refers to the database, the file that stores the data

2.DBMS: Database management system, which is divided into db and management program

3.DBS: Database system, including human, machine hardware,DB and hypervisor, is an integrated system.

4.MDF: Master data file, file extension is . MDF, and master data files can only have one.

5.NDF: Secondary data files with a file extension of . NDF, secondary data files can be many.

6.IDF: Log file, file extension is . IDF

Both the data file and the log file are essential, and both must exist before they can be used.

Three: enable password setting for SA account

1. Connection interface server type Select the database engine, and the server name can be filled in(local) or directly by writing a point if selected locally . can be, the server name can be written in the LAN IP address Enter someone else's account password can log in to someone else's database, authentication by default is Windows authentication, click on the link to enter.

2. Modify the authentication method and right click on the top (SQL Server ... , select Properties:

Click Security on the left-hand side of the popup screen and check SQL Server on the right. and the Windows authentication method, click OK:

3. Enable SA and modify the sa Password

Security / username /sa, right-click on sa, properties:

On the left-hand side, turn the login from disabled to Enabled:

Left point General, change password point OK:

When the modification is complete, right click on the top (SQL Server ... , restart the service to:

Log in again to select SQL Server authentication, username sa, enter the password for the settings entered:

Four: Create a new database

Right click on the database and select New database:

Then pop up the interface of the new database, fill in the database name, here is the MyDB, the default has a master data file and a log file, you can modify their storage path, here is selected e:/datebase:

The main data file has an automatic growth, the default is growth of 1M, does not limit growth, click on the following popup Modify dialog box, according to the need to choose by percentage or by MB, according to thepercentage increase in the initial data volume is small, the amount of data with the development of large-scale projects, according to MB growth is applicable to general projects, and the increase in data is not so obvious. Maximum file size limit or unlimited, if you want to use more than a few times the data file ndf to store the maximum file size here to specify a value, using a few ndf to store can improve the database retrieval efficiency, Placing several NDF on several disks can also prevent a lack of disk space.

When it is established, it shows the MyDB we created here :

MyDB Properties / Files Click Add to add secondary data files, name change storage path, and so on, called MyDB1:

In the newly created database, select the table, right-click Table, create a new table, you can write the table's column name and the data type it contains:

Set up columns and the type of data stored inside, and later you can edit the form to fill in the information we need to fill in.

The main content is familiar with the interface of the database, how to enable SA account, log on to other computers in the LAN database, new databases and new forms, there are some small concepts.

Basic knowledge of database, operation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.