Elements of SQL

Source: Internet
Author: User

1. Pattern objects

A pattern is a collection of data logical structures or schema objects (schema object) that is owned by a database user with the same name as the user name. The pattern object is created and manipulated by SQL and contains the following types. An understanding of these elements is important for efficient use of the SQL language.

▲ Table: The table is the basic unit of data storage in a database, and its data is stored in rows and columns. Each table has a table name and a collection of columns. Each column has a column name, data type, width or precision, scale. A row is a collection of column information that corresponds to a single record.

▲ View: A view is a custom representation of the data in one or more tables (or other views) and is defined by a query, so it can be considered a stored query or a virtual table. The view is also used in many places where tables are used, but unlike tables, a view does not allocate any space, that is, the view does not really contain data.

▲ Aggregation (Cluster): Clustering is an alternative way of storing table data. A cluster is a set of tables that store rows that have the same common column values together, and they are often used together.

▲ Database Link: A database chain is a named object that describes a path from one database to another. In a distributed database, a database chain is implicitly used when referencing a global object name. This article comes from the programming gateway

▲ Index: Index is a selection structure related to table and aggregation. Indexes are built to improve the performance of data retrieval, and can be used to quickly determine the specified information.

▲ Sequence Builder (sequence generator): The sequence Builder produces the serial number. This sequence builder is particularly useful in multiuser environments, generating and returning serial numbers without disk I/O or transaction blocking.

▲ synonyms (synonym): a synonym is an alias for any table, view, sequence, procedure, etc., whose definition is stored in the data dictionary.

▲ database triggers (DB trigger): Database triggers are similar to stored procedures, which contain SQL languages and other stored procedures.

2. Non-modal objects

In the database, there are other types of objects that can be built and manipulated with SQL, but they are not included in the schema. These objects are:

▲ User Environment file (profile);
▲ role: A named group of related privileges for a role that can be delegated to users and roles. The so-called privilege is a special type of SQL statement or the right to access the object of another user.
▲ Rollback Segment (rollback segment): The rollback segment is an object used by data to store the data required for the modification of the transaction to be undone. There can be multiple rollback segments in a table space, and generally multiple rollback segments can improve performance.

▲ table Space (tablespace): A database is divided into one or more logical units, which are called table spaces.

References: SQL language tutorials SQL language basics

Back to the database basics ABC Directory

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.