Class Structure Question



This is an opinion question, with background first.

Let's say I have a table
<u>aaaa</u>
a_id (pk)
a_name
a_descrip

and another table
<u>bbbb</u>
b_id (pk)
b_name
b_descrip

and another table to create a many to many
<u>aabb</u>
a_id (fk)
b_id (fk)

If I create a class for aaaa, obviously I would include fields for id,
name, and description. My data access object would have sql to
populate those fields for certain. Now here's my opinion question.
Does your aaaa class also include a list of foreign keys to bbbb? Do
you create an aabb class? Should you include any data from bbbb in
the aaaa class (this one seems an obvious no)? When is the
appropriate time to get related data? I don't have a particular
scenario. I'm just looking for opinions.

.