01. Basic concepts of the database

Source: Internet
Author: User

A. Basic database Concepts I. Database: A collection of table and database Access objects, where the table stores different entity information, and each row of data corresponds to an entity's descriptive information I. Entities and records:1entities are all things that are objective and can be described.2. Records: Data tables stored in the database, each "row" actually corresponds to an entity, such a row, in the database, usually called a "record" II. Database management System (DNMS): is a system software, consists of an interconnected set of data and a group of data access programs, the main function Can be the maintenance database, and effectively access the data in the various parts of the Database III. Database System (DBS): is an actual operational system that can store, maintain, and apply the data provided by the system, and is a collective IV composed of storage media, processing objects, and management systems. Data redundancy: Refers to the existence of some duplicate databases in the database I. Integrity of data: refers to the accuracy of data in the database, the database allows some data redundancy, but to maintain the integrity of the data1accuracy: is achieved through the design and constraints of database tables .2in order to achieve completeness, the database needs to do the following two things a. Verify that each row of data meets the requirements B. Verify that each column of data meets the requirements3. Constraint: A. Entity integrity constraint: requires that each row of data in a table reflect a different entity and cannot have the same data row I. Index II. single Constraint III. PRIMARY KEY constraint B. Domain integrity constraint: Validity of a given column input I. Limit data type Ii. Check Constraint III. Input Format IV. FOREIGN KEY Constraint v. Default value VI.               Non-null constraint c. Referential integrity constraint: Used to maintain a defined relationship between tables, implemented by a reference relationship between a primary key and a foreign key. Custom integrity constraints: The data type used to define a specific rule I. Column 1. Binary data: Data used to store non-characters and text A. Binary: fixed length b. Varbinary: Variable length c. Image: Available To store the image2. Text data type: Character data includes any combination of letters, symbols, or numeric characters a. Char: fixed-length non-Unicode character data B. Varchar: variable-length non-Unico                  De character data C. Nchar: fixed-length Unicode character data D. Nvarchar: variable-length Unicode character data E. Text: Storing long text information F. Ntext: Storing long text with variable length3. Date and Time data type: used to store date and time a. Datetime: type of time format4. Numeric data type: This data contains only numbers, including positive, negative, and fractional a. Int, smaliint, tinyint, bigint: integer b.float, Real: floating-point numbers5. Currency Data: Money6. Bit data type: bit (store boolean data type) Ii. Primary key and foreign key1. Primary key: A unique identifier used to identify each row in the table, minimum and stability required when using primary key A. Minimum: Refers to the key with the fewest number of columns, and if you can select from a single primary key and a combined primary key, you should select a single primary key B. Stability: Refers to the characteristics of the data in the column, since the primary key is usually used to establish a connection between two tables, so the primary key data should not be updated frequently, ideally, should never change2foreign Key: relative to the primary key, he is the column in the "child table" that corresponds to "primary table"

01. Basic concepts of the database

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.