integrate simple db layer into selection