18 Time 4:00 PM Room B405 Teacher Anita Time 2:00 PM Room A102 Teacher Adam Math 201 Science 102 Time 2:00 PM Room A312 Students 60 Time 4:00 PM Room B405 Students 90 Time 6:00 PM Room A151 Students 20 Science 102 Course Science 101 Teachers Adam, Alex Course Science 102 Teachers Anita, Anna Course Science 201 Teachers Anita, Adam TEACHER SCHEDULE FOR ANITA SCIENCE DEPT COURSE CURRICULUM FOR SCIENCE STUDENT SCHEDULE FOR JILL MATH MAJOR データの重複なし 常に⼀貫性が保たれる
GRAPH bank_graph VERTEX TABLES ( bank_accounts as accounts PROPERTIES (id, balance)) EDGE TABLES ( bank_transfers SOURCE KEY (from_acc) REFERENCES ACCOUNTS(ID) DESTINATION KEY (to_acc) REFERENCES ACCOUNTS(ID) PROPERTIES (amount, to_acc)) ; BA NK ACCO U NT S M O NE Y T RA NS F E RS $
リレーショナルSQLを使⽤して 同じ問合せを記述するには、 12個の結合と3つのユニオンが必要 SELECT graph.path FROM GRAPH_TABLE ( bank_graph MATCH (v1)-[e is BANK_TRANSFERS]->{1,3} (v2) WHERE v1.id = 'B' AND v2.id = 'E' COLUMNS LISTAGG(e.to_acc, ',') AS path) ) graph ;