SQL Server series: database objects

Source: Internet
Author: User

Database objects are part of a database, and data tables, views, indexes, stored procedures, and triggers are all database objects.

The primary object of a database is a data table, which is a collection of two-dimensional arrays for storing various kinds of information.

The view surface looks almost like a table, with a set of named fields and data items, but it is actually a virtual table that is generated by querying the table data in the database, which limits the data that users can see and modify. You can use views to control user access to data, simplifying the display of data. You can query data by using the SELECT statement in the view.

An index is a structure that sorts the values of one or more columns in a database table, provides a fast way to access the data, and uses an index to provide a query speed for specific data in the database.

A stored procedure is a collection of one or more SQL statements that are pooled for the completion of a particular function, and is a SQL program that is stored in the database after it has been compiled.

Triggers, like stored procedures, are collections of user-defined SQL commands. Triggers are events that trigger an action that includes insert, UPDATE, and DELETE statements. If a trigger is defined, the trigger is activated when the database executes the statement, which is the named database object associated with the table, and is activated when a specific event occurs on the table.

SQL Server series: database objects

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.