|
-
Dec 9th, 2009, 04:20 PM
#11
Re: Constructive Criticism
 Originally Posted by motil
More questions: is there any rule i should follow when creating classes? should i try and create class for each of my tables or is it sometimes better to join tables into the same class ?
Hey,
Yip, pretty much as Pradeep said.
To carry on the example from my own site, I have a table called Article and Category in my database, and I also have a custom class in my code to represent each of these tables. An Article has a Category, i.e. there is a foreign key relationship between the two tables, however, each one of the table are represented separately in my code.
Gary
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|