bio4j/dynamograph — pull request #10 by eparejatobes (2014-05-18 19:24:06+00:00)
Title: Initial design for DynamoDB table layout for GO

@bio4j/dynamograph
I propose next initial table layout for GO:
```
GO_TERM: Hash Primary Key
{
- id - String - Hash Primary Key,
- name - String
- namespace - String
- definition - String
- synonyms - Set of Strings
- comment - String
- cross_ref - Set of String
- subset - Set of String
}
```

```
GO_RELATIONSHIP: Hash Range Primary Key
{
- type - String
- source - String (Hash Primary Key)
- target - String (Range Primary Key)
}
```
I removed next values: 'secondary_ids' and 'synonyms' which are not of 'exact' type and obsolete.(according [to](https://github.com/bio4j/bio4j/blob/new/model/go/docs/src/main/java/com/bio4j/model/go/GoModule.java.md#data-model))
I decide to store exact synonyms as set of Strings as there is no a lot of synonyms for single term (if you know about some special case or you think that it will be better to create seperate table please let me know). I do not know whether solution should support Term by name/synonym. If so synonyms should be extracted to seperate table:
```
GO_NAME : Hash Range Primary Key
{
- Id - Hash Primary Key
- Name - Range Key
}
```
with index on name (in order to accelerate queries by name)

`cross_ref ` - also placed as Set of String as I do not know a lof about it and it seems that there is no gigantic number of those references(please correct me I am wrong).

`subset` - again Set of String (If there is any additional requirement for subset like quering bu it or sth like this please let me know)

What is more single term does not have enormous amout of `relationship` (I think) so theoretically it could bo possible to place them in the same table as: 5 different fields( outgoing relationship) with type as Set of String i.e:
```
- is_a : Set of String
- part_of: Set of String
- has_part_of : Set of String
- negatively_regulates : Set of String
- positively_regulates : Set of String
```
but it will be difficult to find incoming relationship.
If we place 'relationship` in seperate table we can use Global seconady index for retrieving incoming relationship.

All comments, discussion, opinions are more than welcome. Maybe you know something about special requirement, special usage, queries that should influence layout.