[SQL Server] Learn step by step one: SQL Server 2000 Introduction

Source: Internet
Author: User
Tags define functions key sql backup
Server again: This series of articles just learn some of the basics of SQL Server, welcome beginners to come to the discussion, the master will not have to see!

Let's take a look at the common database object types supported by general relational databases!
1, table
Represents the basic unit of data stored in a relational database. A table is the structure of the actual information store and is generally a logical entity for design. A subscript typically has a column (field, field) composition.
2, view
A view is a database object that actually references data in one or more tables, defined by SQL queries, in which we can define a view. Note that the view simply retrieves information from the table and does not store the data itself. Later we'll mention that in SQL Server we can also define indexes on views to increase the performance of query queries. Using views can simplify operations, increase manageability, and improve security.
3, Index
An index is a database object that stores a subset of the columns in a table and is used to establish index information for the table to speed up data searches!
SQL Server supports two indexes: Clustered index and nonclustered index. A clustered index designs the physical order of the database entries, which are created automatically on the primary key when the default table is created, and a table can be indexed only by one clustered index. Using a good index can greatly improve the performance of your database.
4, stored procedure
A stored procedure is a named collection of T-SQL statements or transactions that are stored as objects in the database. Because stored procedures can be cached, they can greatly improve speed. In addition, it can hide some details and help improve security.
5, Trigger
Triggers are predefined sets of action instructions to be executed when data in a table is accessed or changed. Triggers allow you to manipulate tables that have a constrained relationship.
6, function
SQL Server has some powerful built-in functions, and users can also customize functions.
7, default, rules, and constraints
SQL Server provides several different types of constraints: Not Null;check;unique;primary key;foreign KEY. The default is a setting for a column on a table that determines that the value is used when it is not specified as any value. Rules and constraints are similar in functionality, but are deprecated.

Integrity constraints:
Domain integrity, ensuring that the values stored in a column are consistent.
Entity integrity to ensure that the information stored in each row within a table is unique.
Referential integrity to ensure consistency of information between two objects.

SQL Server Data storage schema
1, Files and filegroups
Allows the database file to be set to a file or a filegroup.
2, transaction log

Backup and restore schemas
1, Recovery model: simple, normal, bulk logging.
2, fast differential backup: Only the Difference data page is backed up.
3,copy database Wizard: Used to replicate databases between two SQL Server servers.
4, snapshot backup: Keep data synchronized.

T-SQL language
1, System stored procedures
sp_configure: Server configuration.
Sp_depends: Dependencies of database objects.
SP_HELP: Database object information.
sp_helpdb: Database length is an option.
Sp_helptext: Help information.
Sp_lock: Current lock.
Sp_monitor: Statistics.
sp_spaceused: Use space.
sp_who: Current database connection.
2, Information mode view
Infromation_schema.tables

This is the time to write, the first written because it is a brief description of writing is very general, but also relatively slow.

Related Article

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.