Creation of databases and tables

Source: Internet
Author: User

• Creation of a database

Table: The primary form of storing databases and relationships is the most important database object

Views: A view is a reference table that is generated in one or more base tables.

Constraints: Used to guarantee the consistency and integrity of data, with the representative constraints are primary key and foreign key, primary KEY constraints the current table record primary key field uniqueness, foreign key constraints the relationship between the current table and other tables

Stored procedure: A stored procedure is a set of SQL statement geometries that are stored in a database that has a name, can accept parameters, output parameters, return single or multiple values, and stored procedures are independent of the existence of a table in order to accomplish a particular function

Triggers: Triggers are created based on the operation of a table, writing several T-SQL statements, and when the operation occurs, these T-SQL statements Execute, return TRUE or FALSE, return false, and the operation of the current table cannot be performed.

Default value: The default value is the initial value of the System settings field before the user inserts the table record.

Users and Roles:

Rules: Restricting the data range of a table field

Functions: Users can combine several T-SQL statements or system functions to implement specific functions as needed, define their own functions, and invoke functions where needed.

Type: Users can define their own data types on a given system type, as needed

Master database: Saves all system-level information for the SQL Server system

Model database: Save all database templates created on an instance of SQL Server

tempdb database: Temporary database used by all users

MSDB database: SQL Server Agent uses the MADB database to schedule alarms and jobs

Creation of databases and tables

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.