It's probably not appropriate to extend the Product class like that. Now you're mixing the functionality of a product with the functionality for working with products. They are two different things and belong in two different classes. The data access code should be separate to the data that it's accessing.