Skip to content

Database Schema

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

Table of Contents

1. Node Table

Column Name Type Example
nid SERIAL 234245125161
coord POINT (53.0033, 3.8524)
Constraint Name Type Column(s)
nodes_pkey PRIMARY KEY nid

2. 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
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

3. 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"
Constraint Name Type Column(s)
pois_pkey PRIMARY KEY pid

4. 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)
Constraint Name Type Column(s)
users_pkey PRIMARY KEY uid

Partners

imec - IDLab - Ghent University

Clone this wiki locally