create table with reference