Home > Database > Mysql Tutorial > What are the database design paradigms?

What are the database design paradigms?

王林
Release: 2020-06-28 14:28:08
Original
3663 people have browsed it

Database design paradigms include: first paradigm, second paradigm, third paradigm, Badsko's paradigm, fourth paradigm and fifth paradigm. The paradigm that meets the minimum requirements is the first paradigm, and the paradigm that meets more requirements on the basis of the first paradigm is called the second paradigm, and so on for the remaining paradigms.

What are the database design paradigms?

#Relationships in relational databases must meet certain requirements, that is, they must meet different paradigms.

(Recommended learning: mysql tutorial)

There are six paradigms in relational databases:

First normal form (1NF) , second normal form (2NF), third normal form (3NF), Badsko normal form (BCNF), fourth normal form (4NF) and fifth normal form (5NF).

The normal form that meets the minimum requirements is first normal form (1NF). The one that meets more requirements based on the first normal form is called the second normal form (2NF), and so on for the remaining normal forms. Generally speaking, the database only needs to meet the third normal form (3NF).

When designing a relational database, follow different specifications and design a reasonable relational database. These norms are called paradigms. The higher the paradigm, the lower the redundancy of the database.

First normal form

No duplicate columns

Each column of the database table is an indivisible atomic data item , and cannot be non-atomic data items such as sets, arrays, records, etc. If an attribute in an entity has multiple values, it must be split into different attributes

In any relational database, the first normal form (1NF) is the basic requirement for the design of the relational schema. General design Both must satisfy the first normal form (1NF). However, some relational models break through the limitations of 1NF, which are called non-1NF relational models.

In other words, whether the minimum requirements of 1NF must be met mainly depends on the relational model used.

Second Normal Form

Attributes are completely dependent on the primary key

The second normal form (2NF) is in the first normal form ( 1NF), that is, to satisfy the second normal form (2NF), you must first satisfy the first normal form (1NF).

When there are multiple primary keys, situations that do not conform to the second normal form will occur. For example, if there are two primary keys, such an attribute cannot exist. It only depends on one of the primary keys. This does not comply with the second normal form.

If there is a situation that does not comply with the second normal form, then this attribute and this part of the primary key should be separated to form a new entity. There is a one-to-many relationship between the new entity and the original entity.

Third normal form

Attributes cannot transitively depend on primary attributes (attributes do not depend on other non-primary key attributes)

The third normal form (3NF) is established on the basis of the second normal form (2NF), that is, to satisfy the third normal form (3NF), the second normal form (2NF) must first be satisfied.

If an attribute depends on other non-primary key attributes, and other non-primary key attributes depend on the primary key, then this attribute is indirectly dependent on the primary key, which is called transitive dependence on the primary attribute.

The above is the detailed content of What are the database design paradigms?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template