Add PDO object for database

By JSON based template, it will be ready to use an AJAX based,
front-ent and also mobile applications will be much easier.