add select behavior & display foreign keys logic