made abstract db based on ids