Get Nesoni nway results into a database and provide useful query functions