get working on db relations

Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>