热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Atlas中,Rdbms元模型的理解

组合关系:table可以有多个外键,外键只能属于某个table{name:rdbms_table_foreign_key,serviceTy

组合关系:table可以有多个外键,外键只能属于某个table

{"name": "rdbms_table_foreign_key","serviceType": "rdbms","typeVersion": "1.2","relationshipCategory": "COMPOSITION","relationshipLabel": "__rdbms_table.foreign_keys","endDef1": {"type": "rdbms_table","name": "foreign_keys","isContainer": true,"cardinality": "SET","isLegacyAttribute": true},"endDef2": {"type": "rdbms_foreign_key","name": "table","isContainer": false,"cardinality": "SINGLE","isLegacyAttribute": true},"propagateTags": "NONE"
}

关联关系:外键实体引用哪个表的外键;我这个表的外键,被哪个外键实体引用。

{"name": "rdbms_foreign_key_table_references","serviceType": "rdbms","typeVersion": "1.2","relationshipCategory": "ASSOCIATION","relationshipLabel": "__rdbms_foreign_key.references_table","endDef1": {"type": "rdbms_foreign_key","name": "references_table","isContainer": false,"cardinality": "SINGLE","isLegacyAttribute": true},"endDef2": {"type": "rdbms_table","name": "foreign_key_references","isContainer": false,"cardinality": "SET"},"propagateTags": "NONE"
}

关联关系:外键由几个字段构成,字段被哪些外键引用

{"name": "rdbms_foreign_key_column_references","serviceType": "rdbms","typeVersion": "1.2","relationshipCategory": "ASSOCIATION","relationshipLabel": "__rdbms_foreign_key.references_columns","endDef1": {"type": "rdbms_foreign_key","name": "references_columns","isContainer": false,"cardinality": "SET","isLegacyAttribute": true},"endDef2": {"type": "rdbms_column","name": "foreign_key_references","isContainer": false,"cardinality": "SET"},"propagateTags": "NONE"
}

详情

tableA:id,[classId,className](外键)tableB:classId,className外键实体:
references_table:tableB
table:tableA
references_columns:classId,className例子说明:tableA,有一个外键,由[classId,className]构成tableB,有两个字段,是tableA的外键外键实体,属于tableA的,被tableB引用,这个外键引用两个字段[classId,className]

推荐阅读
author-avatar
枫涵笑
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有