Sunday, 9 July 2017

Dgraph - Schema for University PhD Students and Research Projects

Aim

Create Dgraph schema for managing university PhD students and their research projects. Click here to view complete problem statement.

Graph


Schema
 
mutation{
  schema{
    type: string @index .
    
    ssn: string @index .
    name: string @index .
    dob: date @index .
    rank: int @index .
    researchSpeciality: string @index .
    
    projectNumber: string @index .
    startDate: date @index .
    endDate: date @index .
    budget: float @index .
    
    degreeProgram: string @index .
    
    deptNumber: string @index .
    officeAddress: string .
    
    startTime: date @index .
    endTime: date @index .
    
    principal_investigator: uid @reverse .
    co_investigator: uid @reverse .
    supervisor: uid @reverse .
    sponsor: uid @reverse .
    research_assistant: uid @reverse .
    
    student_advisor: uid @reverse .
    major_department: uid @reverse .
    
    chairman: uid @reverse .
    
    has_department: uid @reverse .
    has_professor: uid @reverse .
  }
}



*** END ***

Dgraph - Schema for Music Company

Aim

Create a dgraph schema for a Music Company. Click here to view complete problem statement. 

Graph

Schema
 
mutation{
  schema{
    type: string @index .
    
    name: string @index .
    ssn: string .
    
    title: string @index .
    copyrightDate: date @index .
    format: string @index .
    albumIdentifier: string @index .
    
    addressLine: string .
    city: string @index .
    telephoneNumber: string .
    
    musicalKey: string .
    
    recorded_at: uid @reverse .
    produced_by: uid @reverse .
    
    belongs_to: uid @reverse .
    uses: uid @reverse .
    writer: uid @reverse .
    performer: uid @reverse .
    
    plays: uid @reverse .
    stays: uid @reverse .
  }
}



*** END ***

Do you like this article?