The first part of SQL database

Source: Internet
Author: User
Tags php language microsoft sql server mssqlserver

Database: A program used to access data

ACCESS: Self-brought, smaller, not very professional

SQL Server: Mainly used in. NET language, more professional. Microsoft Development

MYSQL: Mainly used in the PHP language, smaller than SQL Server volume

Oracle: Used primarily in Java

Each database has a corresponding language.

Mainly because the connection is convenient, others can also be connected, but may be more troublesome than the usual.

Database has two parts: interface + Service

A service is a program that can operate in the background.

An interface is a program that can see data from a database.

The service and interface can be separated.

Only services can be used alone.

Service Open

Control Panel--management tools--Service--sql Server (MSSQLSERVER)

The database is also used in tabular format when storing data

column (field);

Line (record);

The database is like Excel, and multiple tables can appear

Windows authentication can only be used with native references

SQL Server can interoperate
Sa=super Admin


Create a database

Database size growth
Increase by MB Average
by percentage

Test

Test Master file. mdf
Test_log log files
Test1 secondary data files. ndf

The primary and log files are required, and there is only one
Number of secondary files not required


Attaching and detaching a database
Detach: Locate the database, right-click-Task-Detach, OK
After detaching, you can copy the files of the database to other computers D:\Program Files\Microsoft SQL Server
\mssql10. Mssqlserver\mssql\data

Attach: Select database, right--Attach--Popup dialog--select attached file--click Add to find the file to attach--ok

Backup and restore of databases

varchar (50) string, length in parentheses
Boolean type C#bool SQL bit

Each table must have a primary key to distinguish the same data from the primary key.

Input and data

After creating a table, you can type and change the data in the interface

The first part of SQL database

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.