SQL查询初学者指南读书笔记(一)关系数据库和SQL介绍
2015-06-02 11:00
417 查看
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
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
相关文章推荐
- LinQ to SQL==查询
- 通用权限管理设计 之 数据库结构设计
- mybatis执行批量更新batch update 的方法(oracle,mysql)
- sqlplus的非交互式使用
- 分布式MySQL数据库TDSQL架构分析
- mysql二:理解MySQL——索引与优化
- Oracle表分区(经典)
- NoSQL的价值到底在哪里?
- oracle 的rowid和rownum
- 常用 SQL Server 规范集锦
- Mysql的数据类型
- SQL数据库的增删改查
- 分布式MySQL数据库TDSQL架构分析
- 使用Redis实现高并发分布式序列号生成服务
- SQL:将查询结果插入到另一个表的三种情况
- jboss6.3 mariadb的jndi配置
- MySQL 范式化-上线前-配合开发
- 统计Oracle数据库文件的大小
- redis键的数据结
- mysql的date操作