added primary and foreign key constraints