【问题标题】:Graql creation schema grakn.core.kb.concept.api.EntityType IssueGraql 创建模式 grakn.core.kb.concept.api.EntityType 问题
【发布时间】:2020-03-25 06:29:23
【问题描述】:

我是图表数据库的新手,我的 grql 代码有错误,我不知道原因。

grql 给出的错误是:

未知:概念 [Base Type [Role] - Id - 不是 [interface grakn.core.kb.concept.api.EntityType] 类型

define

ruc sub attribute,
    datatype string;

about sub attribute,
    datatype string;

web-page sub attribute,
    datatype string;

location sub attribute,
    datatype string;

name sub attribute,
    datatype string;

creationDate sub attribute,
    datatype date;

dni sub attribute,
    datatype string;

championshipWon sub attribute,
    datatype long;

birdhdate sub attribute,
    datatype date;

yearsExperience sub attribute,
    datatype long;

duration sub attribute,
    datatype long;

sessionDate sub attribute,
    datatype date;

cost sub attribute,
    datatype long;

maxStudents sub attribute,
    datatype long;

minStudents sub attribute,
    datatype long;

maxTickets sub attribute,
    datatype long;

email sub attribute,
    datatype string;

password sub attribute,
    datatype string;

disciplines sub attribute,
    datatype string;

title sub attribute,
    datatype string;

schedule sub attribute,
    datatype string;

credentials sub entity,
    has email,
    has password;

school sub entity,
    relates students,
    relates trainers,
    relates credentials,
    plays creator,
    has ruc,
    has about,
    has location,
    has name,
    has creationDate,
    has disciplines;

trainers sub entity,
    relates students,
    plays creator,
    has dni,
    has championshipWon,
    has name,
    has birdhdate,
    has creationDate,
    has disciplines,
    has yearsExperience;


personalSession sub entity,
    relates students,
    relates trainers,
    plays creating,
    has sessionDate,
    has duration,
    has cost,
    has location,
    has disciplines;

schoolSession sub entity,
    relates school,
    relates trainers,
    relates students,
    plays creating,
    has cost,
    has duration,
    has schedule,
    has maxStudents,
    has minStudents,
    has location;

events sub entity,
    relates school,
    relates trainers,
    plays creating,
    has cost,
    has maxTickets,
    has title,
    has sessionDate,
    has location;

students sub entity,
    has dni,
    has name,
    has birdhdate,
    has creationDate,
    has disciplines;

create sub relation,
    relates creator,
    relates creating;

如您所见,我认为所有事情都是正确的,但他们给出了错误,请帮助!

【问题讨论】:

    标签: database graph database-design schema vaticle-typeql


    【解决方案1】:

    relates 应在relation 的定义中使用,但是,您在entity 定义中使用它。可以详细了解Schema Concepts in the Grakn Documentation的构造。

    【讨论】:

      猜你喜欢
      • 2010-11-13
      • 2022-09-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-07
      • 1970-01-01
      • 2022-01-17
      • 1970-01-01
      相关资源
      最近更新 更多