Using insert/update/delete in constructor is a bad practice in any language.
Establishing connection to DB – OK.
Constructor is used to create an object and initialize it’s parameters; nothing more.
1. Using DML in constructor will slow down initialization of your object.
2. It may fail and object just doesn’t create at all.