zoukankan      html  css  js  c++  java
  • SQL查询刚開始学习的人指南读书笔记(一)关系数据库和SQL介绍

    PART I:Relational Databases and SQL


    Chapter2, Ensuring Your Database Structure IsSound.

    数据库设计准则

     

    什么是关系数据库

    RDBMS (A Relational database management systems)关系数据库

    Tables

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

    single, specific subject.

     

    Fields

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

    of the subject of the table to which it belongs.

     

    Records

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

     

    Keys

    Keys are special fields that play very specific roles with in a table.eg.

    • primary key
    • foreign key

     

    主键的最主要作用是保证数据记录的唯一性,就是说主键约束要保证在一个数据库表里的全部的数据记录都是不同的个体,比如:身份证号码能够保证一个人在大陆范围内是一个独立的个体(弄错了的不算)。即一个身份证号码不能标识两个人或两个身份证号码标识一个人。所以主键是从现有的数据里分析出来的,不是设计人员任意加上去的。

     

    Relationships

    • one-to-one
    • one-to-many
    • many-to-many

  • 相关阅读:
    CF1452F Divide Powers 题解
    ZOJ3705Applications
    ZOJ3706Break Standard Weight
    关于技术的感悟与规划
    做自己不愿做的事叫成长,做以前不敢做的事叫突破
    CSS之盒模型
    js数组的sort排序详解
    C#接口
    jQuery UI Dialog:Demo1:入门
    CSS之position解释
  • 原文地址:https://www.cnblogs.com/gccbuaa/p/6755418.html
Copyright © 2011-2022 走看看