Skip to content

Database Schema

gdox edited this page Sep 18, 2017 · 8 revisions

Master branch

nodes Table

Column Name Type Example
nid SERIAL 234245125161
coord POINT (53.0033, 3.8524)
poi_id INTEGER[] ([2148,413,3976])

Constraints

Constraint Name Type Column(s)
nodes_pkey PRIMARY KEY nid

edges 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

pois 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

Encapsulation branch

Mostly identical to the master branch, with the following changes:

nodes Table

Column Name Type Example
nid SERIAL 234245125161
lat DOUBLE PRECISION 53.0033
lon DOUBLE PRECISION 3.8524

pois Table

Column Name Type Example
pid SERIAL 234245125161
name VARCHAR(128) "Gravensteen"
description TEXT "Medieval castle built in..."
lat DOUBLE PRECISION 53.0033
lon DOUBLE PRECISION 3.8524
type VARCHAR(128) "tourism"

Partners

imec - IDLab - Ghent University

Clone this wiki locally