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