The normal way to do models/controllers is to put them both in the same file in the mysite/code directory. (That's not strictly necessary though. You could create mysite/models and mysite/controllers like you do in other frameworks too if you want models and controllers separated.) If you're creating a "team" model, you'd create "Team.php" and it would contain two classes:
class Team extends DataObject {
static $db = array(
// fields defined here - see docs
);
}
class Team_Controller extends Controller {
function do_something() {
return $this->renderWith('Team','Page'); // this is going to look for Layouts/Team.ss for 'inner' content and Page.ss as the outer stuff
}
}
If you want the item to be part of the CMS structure, the model should extend Page (which extends Sitetree, which extends DataObject), and the controller should extend Page_Controller.
As for database tables, a dataobject can actually be split across several tables because of inheritance. Sitetree_Live is the main table for what is actually being displayed on the site. The easiest way to do it is through DataObject::get, which handles all the joins for you. You can do:
$SQL_search = Convert::raw2sql($searchstring);
$teams = DataObject::get('Team', "Title like '%$SQL_search%' or Content like '%SQL_search%'");
Check out the docs for sort and limit options on DataObject::get. Hope that answers your question more thoroughly. It's a little different paradigm than a lot of MVC frameworks (I was working with Kohana before Silverstripe), but you get used to it pretty quickly.