SQL (i)--Database basics

Source: Internet
Author: User
Tags mssqlserver time and date

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

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.