I have a tickets table with an id that I need to associate to a lookup table where the counterpart of that data is another id that is controlled from an outside source.
tickets- id- sutfflookup- outside_data_id- ticket_idI just need to know if the association exists (hence the lookup table) and has a one to many relationship. I know nothing else about the outside_data_id except the id itself and the related ticket_id.
Also I don't want to alter the tickets table as this will only affect a small amount of ticket_id's.
Example
outside_data_id = 1234Can be related to:
ticket_id = 321ticket_id = 322ticket_id = 900Would the below lookup table structure work or is there a better way?
CREATE TABLE lookup( outside_data_id integer, ticket_id integer)