Skip to content

Schema

To ensure the database is organized, standardized, and easy to understand, we have designed a schema to define how many types of nodes exist, what properties each type has, and how these nodes can be connected to create relationships.

We designed the Politigraph schema based on Popolo - International open government data specifications with adaptations for the context of Thailand. The schema consists of:

  1. Object: Types of actual data nodes, specifying the properties present in each node type.
  2. Interface: Basic requirements for object to extend.
  3. Union: Sets of possible types.
  4. Relationship: Possible relationships between different node types.

Feel free to select entities to read the descriptions.

For example, we have these people with first-name starting with “Nat” represented with nodes type of Person. These nodes will only have property and relationship that satisfied Person schema (they don’t need to have optional properties, so querying those will have value of null)

Natchanon SrikokueaNatchira ImwisedNattacha Boonchaiins...Nattapong Pipatchais...Nattapong Supriyasil...Nattapong SumanothamNatthaphong Ruengpan...Nataphol Tovichakcha...
Person
Person

บุคคลที่เกี่ยวข้องทางการเมือง เช่น สมาชิกสภา สมาชิกพรรคการเมือง ฯลฯ

  • id: 24b67bee-2791-49d0-a43f-5a1bdc8c2d7b
  • prefix: นาย
  • name_en: Natchanon Srikokuea
  • image: https://politigraph.wevis.info/assets/people/ณัฏฐ์ชนน-ศรีก่อเกื้อ.webp
  • birth_date: 1975-01-29
  • educations: - ปริญญาโท ศิลปศาสตรมหาบัณฑิต (รัฐศาสตร์) มหาวิทยาลัยรามคำแหง
  • previous_occupations: - สมาชิกสภาองค์การบริหารส่วนจังหวัดสงขลา

*Only showing nodes, properties, and relationships from the query see full schema

Relationship in schema will have a name with arrow direction for human interpretation such as Post--IN--> Organization meaning Post is “in” an Organization But in the query process, either nodes at the both end can be queried from each other. For example, Post has property organizations and Organization has property posts that refer to reach other node of this relationship.

The 64th Cabinetนายกรัฐมนตรี ครม. คณ...
Organization
Post
Organization

องค์กรที่เกี่ยวข้องทางการเมือง เช่น สส. สว. ครม. พรรคการเมือง ฯลฯ

  • id: คณะรัฐมนตรี-64
  • name_en: The 64th Cabinet
  • posts:
    • นายกรัฐมนตรี ครม. คณะที่ 64

*Only showing nodes, properties, and relationships from the query see full schema