Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Collation of knowledge points in database 1

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I. basic concepts

Relational database: use two-dimensional tables to store data.

The relational model consists of three parts: relational data structure, relational operation set and relational integrity constraints.

Entity: something that exists objectively and can be distinguished in the real world. For example, "a student", "a book", "a course" and so on. It is worth emphasizing that the "things" mentioned here are not only visible and tangible "things", it can also be virtual, rather than "the relationship between teachers and schools".

Attribute: it is interpreted in the textbook as "a certain characteristic of an entity", so it can be seen that attribute is a logical concept at first, for example, "gender" is an attribute of "person". In a relational database, an attribute is also a physical concept, and an attribute can be regarded as a "column of a table".

Tuple: a row in a table is a tuple.

Component: a property value of a tuple. In a relational database, it is an operation atom, that is, when a relational database does any operation, the attributes are "inseparable". Otherwise, it's not a relational database.

Code: an attribute (or attribute group) of a tuple can be uniquely identified in the table. If there is more than one such code, then everyone is called a candidate code. If we choose one of the candidate codes to be the boss, it is called the main code.

Full code: if a code contains all the attributes, this code is the full code.

Primary attribute: as long as an attribute appears in any candidate, this attribute is the primary attribute.

Non-primary attribute: on the contrary, it does not appear in any candidate code, and this attribute is a non-primary attribute.

External code: an attribute (or attribute group), it is not a code, but its other table code, it is an external code.

Two and three paradigms

1NF: fields cannot be divided

2NF: there is a primary key, and non-primary key fields depend on the primary key

3NF: non-primary key fields cannot depend on each other

III. Affairs

1. Transaction: a concurrency control unit and a user-defined sequence of operations.

2. Four characteristics of the transaction (ACID feature):

(1) Atomicity: a transaction is the logical working unit of a database, and all the operations included in the transaction are either done or not done.

(1) Consistency: the result of transaction execution must be to change the database from one consistency state to another. Consistency is closely related to atomicity.

(3) Isolation: the execution of one transaction cannot be interfered with by other transactions.

(4) persistence / Durability: once a transaction is committed, its changes to the data in the database should be permanent.

3. Start implicitly, but each transaction still ends explicitly with COMMIT or ROLLBACK.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report