Table of Contents
Database Design Paradigm" >Database Design Paradigm
Home Database Mysql Tutorial Understand the three major paradigms of database design

Understand the three major paradigms of database design

Mar 26, 2017 pm 01:34 PM

Database Design Paradigm

What is a paradigm: In short, database design has a great influence on the storage performance of data and the operation of data by developers. relation. Therefore, establishing a scientific and standardized database requires meeting some

specifications to optimize the data storage method. In relational databases these specifications can be called paradigms.

What are the three major paradigms:

First normal form: When all attributes of the relational schema R cannot be decomposed into more basic data unit, R is said to satisfy the first normal form, abbreviated as 1NF. Meeting the first normal form is the minimum requirement for the standardization of a relational model. Otherwise, many basic operations will not be implemented in such a relational model.

Second Normal Form: If the relational pattern R satisfies the first normal form, and all non-primary attributes of R are completely dependent on each candidate key attribute of R, R is said to satisfy the second normal form. , abbreviated as 2NF.

Third normal form: Suppose R is a relational schema that satisfies the conditions of the first normal form, and X is any attribute set of R. If X non-transitively depends on any candidate keyword of R , said R satisfies the third normal form, abbreviated as 3NF.

Note: The

relationship is essentially a two-dimensional table, Each row is a tuple, and each column is an attributeUnderstand the three major paradigms

First normal form

1. The attributes of each column are attribute values ​​that cannot be subdivided, ensuring the atomicity of each column. 2. The attributes of the two columns are close or similar or the same. Try to merge columns with the same attributes to ensure that no redundant data is generated.

If you need to know which province and city and classify them, then obviously the first table is not What is easy to satisfy needs does not conform to the first paradigm.

Obviously, the first table structure not only cannot meet the requirements of enough items, but also creates redundancy when there are few items. It is also inconsistent with the first paradigm.

Second Normal Form

Each row of data can only be related to one of the columns, that is, one row of data can only do one thing. Whenever data duplication occurs in a data column, the table must be split.

##If a person books several rooms at the same time, he will come out There are multiple pieces of data for one order number, so the contacts are all repeated, which will cause data redundancy. We should take him apart.

#In this way, a piece of data can do one thing without complicated relationship logic. At the same time, it is easier to update and maintain table data.

Third Normal Form

Data cannot have a transitive relationship, that is, no attribute is directly related to the primary key. Not an indirect relationship. Such a relationship between attributes like: a-->b-->c does not conform to the third normal form. For example, the Student table (student number, name, age, gender, school, school address, school phone number) Such a table structure has the above relationship. Student ID --> School --> (school address, school phone number)

We should disassemble a table structure like this, as follows.

(student number, name, age, gender, school)--(school, school address, school phone number)

Finally:

The three major paradigms are just the basic concepts of general database design, which can build a database with less redundancy and reasonable structure. If there are special circumstances, of course they must be treated specially. The most important thing in database design is demand and performance, demand > performance > table structure. Therefore, we cannot blindly pursue the paradigm to build a database.

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

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Honor Magic V3 debuts AI defocus eye protection technology: effectively alleviates the development of myopia Honor Magic V3 debuts AI defocus eye protection technology: effectively alleviates the development of myopia Jul 18, 2024 am 09:27 AM

According to news on July 12, the Honor Magic V3 series was officially released today, equipped with the new Honor Vision Soothing Oasis eye protection screen. While the screen itself has high specifications and high quality, it also pioneered the introduction of AI active eye protection technology. It is reported that the traditional way to alleviate myopia is "myopia glasses". The power of myopia glasses is evenly distributed to ensure that the central area of ​​​​sight is imaged on the retina, but the peripheral area is imaged behind the retina. The retina senses that the image is behind, promoting the eye axis direction. grow later, thereby deepening the degree. At present, one of the main ways to alleviate the development of myopia is the "defocus lens". The central area has a normal power, and the peripheral area is adjusted through optical design partitions, so that the image in the peripheral area falls in front of the retina.

Vivo's phone with the strongest signal! vivo X100s is equipped with a universal signal amplification system: 21 antennas, 360° surround design Vivo's phone with the strongest signal! vivo X100s is equipped with a universal signal amplification system: 21 antennas, 360° surround design Jun 03, 2024 pm 08:41 PM

According to news on May 13, vivoX100s was officially released tonight. In addition to excellent images, the new phone also performs very well in terms of signal. According to vivo’s official introduction, vivoX100s uses an innovative universal signal amplification system, which is equipped with up to 21 antennas. This design has been re-optimized based on the direct screen to balance many signal requirements such as 5G, 4G, Wi-Fi, GPS, and NFC. This makes vivoX100s the mobile phone with the strongest signal reception capability in vivo’s history. The new phone also uses a unique 360° surround design, with antennas distributed around the body. This design not only enhances the signal strength, but also optimizes various daily holding postures to avoid problems caused by improper holding methods.

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Honor X60i mobile phone is on sale starting from 1,399 yuan: visual quadrilateral OLED direct screen Honor X60i mobile phone is on sale starting from 1,399 yuan: visual quadrilateral OLED direct screen Jul 29, 2024 pm 08:25 PM

According to news on July 29, the Honor X60i mobile phone is officially on sale today, starting at 1,399 yuan. In terms of design, the Honor X60i mobile phone adopts a straight screen design with a hole in the center and almost unbounded ultra-narrow borders on all four sides, which greatly broadens the field of view. Honor X60i parameters Display: 6.7-inch high-definition display Battery: 5000mAh large-capacity battery Processor: Dimensity 6080 processor (TSMC 6nm, 2x2.4G A76+6×2G A55) System: MagicOS8.0 system Other features: 5G signal enhancement, smart capsule, under-screen fingerprint, dual MIC, noise reduction, knowledge Q&A, photography capabilities: rear dual camera system: 50 million pixels main camera, 2 million pixels auxiliary lens, front selfie lens: 8 million pixels, price: 8GB

Detailed tutorial on establishing a database connection using MySQLi in PHP Detailed tutorial on establishing a database connection using MySQLi in PHP Jun 04, 2024 pm 01:42 PM

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

New stacking process! Xiaomi MIX Fold 4 is equipped with Jinshajiang 'three-dimensional special-shaped' battery for the first time New stacking process! Xiaomi MIX Fold 4 is equipped with Jinshajiang 'three-dimensional special-shaped' battery for the first time Jul 20, 2024 am 03:20 AM

According to news on July 19, Xiaomi MIX Fold 4, the first flagship folding new phone, was officially released tonight and is equipped with a "three-dimensional special-shaped battery" for the first time. According to reports, Xiaomi MIX Fold4 has achieved a major breakthrough in battery technology and designed an innovative "three-dimensional special-shaped battery" specifically for folding screens. Traditional folding screen devices mostly use conventional square batteries, which have low space utilization efficiency. In order to solve this problem, Xiaomi did not use the common winding battery cells, but developed a new lamination process to create a new form of battery, which greatly improved the space utilization. Battery Technology Innovation In order to accurately alternately stack positive and negative electrode sheets and ensure the safe embedding of lithium ions, Xiaomi has developed a new ultrasonic welding machine and lamination machine to improve welding and cutting accuracy.

How to handle database connection errors in PHP How to handle database connection errors in PHP Jun 05, 2024 pm 02:16 PM

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

Xiaomi's 100-yuan phone Redmi 14C design specifications revealed, will be released on August 31 Xiaomi's 100-yuan phone Redmi 14C design specifications revealed, will be released on August 31 Aug 23, 2024 pm 09:31 PM

Xiaomi's Redmi brand is gearing up to add another budget phone to its portfolio - the Redmi 14C. The device is confirmed to be released in Vietnam on August 31st. However, ahead of the launch, the phone's specifications have been revealed via a Vietnamese retailer. Redmi14CR Redmi often brings new designs in new series, and Redmi14C is no exception. The phone has a large circular camera module on the back, which is completely different from the design of its predecessor. The blue color version even uses a gradient design to make it look more high-end. However, Redmi14C is actually an economical mobile phone. The camera module consists of four rings; one houses the main 50-megapixel sensor, and another may house the camera for depth information.

See all articles