• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
models and db tables? or a more sophisticated approach?

I have a very general question for you guys. I have been trying to figure out what is the best way of creating and using models and I came to the conclusion that it's ok to create a model for each table in the db. This way a model would represent all the available actions on that specific table we are using. Too simple an approach maybe? have some other idea on the topic?

That may depend on what you are doing I think.
There are cases where tables are just to store related data to other table. For example articles -> tags you probably don't need a tags model, just the articles model that has all the content related with articles.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.