SQL query beginner's Guide Reading Notes (I) Introduction to relational databases and SQL, beginner's Guide Reading Notes

Source: Internet
Author: User

SQL query beginner's Guide Reading Notes (I) Introduction to relational databases and SQL, beginner's Guide Reading Notes

Part I: Relational Databases and SQL


Chapter2, Ensuring Your Database Structure IsSound.

Database Design Guidelines

 

What is a relational database?

RDBMS (A Relational database management systems) Relational database

Tables

Tables are the mainstructures in the database. Each table always represents

Single, specificsubject.

 

Fields

A field is thesmallest structure in the database, and it represents a characteristic

Of the subject ofthe table to which it belongs.

 

Records

A record representsa unique instance of the subject of a table.

 

Keys

Keysare special fields that play very specific roles within a table. eg.

  • Primary key
  • Foreign key

 

The primary key is used to ensure the uniqueness of data records. That is to say, the primary key constraint must ensure that all data records in a database table are different individuals. For example: the ID card number can ensure that a person is an independent individual on the Chinese mainland (if it is wrong, it is not counted). That is, an ID card number cannot identify two people or two ID card numbers. Therefore, the primary key is analyzed from the existing data, not randomly added by the designer.

 

Relationships

  • One-to-one
  • One-to-least
  • Copying-to-Sequence

Related Article

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.