SQL Tables: Store references to an unknown number of rows in table A in a single record in table B -


i have table of people, , table of service tickets. service tickets refer 1+ people, , on time people associated multiple tickets. best way represent relationship in sql database?

it seems 2 options create 'enough' columns contain person id's should need, or single huge string column processed csv style after being fetched database. both of these options have maximum capacity, seems bad design, , second design means can't join using person id's.

a little background - i'm implementing small database part of backend class project. i've never worked sql , know self taught.

i feel has duplicate question, i'm unable find similar.

no, if si many many relation ship, creat table accordingly.

create table, like

peopleservicelink: personid, servieticketid, primary key (personid, servieticketid) 

have read hear @ understanding sql: many many relationships


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -