MovieDirector We had to modify our logical model to fit the technology, bringing in unnecessary complexity. ID int Name string Director Movie - Director in RDBMS
<directed_by> 0x2 0x2 <name> “Steven Spielberg” 0x1 and 0x2 are UIDs (Universal IDentifiers). <name>, <recorded_year>, etc. are predicates. “Jaws”, “Steven Spielberg”, and 1975 are values. Dgraph Data Modeling
} Creates a new UID and associate its value “Alice” with predicate <name> { "data": { "code": "Success", "message": "Done", "uids": { "alice": "0x1" } }, "extensions": {...} }
name } } { "data": { "q": [ { "uid": "0x1", "name": "Alice" }, { "uid": "0x2", "name": "Bob" }] }, "extensions": {...} } 0x1 0x2 Alice Bob name name Fetches uid and name of nodes of UIDs 0x1 and 0x2 https://play.dgraph.io/