设为首页 加入收藏

TOP

SQL查询初学者指南读书笔记(一)关系数据库和SQL介绍
2015-07-24 10:39:39 来源: 作者: 【 】 浏览:1
Tags: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
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇SQL应用与开发:(九)提高效率的.. 下一篇sql基础语句大集合

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·About - Redis (2025-12-26 08:20:56)
·Redis: A Comprehens (2025-12-26 08:20:53)
·Redis - The Real-ti (2025-12-26 08:20:50)
·Bash 脚本教程——Li (2025-12-26 07:53:35)
·实战篇!Linux shell (2025-12-26 07:53:32)