I created a database class and now I would like to create a class to model most of the tables in my database. For example, I have an account table and I would like to create a class with the account table attributes. My question is, where is the most efficient place to instantiate my database class object (establish the connection)? should I do so within my other classes (such as account and so on) and by doing lowering efficiency (since I would be instantiating a db object within each class) or should I do it in an external place? The problem is, I want to have accessor and mutator functions (set, get functions) but these functions will update the database but at the same time I created a db class to do that. Any suggestions?