[ https://issues.apache.org/jira/browse/ATLAS-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15942395#comment-15942395 ]
Stefhan van Helvoirt commented on ATLAS-1410: --------------------------------------------- With regards to the term relationships. I think there is a difference between conceptual relationships such as 'Is a Type Of / Has Types', 'Is Of / Has A' and contextual relationships. Where are contextual relationship could be a 'Is a'. The relationship 'Is a' is very specific and directing and therefor can only be used when describing a specific context or in the scenario in which the relationship is always true. Example of the relationship as described in the document 'Customer is a Person'. In most situations this might not be universal true as for example an Organization can also be a Customer and not every Person is a customer. It should not be possible to have more than one 'Is a' of a particular type. Example, it should not be possible to have both 'Customer is a Person' and 'Customer is an Organization' as both Person and Organization are from the same taxonomy and per instance it can be either the one or the other but not both. Furthermore, i think it's worthwhile to add a new relationship similar to the 'Has a' namely 'Has an'. Example: - House has a Room - House has an Occupant Whereas the 'Has a' is an composition which implies that the child object cannot live withouth the context of its parent. Destroy the house and the rooms disappear. The 'Has an' is an aggregation which implies that the child can exist on its own. Destroy the house and the occupant goes elsewhere. In database modelling the 'Has an' can be seen as a foreign key instead of a normal attribute. > V2 Glossary API > --------------- > > Key: ATLAS-1410 > URL: https://issues.apache.org/jira/browse/ATLAS-1410 > Project: Atlas > Issue Type: Improvement > Reporter: David Radley > Assignee: David Radley > Attachments: Atlas Glossary V2 proposal v1.0.pdf, Atlas Glossary V2 > proposal v1.1.pdf, Atlas Glossary V2 proposal v1.2.pdf, Atlas Glossary V2 > proposal v1.3.pdf > > > The BaseResourceDefinition uses the AttributeDefintion class from typesystem. > There are newer more funcitonal versions of this capability in the atlas-intg > project. This Jira is changing over the glossary implementation to the newer > entity / type classes. > Instread of the instanceProperties and collectionProperties in the > BaseResourceDefintions we should use something in this sort of style : > " > AtlasEntityDef deptTypeDef = > AtlasTypeUtil.createClassTypeDef(DEPARTMENT_TYPE, > "Department"+_description, ImmutableSet.<String>of(), > AtlasTypeUtil.createRequiredAttrDef("name", "string"), > new AtlasAttributeDef("employees", > String.format("array<%s>", "Person"), true, > AtlasAttributeDef.Cardinality.SINGLE, 0, 1, > false, false, > > Collections.<AtlasStructDef.AtlasConstraintDef>emptyList())); > AtlasEntityDef personTypeDef = > AtlasTypeUtil.createClassTypeDef("Person", "Person"+_description, > ImmutableSet.<String>of(), > AtlasTypeUtil.createRequiredAttrDef("name", "string"), > AtlasTypeUtil.createOptionalAttrDef("address", "Address"), > AtlasTypeUtil.createOptionalAttrDef("birthday", "date"), > AtlasTypeUtil.createOptionalAttrDef("hasPets", "boolean"), > AtlasTypeUtil.createOptionalAttrDef("numberOfCars", "byte"), > AtlasTypeUtil.createOptionalAttrDef("houseNumber", "short"), > AtlasTypeUtil.createOptionalAttrDef("carMileage", "int"), > AtlasTypeUtil.createOptionalAttrDef("age", "float"), > " > For the parent child relationships with glossary categories and terms we > should be able to have the type system manage edge deletion. As part of this, > we will need to investigate whether we could get rid of the disconnect and > connect methods added in ATLAS-1186 > -- This message was sent by Atlassian JIRA (v6.3.15#6346)