Relational Data Model

Overview
The goal of a model is to reduce and abstract the real world into something computable.
It is represented as a collection of tables.

Relational Model describe how to operate database with some operations.
A relation is a set, no duplicate tuples.
Tuples are unordered.
Attributes are unordered and are referenced by name and not position.

A super key, SK, is a subset of attributes that uniquely identify a tuple
A super key usually has redundant attributes. A key is a set of attributes with no redundancies that uniquely identifies a tuple.

Relational Model Integrity
Candidate Key-uniquely identify a tuple.
Primary Key - One of the candidate keys.
Alternate Key - other candidate key not primary key.
Foreign Key - in one relation whose value are required to be equal to the primary key of another relation.

Entity
Referential

Relational Algebra

The Relational Algebra is a set of operators that operate on relations, producing other relations.
8 operators:
Selection Operator
used to select a subset of tuples from a single relation that satisfy a selection criterion.
1
Projection Operator
The projection operator is used to select a subset of attributes(columns) from a single relation.
2
Hence: projection removes duplicates!
Rename Operator
just a combination of the Projection operator that allows attributes to be renamed.
Product Operator
Union Operator
union compatible relations
Intersection Operator
find the same part of the two tables
Difference Operator
find the difference data of the tables.
Join Operator
a binary operator used to combine tuples from two relations where the tuples are related by some join expression.
3
Nature join is with the duplicate attributes removed.
4
Divide Operator

finished

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值