DB relational model (super key、candidate key、primary key)

 Relational model:

Relational Query Language<--->Relational Algebra<--->Data<--->Constraints 约束

Relational model is based on Set Theory 集合论 and Predicate Logics(First Order Logics)

Set Theory 表示数据是没有顺序的

Relational DBMS:

Users<--> Applications&Utilities<--->Relational DBMS<--->Relational Database

OLTP(On-Line Transaction Processing)联机事务处理数据库:

MariaDB、MySQL、PostgreSQL、SQLite、HBase、cassandra

OLAP(Online Analytical Processing) 联机分析处理 数据库:

Hive、impala、tajo

Keys

  • Superkey

Let K⊆R, K is a superkey of R if values for K are sufficient 充足的 to identify a unique tuple of each 

possible relation R.

example: {ID} and {ID,name} are both superkeys of instructor

  • Candidate Key

Superkey K is a candidate key if K is minimal

Example: {ID} is a candidate key 候补者 for Instruct

  • Primary key

猜你喜欢

转载自blog.csdn.net/weixin_38134491/article/details/88391965
key