In-depth understanding of database design and database

Source: Internet
Author: User

In-depth understanding of database design and database

     As the saying goes: "Let's review the previous knowledge points. New knowledge can be used as a teacher!

    

01. What are common Aggregate functions?
Avg (): calculates the average value.
Sum (): Sum
Max (); returns the maximum value.
Min (): Minimum value
Count (): calculates the total number of records. count (1) is equivalent to count (*). It is generally considered that count (1) is highly efficient.

02. What types of table join are available?
Internal Connection, external connection, and cross-connection (Database principle)

 

Let's learn new knowledge together!

  

I. Databases
1. Why design a database?
First, good database design:
01. Data Storage space saved
02. ensure data integrity
03. Convenient development of database application systems
Poor Database Design:
01. data redundancy and storage space waste
02. memory space waste
03. Data Update and insertion exceptions
Therefore, we come to the conclusion that when the database is complex, we need to design the database.

 

 

2. Let us understand the elements of E-R Diagram

E--R Diagram:

Ing base:
It can be divided into the following categories:
One-to-one: a car can only correspond to one parking space
One-to-multiple: one room can accommodate multiple guests
Multiple to one: multiple guests can stay in one room

Many-to-many: A book can be picked up by multiple people. One person can also borrow multiple books.

Iii. standardized database design with three major paradigms

First paradigm: ensures the atomicity of each column and cannot be split.
Second paradigm: On the basis of satisfying the first paradigm, one table can only describe one thing
Third paradigm: On the basis of satisfying the second paradigm, all columns except primary key columns depend on the primary key directly.
You need to strike a balance between standardization and performance.

What have you learned after the consolidation?

 

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.