Database queries - GoldenLions/Artproject GitHub Wiki

Pieces of art in the database are stored in the following format: (n:Work { title: "TITLE", artist: "ARTIST", image: "IMGNAME" })

Because works of art can share both title and artist, the image name, which refers to the filename of the image of the piece, is used to distinguish works of art.

Metadata about works of art is stored in the following format: (n:Feature { type: "type", value: "value" })

Type refers to the type of data, for instance "TIMELINE", "SCHOOL", "TECHNIQUE", where value refers to the data itself, for instance 1801-1850, Italian, Oil-paint. Type keys are uppercase.

Pieces of art are connected to metadata nodes via HAS_FEATURE edges. For instance: (n:Work)-[:HAS_FEATURE]-(b:Feature)

Artists are saved in the following format: (n:Artist {name: "name", dates: "dates" })

Artists are connected to the works that they produced.

Users are stored like this: (n:User { username: "username", password: "password" })

Users are connected to works like this: (n:User)-[:LIKES]-(b:Work)