Refactoring db print view

Signed-off-by: Marc Delisle <marc@infomarc.info>