Assigning multiple attributes of the same type to an entity


#1

I am attempting to design a schema for a movie ontology. I have set basic attributes that a movie entity should have such as title, unique identifier, etc.

However I am having trouble figuring out how to set the attribute genre for a movie entity, there are many genres that could exist such as Comedy, Romance, Adventure etc and a movie can have many or one of these genres.

In order to be specific I will be obtaining data from a csv which contains information about this movie and under the header genre there are a list of genres a movie has.

I am trying to use grakn and this csv data to create a simple recommendation engine basing the recommendation on genre.

Any suggestions on how I can tackle this?

Thank you


#2

Hi @CasualCoder,

Have you taken your time to go through our Docs http://dev.grakn.ai/docs or Academy http://dev.grakn.ai/academy ?

Here’s an example ontology for your problem:

define

movie sub entity, 
    has name,
    plays tagged;

genre sub entity,
    has name,
    plays tagger;

tagging sub relationship,
    relates tagged,
    relates tagger;

name sub attribute, datatype string;