added caption and fixed select bug with different database for ForeignKeysDB