views:

55

answers:

2

I have two tables:

- Attendees
- Events

Normally, I would create a mapping table 'EventAttendeeMap' to link these tables into a many to many relationship.

Is this the best way of doing so? Should I store the list of AttendeeIds in an xml column instead on the Events table?

I am using .NET 3.5/4 with Linq as the DAL (although I think this is irrelevant to the design question being asked, possibly).

Interested to see what people's opinions are.

Thanks. Dave

+1  A: 

In short yes - create a mapping table to hold the event id and the attendee id.

There is a good question here that might be of interest to you.

Barry
+2  A: 

A mapping table is definitely the best way to do it - the Entity Framework will convert the mapping table into a collection of entities on both sides and the table itself will essentially disappear.

Moo
Thanks for your responses people (sorry you're both right, so the first post gets the answer flag, nothing personal.)Good to know I'm thinking in the right direction.
Dave