[工学]ch02-Relation model
Database Systems Unit 2 The Relational Model Relational Model Relational Algebra(关系代数) Relational Calculus(关系演算) Relational Model Laid down in 1969-1970 by E.F.CODD “ A Relational Model of Data for Large Shared Data Bank” , ACM 1970 Mathematical Bases ( Relational Theory) Developed in 1980s Most commercial DBMS are Relational Mathematical Relations Formally, given sets D1, D2, …. Dn, a relation r is a subset of Cartesian product(笛卡尔积) D1 × D2 × … × DnThus a relation(关系) is a set of n-tuples (a1, a2, …, an) where ai ? Di Example: if customer-name = {Jones, Smith, Curry, Lindsay} customer-street = {Main, North, Park} customer-city = {Harrison, Rye, Pittsfield} Then r = {(Jones, Main, Harrison), (Smith, North, Rye), (Curry, North, Rye), (Lindsay, Park, Pittsfield)} is a relation over customer-name × customer-street × customer-city. Mathematical Relations Each attribute of a relation has a name The set of allowed values for each attribute is called the domain(域) of the attribute Attribute values are (normally) required to be atomic; that is, indivisible Note: multivalued attribute(多值属性) values are not atomic Note: composite attribute (组合属性) values are not atomic The special value null is a member of every domain The null value causes complications in the definition of many operations Mathematical Relations A1, A2, …, An are attributes R = (A1, A2, …, An ) is a relation schema(关系模式) E.g. Customer-schema = (customer-name, customer-street, customer-city) r(R) is a relation on the relation schema R E.g. customer (Customer-schema) Mathematical Relations The current values (relation instance, 关系实例) of a relation are specified by a table An element t of r is a tuple(元组), represented by a row in a table Order of tuples is irrelevant (元组是无序的 tuples may be stored in an arbitrary order) Relational Database A Relational database consists of multiple relations Information abo
您可能关注的文档
最近下载
- 2018装配式管道支吊架18R417-2 (含抗震支吊架).docx VIP
- 新闻学概论教案(全).doc VIP
- 2025年无人机驾驶员执照低电量警告下的悬停返航决策与操作专题试卷及解析.pdf VIP
- 工程项目质量管理控制.ppt VIP
- 2025年注册测绘工程师项目相关方参与监控专题试卷及解析.pdf VIP
- 2025年拍卖师网络拍卖中个人信息收集的“告知-同意”原则实践专题试卷及解析.pdf VIP
- 2025年项目管理专业制造业项目沟通规划专题试卷及解析.pdf VIP
- 2025年特许金融分析师移动平均模型与自回归模型的参数估计专题试卷及解析.pdf VIP
- STAUFF-西德福软管总成2018.pdf VIP
- 2025年1年级数学超难的题目及答案.docx VIP
原创力文档

文档评论(0)