Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
02-25-2019 01:25 PM
I started to model my database using SQL but I had a problem. I need a field to be an Array of foreign keys but as I searched this is impossible with SQL. Is it possible to do something similar in Neo4j?
CREATE TABLE places (
id SERIAL PRIMARY KEY,
title text NOT NULL,
country integer NOT NULL REFERENCES countries(id),
state integer NOT NULL REFERENCES states(id),
city integer NOT NULL REFERENCES cities(id),
address text,
zipcode text NOT NULL,
services integer REFERENCES services(id)
);
CREATE TABLE services (
id SERIAL PRIMARY KEY,
title text NOT NULL
}
02-25-2019 02:52 PM
You don't have foreign keys you use relationship instead, which represent 1:1, 1:n or m:n connections.
You can also store arrays of values as properties, but that's unrelated.
All the sessions of the conference are now available online