query db for link bygiven id , query db for store by given id, add link_ids to store