Skip to content

Database Schema

Tim Baccaert edited this page Jul 24, 2017 · 8 revisions

Node Table

Column Name Type Example
nid SERIAL 234245125161
coord POINT (53.0033, 3.8524)

Constraints

Constraint Name Type Column(s)
nodes_pkey PRIMARY KEY nid

Edge Table

Column Name Type Example
eid SERIAL 234245125161
rating REAL 4.5
tags VARCHAR(128)[] ["Water", "Tourism", "Park"]
to_node INTEGER 234245125161
from_node INTEGER 234512315166

Constraints

Constraint Name Type Column(s)
edges_pkey PRIMARY KEY eid
to_fkey FOREIGN KEY to_node -> nodes.nid
from_fkey FOREIGN KEY from_node -> nodes.nid
rating_cap CHECK if (0.0 <= r <= 5.0) rating

POI Table

Column Name Type Example
pid SERIAL 234245125161
name VARCHAR(128) "Gravensteen"
description TEXT "Medieval castle built in..."
coord POINT (53.0033, 3.8524)
type VARCHAR(128) "tourism"

Constraints

Constraint Name Type Column(s)
pois_pkey PRIMARY KEY pid

Users Table

Column Name Type Example
uid VARCHAR(256) "i213251k2i123215lk1231"
avg_speed REAL 12,13 (km/h)
avg_heartrate INTEGER 132
avg_distance INTEGER 591 (m)
tot_distance INTEGER 2370 (m)
tot_duration INTEGER 40 (sec)
avg_duration INTEGER 35 (sec)
runs INTEGER 10
edit_time BIGINT 12314151 (msec)

Constraints

Constraint Name Type Column(s)
users_pkey PRIMARY KEY uid

Partners

imec - IDLab - Ghent University

Clone this wiki locally