博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SQL查询初学者指南读书笔记(一)关系数据库和SQL介绍
阅读量:4120 次
发布时间:2019-05-25

本文共 790 字,大约阅读时间需要 2 分钟。

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

转载地址:http://gwppi.baihongyu.com/

你可能感兴趣的文章
css样式控制居中
查看>>
JSP 自己写的在JSP页面得到文件的服务器路径,并对XML文件进行读写(以对Tomcat的conf目录中的context.xml文件为例)
查看>>
JS 跟随光标的提示框
查看>>
JS 横向图片跑马灯效果
查看>>
JS 屏蔽、改变按键效果
查看>>
JS 屏蔽右键菜单
查看>>
MYSQL备份方法
查看>>
Java_开发中:@SuppressWarnings("unchecked")的意思
查看>>
js去空格的三种方法
查看>>
java正则实例大全
查看>>
pl sql连接远程oracle 10g
查看>>
pl sql连接远程oracle 10g
查看>>
PL/SQL教程(转)
查看>>
不同分类的商品动态添加属性(吴康彬发表于2009-2-9 10:32:35)
查看>>
Java保留小数问题
查看>>
JS 的一些操作
查看>>
实时监听js改变value,跨浏览器支持
查看>>
JS中onpropertychange事件和onchange事件区别
查看>>
JFreeChart_API
查看>>
ORACLE SQL*PLUS
查看>>