PHP设计实践。 什么是MYSQL查询的最佳位置

Fellow programmers. I'm inexperienced and I'm seeking knowledge. I started learning TDD and I'm currently making my own little project which is an e-commerce site. I would like to ask from a design perspective whats the best place put MYSQL queries. Things that I considered:

1) simply put queries in Product class under a different method,

2) create separate ProductDatabase that extends Product class and put my queries there,

3) create Database class and just dump them there ( i think it isn't really clever or appealing)

3) create some kind of reusable Database class that will allow me to retrieve data based on parameters.

Also, I'm thinking which approach will be the easiest to test.

I'm making this question towards you because I could find anything and I'm laking someone experienced that I could ask in person.

I will be grateful for all your answers.

P.S. where could I find some articles about topics like this?