SQL: Structured quety Language
SQL Server is a relational database management subsystem (RDBMS) that accesses in client/server (c/s) mode and uses the Transact-SQL language
DBMS : Database Management System Management Systems
Database : A program used to access data
ACCESS: Self-brought, smaller, not very professional
SQL Server: Mostly used in . NET languages, 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 with Sa=super admin
Create a database
Database size growth by MB growth compare average by percentage
Test
Test Master file. mdf test_log log file Test1 secondary data file. NDF
Backup. bak
Primary and log files are required, and there is only one secondary file number that is not required
attaching and detaching a database
Separation: find the database, right-click-Task-detach, determine the separation, you can copy the database files 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 (s): string, length in parentheses
bit: boolean
date/datetime: Time and date
Money:
Text : literal does not qualify character length
float: decimal
int: integral type
Each table must have a primary key that uniquely identifies the data.
Input and data
After creating a table, you can type and change the data in the interface
SQL (i)--Database basics