I have a graph with train stations, where each station belongs to at least one line. I would like to make several stations belong to 2 lines and am not sure how to do so. Here is an example of what I would like to achieve:
SELECT *
FROM cypher('Train', $$
CREATE (:Station {name: 'Station 1', line: 'Line 1', 'Line 2'})
$$) as (n agtype);
But this will not work as each property only takes one variable. How can I achieve this?
2
Answers
Use list in order to store multiple values for a property.
Reference: Data types in AGE
Depending on data type and database architecture other alternative approaches to Lists would be: